an mcsat treatment of bit vectors work in progress
play

An MCSAT treatment of Bit-Vectors (work-in-progress) Stphane - PowerPoint PPT Presentation

An MCSAT treatment of Bit-Vectors (work-in-progress) Stphane Graham-Lengrand and Dejan Jovanovi CNRS - SRI International SMT workshop, 23rd July 2017 1/19 The model-constructing approach to SMT-solving MCSAT introduced in [dMJ13, JBdM13,


  1. An MCSAT treatment of Bit-Vectors (work-in-progress) Stéphane Graham-Lengrand and Dejan Jovanović CNRS - SRI International SMT workshop, 23rd July 2017 1/19

  2. The model-constructing approach to SMT-solving MCSAT introduced in [dMJ13, JBdM13, Jov17], following work on specific decision procedures for theories such as non-linear arithmetic [JdM12]. 2/19

  3. The model-constructing approach to SMT-solving MCSAT introduced in [dMJ13, JBdM13, Jov17], following work on specific decision procedures for theories such as non-linear arithmetic [JdM12]. MCSAT offers: ◮ a template for decision procedures ◮ an integration of such procedures with Boolean reasoning ◮ new possibilities for combining procedures [JBdM13, BGLS17] 2/19

  4. The model-constructing approach to SMT-solving MCSAT introduced in [dMJ13, JBdM13, Jov17], following work on specific decision procedures for theories such as non-linear arithmetic [JdM12]. MCSAT offers: ◮ a template for decision procedures ◮ an integration of such procedures with Boolean reasoning ◮ new possibilities for combining procedures [JBdM13, BGLS17] The template is a generalisation of how CDCL works. Run = alternation of search phases and conflict analysis phases Boolean theory can be given the same status as other theories. 2/19

  5. The model-constructing approach to SMT-solving MCSAT introduced in [dMJ13, JBdM13, Jov17], following work on specific decision procedures for theories such as non-linear arithmetic [JdM12]. MCSAT offers: ◮ a template for decision procedures ◮ an integration of such procedures with Boolean reasoning ◮ new possibilities for combining procedures [JBdM13, BGLS17] The template is a generalisation of how CDCL works. Run = alternation of search phases and conflict analysis phases Boolean theory can be given the same status as other theories. Terms and literals are created that do not belong to the input problem. 2/19

  6. Search phase 1. For each variable awaiting a value, track the set of feasible values (those not yet ruled out by the current constraints) 3/19

  7. Search phase 1. For each variable awaiting a value, track the set of feasible values (those not yet ruled out by the current constraints) 2. For one of the variables, pick a value out of that set. 3/19

  8. Search phase 1. For each variable awaiting a value, track the set of feasible values (those not yet ruled out by the current constraints) 2. For one of the variables, pick a value out of that set. 3. With that choice, some of the constraints may become unit : all of their free variables are assigned a value but one. 3/19

  9. Search phase 1. For each variable awaiting a value, track the set of feasible values (those not yet ruled out by the current constraints) 2. For one of the variables, pick a value out of that set. 3. With that choice, some of the constraints may become unit : all of their free variables are assigned a value but one. 4. See whether and how those new constraints unit in y restrict the feasible values for y , and update that set 3/19

  10. Search phase 1. For each variable awaiting a value, track the set of feasible values (those not yet ruled out by the current constraints) 2. For one of the variables, pick a value out of that set. 3. With that choice, some of the constraints may become unit : all of their free variables are assigned a value but one. 4. See whether and how those new constraints unit in y restrict the feasible values for y , and update that set 5. Repeat until all variables are assigned values & all constraints are satisfied or one of these sets becomes empty: there is a conflict 3/19

  11. Search phase 1. For each variable awaiting a value, track the set of feasible values (those not yet ruled out by the current constraints) 2. For one of the variables, pick a value out of that set. 3. With that choice, some of the constraints may become unit : all of their free variables are assigned a value but one. 4. See whether and how those new constraints unit in y restrict the feasible values for y , and update that set 5. Repeat until all variables are assigned values & all constraints are satisfied or one of these sets becomes empty: there is a conflict Simple process: we only look at what the constraints say once they become unit. Until then, we simply maintain for each constraint a watch list of variables, to detect when they become unit (as in CDCL). 3/19

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

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

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

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

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

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

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

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

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

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

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

  23. Implementing the set of feasible values for y This has to be a data-structure with operations for 1. updating the set whenever a new constraint becomes unit in y , 2. detecting when the set becomes empty, and 3. proposing a value from the feasible set. 6/19

  24. Implementing the set of feasible values for y This has to be a data-structure with operations for 1. updating the set whenever a new constraint becomes unit in y , 2. detecting when the set becomes empty, and 3. proposing a value from the feasible set. This is theory-dependent: ◮ For LRA, this can be an interval 6/19

  25. Implementing the set of feasible values for y This has to be a data-structure with operations for 1. updating the set whenever a new constraint becomes unit in y , 2. detecting when the set becomes empty, and 3. proposing a value from the feasible set. This is theory-dependent: ◮ For LRA, this can be an interval ◮ For bit-vectors, [ZWR16] use the combination of ◮ an interval, e.g. [0000 , 0010] (understanding bitvectors in arithmetic modulo) ◮ and a pattern imposing the value of some of the bits, e.g. ???1 6/19

  26. Alternative proposition: Use a Binary Decision Diagram (BDD) over the bits of y . 7/19

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