Type order Legend: type type order instance + ownership modifying reference A B a1 a2 b1 b2 b3 C F c1 c2 d1 e1 e2 e3 D E G 8
Type order Legend: type type order instance + ownership modifying reference A B a1 a2 b1 b2 b3 C F c1 c2 d1 e1 e2 e3 D E G 8
Type order Legend: type type order instance + ownership modifying reference A B a1 a2 b1 b2 b3 C F c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G 8
Type order Legend: type type order instance + ownership modifying reference A B a1 a2 b1 b2 b3 C F c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G 8
Type order Legend: type type order instance + ownership modifying reference A B a1 a2 b1 b2 b3 C F c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G 8
Type order Legend: type type order instance + ownership modifying reference ownership (modifying ref) A B a1 a2 b1 b2 b3 C F c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G 8
Type order Legend: type type order instance + ownership modifying reference ownership (modifying ref) A B a1 a2 b1 b2 b3 C F c1 c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G 8
Type order Legend: type type order instance + ownership modifying reference ownership (modifying ref) A B a1 a2 b1 b2 b3 C F ✗ c1 c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G 8
Type order Legend: type type order instance + ownership modifying reference ownership (modifying ref) A B a1 a2 b1 b2 b3 C F c1 c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G 8
Type order Legend: type type order instance + ownership modifying reference ownership (modifying ref) A B a1 a2 b1 b2 b3 C F c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G 8
Type order Legend: type type order instance + ownership modifying reference ownership (modifying ref) A B a1 a2 b1 b2 b2 b3 C F c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G 8
Type order Legend: type type order instance + ownership modifying reference ownership (modifying ref) A B a1 a2 b1 b2 b2 b3 ✗ C F c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G 8
Type order Legend: type type order instance + ownership modifying reference ownership (modifying ref) A B a1 a2 b1 b2 b2 b3 C F c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G 8
Type order Legend: type type order instance + ownership modifying reference ownership (modifying ref) A B a1 a2 b1 b2 b3 C F c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G 8
Type order Legend: type type order instance + ownership modifying reference ownership (modifying ref) A B a1 a2 b1 b2 b3 b3 C F c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G 8
Type order Legend: type type order instance + ownership modifying reference ownership (modifying ref) A B a1 a2 b1 b2 b3 C F c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G 8
Type order Legend: type type order instance + ownership modifying reference ownership (modifying ref) A B a1 a2 b1 b2 b3 C F c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G Heap forms DAG with “sub-trees” (w.r.t. modifying access) 8
Type order Legend: type type order instance + ownership modifying reference ownership (modifying ref) restricted, modifying access A B a1 a2 b1 b2 b3 C F c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G Heap forms DAG with “sub-trees” (w.r.t. modifying access) 8
Type order Legend: type type order instance + ownership modifying reference ownership (modifying ref) restricted, modifying access A B a1 a2 b1 b2 b3 C F shared, c1 c2 f1 f2 modifying access d1 e1 e2 e3 g1 D E G Heap forms DAG with “sub-trees” (w.r.t. modifying access) 8
Recap 9
Recap OO verification challenges • Visible-state semantics in presence of call-backs • Modular verification of multi-object invariants Ownership-based verification • Leverages tree topology to prevent modifying call-backs • Leverages tree topology to encapsulate ownership-based invariants 9
Recap OO verification challenges • Visible-state semantics in presence of call-backs • Modular verification of multi-object invariants Ownership-based verification • Leverages tree topology to prevent modifying call-backs • Leverages tree topology to encapsulate ownership-based invariants Selective ownership • Leverages type order to prevent modifying call-backs • Leverages ownership to encapsulate ownership-based invariants 9
Verification: type order F 10
Verification: type order A B a1 a2 b1 b2 b3 C F c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G 10
Verification: type order A B a1 a2 b1 b2 b3 C F c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G No transitive call-backs 10
Verification: type order A B a1 a2 b1 b2 b3 ✗ C F c1 c2 f1 f2 d1 e1 e2 e3 e3 g1 D E G No transitive call-backs 10
Verification: type order A B a1 a2 b1 b2 b3 C F c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G 10
Verification: type order invariant (b2) A B a1 a2 b1 b2 b2 b3 C F c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G 10
Verification: type order invariant (b2) A B a1 a2 b1 b2 b2 b3 C F c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G Visible-state semantics for single-object invariants is sound 10
Verification: type order + object ownership A B a1 a2 b1 b2 b3 C F c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G 11
Verification: type order + object ownership A B a1 a2 b1 b2 b3 C F c1 c2 f1 f2 d1 e1 e2 e3 g1 D E G 11
Recommend
More recommend