sat modulo monotonic theories
play

SAT Modulo Monotonic Theories Sam Bayless , Noah Bayless , Holger - PowerPoint PPT Presentation

SAT Modulo Monotonic Theories Sam Bayless , Noah Bayless , Holger H. Hoos , Alan J. Hu University of British Columbia Point Grey Secondary School Sam Bayless (UBC) SAT Modulo Monotonic Theories 1 / 0 Procedural Content


  1. SAT Modulo Monotonic Theories Sam Bayless ∗ , Noah Bayless † , Holger H. Hoos ∗ , Alan J. Hu ∗ ∗ University of British Columbia † Point Grey Secondary School Sam Bayless (UBC) SAT Modulo Monotonic Theories 1 / 0

  2. Procedural Content Generation Sam Bayless (UBC) SAT Modulo Monotonic Theories 2 / 0

  3. MonoSAT Applications Circuit Layout Data Center Allocation Sam Bayless (UBC) SAT Modulo Monotonic Theories 3 / 0

  4. MonoSAT Applications Finite State Machine Synthesis b b b b a,b a a a a q0 q1 q2 q3 q4 CTL Controller Synthesis {~p} {p} {~p} {p} Sam Bayless (UBC) SAT Modulo Monotonic Theories 4 / 0

  5. MonoSAT MonoSAT is a SAT Modulo Theory Solver for: Graph Predicates: ▶ Reachability ▶ Shortest paths ▶ Maximum s − t flow ▶ Minimum Spanning Tree ▶ Acyclicity Sam Bayless (UBC) SAT Modulo Monotonic Theories 5 / 0

  6. MonoSAT MonoSAT is a SAT Modulo Theory Solver for: Graph Predicates: ▶ Reachability ▶ Shortest paths ▶ Maximum s − t flow ▶ Minimum Spanning Tree ▶ Acyclicity Collision Detection for Convex Hulls Finite State Machine String Acceptance L-Systems, Boolean Geometry, CTL checking (soon) These are all monotonic theories Sam Bayless (UBC) SAT Modulo Monotonic Theories 5 / 0

  7. . . . . . . . . . . . . Boolean Monotonic Theories A function p is a Boolean monotonic predicate iff: . . 1 : p returns a Boolean . . 2 : All arguments are of p are Boolean . . 3 : p ( . . . , F , . . . ) = ⇒ p ( . . . , T , . . . ) Sam Bayless (UBC) SAT Modulo Monotonic Theories 6 / 0

  8. Boolean Monotonic Theories A function p is a Boolean monotonic predicate iff: . . 1 : p returns a Boolean . . 2 : All arguments are of p are Boolean . . 3 : p ( . . . , F , . . . ) = ⇒ p ( . . . , T , . . . ) . Definition (Boolean Monotonic Theory) . A theory T with signature Σ is Boolean monotonic if and only if: . . 1 The only sort in Σ is Boolean; . . 2 all predicates in Σ are monotonic; and . . 3 all functions in Σ are monotonic. . Sam Bayless (UBC) SAT Modulo Monotonic Theories 6 / 0

  9. Graph Constraints in SMMT A formula over Booleans, edges, and monotonic predicates: ( a ∨ ¬ b ) ∧ ( b ∨ c ) ∧ ( ¬ c ∨ ¬ d ) ∧ ( reaches 1 , 3 ∨ reaches 1 , 4 ) And 1 or more symbolic graphs: 2 a 1 c 4 b d 3 Sam Bayless (UBC) SAT Modulo Monotonic Theories 7 / 0

  10. Graph Constraints in SMMT ‘Reachability’ is Boolean monotonic: 2 1 4 3 reaches 1 , 3 �→ False reaches 1 , 4 �→ False Sam Bayless (UBC) SAT Modulo Monotonic Theories 8 / 0

  11. Graph Constraints in SMMT ‘Reachability’ is Boolean monotonic: 2 1 4 3 reaches 1 , 3 �→ False reaches 1 , 4 �→ False Sam Bayless (UBC) SAT Modulo Monotonic Theories 8 / 0

  12. Graph Constraints in SMMT ‘Reachability’ is Boolean monotonic: 2 1 4 3 reaches 1 , 3 �→ True reaches 1 , 4 �→ False Sam Bayless (UBC) SAT Modulo Monotonic Theories 8 / 0

  13. Graph Constraints in SMMT ‘Reachability’ is Boolean monotonic: 2 1 4 3 reaches 1 , 3 �→ True reaches 1 , 4 �→ False Sam Bayless (UBC) SAT Modulo Monotonic Theories 8 / 0

  14. Graph Constraints in SMMT ‘Reachability’ is Boolean monotonic: 2 1 4 3 reaches 1 , 3 �→ True reaches 1 , 4 �→ True Sam Bayless (UBC) SAT Modulo Monotonic Theories 8 / 0

  15. Theory Propagation in SMMT Formula: ( a ∨ ¬ b ) ∧ ( b ∨ c ) ∧ ( ¬ c ∨ ¬ d ) ∧ ( reaches 1 , 3 ∨ reaches 1 , 4 ) Assignment: 2 2 a c 1 4 1 4 b d 3 3 Underapproximation Overapproximation reaches 1 , 3 reaches 1 , 4 Sam Bayless (UBC) SAT Modulo Monotonic Theories 9 / 0

  16. Theory Propagation in SMMT Formula: ( a ∨ ¬ b ) ∧ ( b ∨ c ) ∧ ( ¬ c ∨ ¬ d ) ∧ ( reaches 1 , 3 ∨ reaches 1 , 4 ) Assignment: ¬ b 2 2 a c 1 4 1 4 d 3 3 Underapproximation Overapproximation reaches 1 , 3 reaches 1 , 4 Sam Bayless (UBC) SAT Modulo Monotonic Theories 9 / 0

  17. Theory Propagation in SMMT Formula: ( a ∨ ¬ b ) ∧ ( b ∨ c ) ∧ ( ¬ c ∨ ¬ d ) ∧ ( reaches 1 , 3 ∨ reaches 1 , 4 ) Assignment: ¬ b , a 2 2 a a c 1 4 1 4 d 3 3 Underapproximation Overapproximation reaches 1 , 3 reaches 1 , 4 Sam Bayless (UBC) SAT Modulo Monotonic Theories 9 / 0

  18. Theory Propagation in SMMT Formula: ( a ∨ ¬ b ) ∧ ( b ∨ c ) ∧ ( ¬ c ∨ ¬ d ) ∧ ( reaches 1 , 3 ∨ reaches 1 , 4 ) Assignment: ¬ b , a , c 2 2 a a 1 c 4 1 c 4 d 3 3 Underapproximation Overapproximation reaches 1 , 3 �→ True reaches 1 , 4 Sam Bayless (UBC) SAT Modulo Monotonic Theories 9 / 0

  19. Theory Propagation in SMMT Formula: ( a ∨ ¬ b ) ∧ ( b ∨ c ) ∧ ( ¬ c ∨ ¬ d ) ∧ ( reaches 1 , 3 ∨ reaches 1 , 4 ) Assignment: ¬ b , a , c , ¬ d 2 2 a a 1 c 4 1 c 4 3 3 Underapproximation Overapproximation reaches 1 , 3 �→ True reaches 1 , 4 �→ False Sam Bayless (UBC) SAT Modulo Monotonic Theories 9 / 0

  20. Theory Propagation in SMMT Theory propagation in SMMT has useful properties: Easy to implement. Can use off-the-shelf algorithms. Improved worst-case clause learning. Sam Bayless (UBC) SAT Modulo Monotonic Theories 10 / 0

  21. MonoSAT Applications: Shortest Path Constraints Shortest Path Runtime (s) 1000 MonoSAT 100 clasp MiniSat 10 1 Dst.8- Dst.16- Dst.32- Dst.32- Dst.32- Dst.32- Dst.48- Dst.48- Dst.64- 16 32 48 64 96 128 64 96 128 Sam Bayless (UBC) SAT Modulo Monotonic Theories 11 / 0

  22. MonoSAT Applications: Maximum Flow Constraints Maximum Flow Runtime (s) 1000 MonoSAT 100 clasp MiniSat 10 1 8x8 16x16 16x16 16x16 24x24 32x32 16Flow 8Flow 16Flow 24Flow 16Flow 16Flow Sam Bayless (UBC) SAT Modulo Monotonic Theories 12 / 0

  23. MonoSAT Applications: Convex Hull Containment Art Gallery Synthesis MonoSAT Z3 10 points, 3 hulls, ≤ 3 cameras 2s 7s 20 points, 4 hulls, ≤ 4 cameras 36s 433s 30 points, 5 hulls, ≤ 5 cameras 187s > 3600s 40 points, 6 hulls, ≤ 6 cameras > 3600s 645s 50 points, 7 hulls, ≤ 7 cameras 3531s > 3600s Sam Bayless (UBC) SAT Modulo Monotonic Theories 13 / 0

  24. Conclusion Monotonic theories have many applications. Building SMT solvers for them is easy. MonoSAT supports many graph properties (and more!), and it is free & open-source: ▶ New! Bit vector support, ▶ New! Python support. Website : cs.ubc.ca/labs/isd/Projects/monosat GitHub : github.com/sambayless/monosat Sam Bayless (UBC) SAT Modulo Monotonic Theories 14 / 0

  25. MonoSAT + Python from monosat import ∗ a = Var () b = Var () c = Or(a , Not (b )) Assert ( c ) r e s u l t = Solve () Sam Bayless (UBC) SAT Modulo Monotonic Theories 15 / 0

  26. MonoSAT + Python from monosat import ∗ g= Graph () e1 = g . addEdge (1 ,2) e2 = g . addEdge (2 ,3) e3 = g . addEdge (1 ,3) Assert ( Not (And( e1 , e3 ) ) ) Assert ( g . reaches (1 ,3)) r e s u l t = Solve () Sam Bayless (UBC) SAT Modulo Monotonic Theories 16 / 0

  27. MonoSAT + Python from monosat import ∗ g= Graph () e1 = g . addEdge (1 ,2) e2 = g . addEdge (2 ,3) e3 = g . addEdge (1 ,3) Assert (Or( g . reaches (1 ,3) , g . d i s t a n c e l e q (1 ,3 ,2))) r e s u l t = Solve () Sam Bayless (UBC) SAT Modulo Monotonic Theories 17 / 0

  28. MonoSAT + Python from monosat import ∗ g= Graph () bv1 = BitVector (4) bv2 = BitVector (4) bv3 = BitVector (4) e1 = g . addEdge (1 ,2 , bv1 ) e2 = g . addEdge (2 ,3 , bv2 ) Assert ( g . d i s t a n c e l e q (1 ,3 , bv3 )) Assert ( Not ( g . d i s t a n c e l t (1 ,3 , bv3 ) ) ) Assert (( bv1 + bv3 ) == 9) r e s u l t = Solve () Sam Bayless (UBC) SAT Modulo Monotonic Theories 18 / 0

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