synthesizing commutativity conditions
play

Synthesizing Commutativity Conditions Kshitij Bansal Eric Koskinen - PowerPoint PPT Presentation

Synthesizing Commutativity Conditions Kshitij Bansal Eric Koskinen Omer Tripp New York University IBM Research, New York IBM Research, New York United States United States United States Thread Thread Thread Thread 1 2 3 4 Thread


  1. Synthesizing Commutativity Conditions Kshitij Bansal Eric Koskinen Omer Tripp New York University IBM Research, New York IBM Research, New York United States United States United States

  2. Thread Thread Thread Thread 1 2 3 4

  3. Thread Thread Thread Thread Thread Thread Thread Thread 1 1 2 2 3 3 4 4 put get enq deq add rm Concurrent Concurrent Concurrent HashMap Queue List

  4. Thread Thread Thread Thread Thread Thread Thread Thread 1 1 2 2 3 3 4 4 rd wr put get enq deq add rm Concurrent Concurrent Concurrent Shared HashMap Queue List Memory

  5. Thread Thread Thread Thread Thread Thread Thread Thread 1 1 2 2 3 3 4 4 Commutativity Linearizability rd wr put get enq deq add rm Concurrent Concurrent Concurrent Shared HashMap Queue List Memory

  6. Thread Thread Thread Thread Thread Thread Thread Thread 1 1 2 2 3 3 4 4 Commutativity Linearizability rd wr put get enq deq add rm Concurrent Concurrent Concurrent Shared HashMap Queue List Memory Building blocks for Exploiting Multi-core Performance 
 (boosting, open-nesting, Celements et al TOCS’15) Sensible programming models Static/dynamic race detection Separation of concerns in verification . . .

  7. The P USH /P ULL Model PLDI 2015 ⟨ ht.map(7,2) ,_, gUC ⟩ Push Pull ⟨ ht.map(3,x) ,_, gUC ⟩ ⟨ ht.map(3,x) , _ ⟩ ⟨ ht.map(3,x) ,_ ⟩ ⟨ q.enq(‘a’) ,_, gUC ⟩ ⟨ ht.get(5) , _ ⟩ ⟨ q.enq(‘a’) ,_ ⟩ Serializable. Opaque. …

  8. Linearizable Commute The P USH /P ULL Model PLDI 2015 ⟨ ht.map(7,2) ,_, gUC ⟩ Push Pull ⟨ ht.map(3,x) ,_, gUC ⟩ ⟨ ht.map(3,x) , _ ⟩ ⟨ ht.map(3,x) ,_ ⟩ ⟨ q.enq(‘a’) ,_, gUC ⟩ ⟨ ht.get(5) , _ ⟩ ⟨ q.enq(‘a’) ,_ ⟩ Serializable. Opaque. …

  9. Linearizable Commute

  10. Linearizable Commute Many techniques based on program logics Reduce to Reachability Bouajjani et al. ICALP’15

  11. Commute ? add(x) ⋈ remove(y)

  12. Commute ? add(x) ⋈ remove(y) New Technique ✓ Synthesize sound commutativity conditions ✓ Developed an encoding that allows us to reduce commutativity to a format amenable to SMT solvers ✓ Relative completeness ✓ Implemented and applied to key data-structures Joint work with Kshitij Bansal (NYU) and Omer Tripp (IBM)

  13. Commute Example. Set Abstract Data Type S

  14. Commute Goal. Discover a condition that implies add(x) ⋈ remove(y)

  15. ⎞ ⎛ | ⎝ ⎠ | Commute Goal. Discover a condition that implies add(x) ⋈ remove(y) Strategy. Candidate commutativity condition φ φ … ⇒ ⋈ valid

  16. ⎞ ⎛ | ⎝ ⎠ | Commute Goal. Discover a condition that implies add(x) ⋈ remove(y) Strategy. Candidate commutativity condition φ φ … ⇒ ⋈ valid

  17. ⎞ ⎛ | ⎝ ⎠ | Commute Goal. Discover a condition that implies add(x) ⋈ remove(y) Strategy. Candidate commutativity condition φ φ … ⇒ ⋈ valid

  18. ⎞ ⎠ | ⎛ | ⎝ Commute Goal. Discover a condition that implies add(x) ⋈ remove(y) Strategy. Candidate commutativity condition φ Translate partial specification to A SMT-friend encoding that does not introduce equivalent total specification. quantifiers (aside from outermost ∀ ) φ … ⇒ ⋈ valid

  19. ⎛ | ⎠ ⎞ ⎝ | Commute Abstraction Refinement Algorithm false false false H 0 … ⇒ ⋈ valid

  20. ⎞ ⎛ | ⎝ ⎠ | Commute false false false H 1 … ⇒ ⋈ valid

  21. ⎞ ⎛ | ⎝ ⎠ | Commute false false false H’ 1 … ⇒ ⋈ valid

  22. ⎞ ⎛ | ⎝ ⎠ | Commute false false false H 2 … ⇒ ⋈ valid

  23. ⎞ ⎛ | ⎝ ⎠ | Commute false false false H 2 … ⇒ ⋈ valid

  24. Commute

  25. Commute Challenges 1. Avoid introducing quantifier alternation Translate partial specification to equivalent total specification. 2. Populating atomic predicates Automatically extracted from the atoms of the transition system 3. Dynamic choice of next predicate Counterexamples and “poke” heuristics.

  26. Commute Thank you!

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