solving bitvectors with mcsat explanations from bits and
play

Solving bitvectors with MCSAT: explanations from bits and pieces - PowerPoint PPT Presentation

Solving bitvectors with MCSAT: explanations from bits and pieces Stphane Graham-Lengrand, Dejan Jovanovi, Bruno Dutertre SRI International IJCAR, July 2020 1/32 tl;dl (Too Long; Didnt Listen) MCSAT (Model-Constructing


  1. Solving bitvectors with MCSAT: explanations from bits and pieces Stéphane Graham-Lengrand, Dejan Jovanović, Bruno Dutertre SRI International IJCAR, July 2020 1/32

  2. tl;dl (Too Long; Didn’t Listen) ◮ MCSAT (Model-Constructing Satisfiability) is a scheme for SMT-solving (Satisfiability-Modulo-Theories), alternative to DPLL( T ). ◮ To apply the scheme to a particular theory T , you need a form of interpolation mechanism for T . ◮ Designing an efficient mechanism for the full theory of bitvectors is difficult. So we do it for 2 fragments of the theory: ◮ Equality + concatenation and extraction of bitvectors ◮ A fragment of bitvector arithmetic Outside these fragments we use a less efficient, but generic, procedure. ◮ The approach is implemented in SRI’s SMT-solver Yices. ◮ We experimented it on the SMTLib benchmarks. 2/32

  3. Overview of MCSAT The bitvector theory in MCSAT Experimentation on the SMTLib benchmarks Conclusion 3/32

  4. 1. Overview of MCSAT 4/32

  5. The model-constructing approach to SMT-solving 1/2 MCSAT introduced in [dMJ13, JBdM13, Jov17], inspired by multiple contributions including Conflict Resolution [KTV09] and specific decision procedures for theories such as non-linear arithmetic [JdM12]. 5/32

  6. The model-constructing approach to SMT-solving 1/2 MCSAT introduced in [dMJ13, JBdM13, Jov17], inspired by multiple contributions including Conflict Resolution [KTV09] and specific decision procedures for theories such as non-linear arithmetic [JdM12]. MCSAT tailored to theories with a standard model used for evaluating constraints (example: arithmetic) Evaluation is a key aspect of MCSAT 5/32

  7. The model-constructing approach to SMT-solving 1/2 MCSAT introduced in [dMJ13, JBdM13, Jov17], inspired by multiple contributions including Conflict Resolution [KTV09] and specific decision procedures for theories such as non-linear arithmetic [JdM12]. MCSAT tailored to theories with a standard model used for evaluating constraints (example: arithmetic) Evaluation is a key aspect of MCSAT Solving satisfiability problem (set of constraints on variables x 1 , . . . , x n ) = finding values for variables x 1 , . . . , x n (so that constraints evaluate to true) 5/32

  8. The model-constructing approach to SMT-solving 1/2 MCSAT introduced in [dMJ13, JBdM13, Jov17], inspired by multiple contributions including Conflict Resolution [KTV09] and specific decision procedures for theories such as non-linear arithmetic [JdM12]. MCSAT tailored to theories with a standard model used for evaluating constraints (example: arithmetic) Evaluation is a key aspect of MCSAT Solving satisfiability problem (set of constraints on variables x 1 , . . . , x n ) = finding values for variables x 1 , . . . , x n (so that constraints evaluate to true) MCSAT offers: ◮ a template for decision procedures ◮ an integration of such procedures with Boolean reasoning ◮ new possibilities for combining theories [JBdM13, BGLS19] 5/32

  9. The model-constructing approach to SMT-solving 1/2 MCSAT introduced in [dMJ13, JBdM13, Jov17], inspired by multiple contributions including Conflict Resolution [KTV09] and specific decision procedures for theories such as non-linear arithmetic [JdM12]. MCSAT tailored to theories with a standard model used for evaluating constraints (example: arithmetic) Evaluation is a key aspect of MCSAT Solving satisfiability problem (set of constraints on variables x 1 , . . . , x n ) = finding values for variables x 1 , . . . , x n (so that constraints evaluate to true) MCSAT offers: ◮ a template for decision procedures ◮ an integration of such procedures with Boolean reasoning ◮ new possibilities for combining theories [JBdM13, BGLS19] The template is a generalisation of how CDCL works, the core calculus of SAT-solvers. Run = alternation of search phases and conflict analysis phases 5/32

  10. The model-constructing approach to SMT-solving 2/2 ◮ Like CDCL’s trail assigns Boolean values to Boolean variables, MCSAT’s trail assigns ◮ Boolean values to theory atoms; these constitute theory contraints ◮ model values to first-order variables (e.g., x ← 3 / 4) 6/32

  11. The model-constructing approach to SMT-solving 2/2 ◮ Like CDCL’s trail assigns Boolean values to Boolean variables, MCSAT’s trail assigns ◮ Boolean values to theory atoms; these constitute theory contraints ◮ model values to first-order variables (e.g., x ← 3 / 4) ◮ As in CDCL, MCSAT successively guesses assignments. . . . . . while maintaining the invariant that no constraint evaluates to false according to the assignments ; 6/32

  12. The model-constructing approach to SMT-solving 2/2 ◮ Like CDCL’s trail assigns Boolean values to Boolean variables, MCSAT’s trail assigns ◮ Boolean values to theory atoms; these constitute theory contraints ◮ model values to first-order variables (e.g., x ← 3 / 4) ◮ As in CDCL, MCSAT successively guesses assignments. . . . . . while maintaining the invariant that no constraint evaluates to false according to the assignments ; ◮ To pick a value for variable y after x 1 , . . . , x n were assigned values v 1 , . . . , v n , simply worry about constraints over variables x 1 , . . . , x n , y (i.e. constraints that have become unit in y ) 6/32

  13. The model-constructing approach to SMT-solving 2/2 ◮ Like CDCL’s trail assigns Boolean values to Boolean variables, MCSAT’s trail assigns ◮ Boolean values to theory atoms; these constitute theory contraints ◮ model values to first-order variables (e.g., x ← 3 / 4) ◮ As in CDCL, MCSAT successively guesses assignments. . . . . . while maintaining the invariant that no constraint evaluates to false according to the assignments ; ◮ To pick a value for variable y after x 1 , . . . , x n were assigned values v 1 , . . . , v n , simply worry about constraints over variables x 1 , . . . , x n , y (i.e. constraints that have become unit in y ) ◮ If all variables get values while maintaining invariant: SAT . illustration on the next slide. 6/32

  14. Search phase (satisfiable case) Free var within Constraints (unit ones in red) Feasible set Var C 1 1 , . . . , C 1 { x 1 } j , . . . x 1 C 2 1 , C 2 2 , . . . , C 2 { x 1 , x 2 } j , . . . x 2 C 3 1 , C 3 2 , . . . , C 3 { x 1 , x 2 , x 3 } j , . . . x 3 . . . C i 1 , C i 2 , . . . , C i 42 , . . . , C i { x 1 , . . . , x i } j , . . . x i 7/32

  15. Search phase (satisfiable case) Free var within Constraints (unit ones in red) Feasible set Var C 1 1 , . . . , C 1 { x 1 } j , . . . x 1 C 2 1 , C 2 2 , . . . , C 2 { x 1 , x 2 } j , . . . x 2 C 3 1 , C 3 2 , . . . , C 3 { x 1 , x 2 , x 3 } j , . . . x 3 . . . C i 1 , C i 2 , . . . , C i 42 , . . . , C i { x 1 , . . . , x i } j , . . . x i 7/32

  16. Search phase (satisfiable case) Free var within Constraints (unit ones in red) Feasible set Var C 1 1 , . . . , C 1 { x 1 } j , . . . x 1 C 2 1 , C 2 2 , . . . , C 2 { x 1 , x 2 } j , . . . x 2 C 3 1 , C 3 2 , . . . , C 3 { x 1 , x 2 , x 3 } j , . . . x 3 . . . C i 1 , C i 2 , . . . , C i 42 , . . . , C i { x 1 , . . . , x i } j , . . . x i 7/32

  17. Search phase (satisfiable case) Free var within Constraints (unit ones in red) Feasible set Var C 1 1 , . . . , C 1 { x 1 } j , . . . x 1 C 2 1 , C 2 2 , . . . , C 2 { x 1 , x 2 } j , . . . x 2 C 3 1 , C 3 2 , . . . , C 3 { x 1 , x 2 , x 3 } j , . . . x 3 . . . C i 1 , C i 2 , . . . , C i 42 , . . . , C i { x 1 , . . . , x i } j , . . . x i 7/32

  18. Search phase (satisfiable case) Free var within Constraints (unit ones in red) Feasible set Var C 1 1 , . . . , C 1 { x 1 } j , . . . x 1 C 2 1 , C 2 2 , . . . , C 2 { x 1 , x 2 } j , . . . x 2 C 3 1 , C 3 2 , . . . , C 3 { x 1 , x 2 , x 3 } j , . . . x 3 . . . C i 1 , C i 2 , . . . , C i 42 , . . . , C i { x 1 , . . . , x i } j , . . . x i 7/32

  19. Search phase (satisfiable case) Free var within Constraints (unit ones in red) Feasible set Var C 1 1 , . . . , C 1 { x 1 } j , . . . x 1 C 2 1 , C 2 2 , . . . , C 2 { x 1 , x 2 } j , . . . x 2 C 3 1 , C 3 2 , . . . , C 3 { x 1 , x 2 , x 3 } j , . . . x 3 . . . C i 1 , C i 2 , . . . , C i 42 , . . . , C i { x 1 , . . . , x i } j , . . . x i SAT 7/32

  20. Search phase (conflict case) Free var within Constraints (unit ones in red) Feasible set Var C 1 1 , . . . , C 1 { x 1 } j , . . . x 1 C 2 1 , C 2 2 , . . . , C 2 { x 1 , x 2 } j , . . . x 2 C 3 1 , C 3 2 , . . . , C 3 { x 1 , x 2 , x 3 } j , . . . x 3 . . . C i 1 , C i 2 , . . . , C i 42 , . . . , C i { x 1 , . . . , x i } j , . . . x i 7/32

  21. Search phase (conflict case) Free var within Constraints (unit ones in red) Feasible set Var C 1 1 , . . . , C 1 { x 1 } j , . . . x 1 C 2 1 , C 2 2 , . . . , C 2 { x 1 , x 2 } j , . . . x 2 C 3 1 , C 3 2 , . . . , C 3 { x 1 , x 2 , x 3 } j , . . . x 3 . . . C i 1 , C i 2 , . . . , C i 42 , . . . , C i { x 1 , . . . , x i } j , . . . x i 7/32

  22. Search phase (conflict case) Free var within Constraints (unit ones in red) Feasible set Var C 1 1 , . . . , C 1 { x 1 } j , . . . x 1 C 2 1 , C 2 2 , . . . , C 2 { x 1 , x 2 } j , . . . x 2 C 3 1 , C 3 2 , . . . , C 3 { x 1 , x 2 , x 3 } j , . . . x 3 . . . C i 1 , C i 2 , . . . , C i 42 , . . . , C i { x 1 , . . . , x i } j , . . . x i 7/32

  23. Search phase (conflict case) Free var within Constraints (unit ones in red) Feasible set Var C 1 1 , . . . , C 1 { x 1 } j , . . . x 1 C 2 1 , C 2 2 , . . . , C 2 { x 1 , x 2 } j , . . . x 2 C 3 1 , C 3 2 , . . . , C 3 { x 1 , x 2 , x 3 } j , . . . x 3 . . . C i 1 , C i 2 , . . . , C i 42 , . . . , C i { x 1 , . . . , x i } j , . . . x i 7/32

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