selective ownership combining object and type hierarchies
play

Selective Ownership: Combining Object and Type Hierarchies for - PowerPoint PPT Presentation

Selective Ownership: Combining Object and Type Hierarchies for Flexible Sharing Stephanie Balzer, Thomas R. Gross, and Peter Mller School of Computer Science, Carnegie Mellon University Department of Computer Science, ETH Zurich FOOL 2012


  1. 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

  2. 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

  3. 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

  4. 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

  5. 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

  6. 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

  7. 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

  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

  9. 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

  10. 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

  11. 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

  12. 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

  13. 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

  14. 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

  15. 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

  16. 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

  17. 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

  18. 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

  19. 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

  20. Recap 9

  21. 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

  22. 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

  23. Verification: type order F 10

  24. 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

  25. 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

  26. 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

  27. 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

  28. 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

  29. 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

  30. 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

  31. 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

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend