combinations of theories for decidable fragments of first
play

Combinations of Theories for Decidable Fragments of First-order - PowerPoint PPT Presentation

Combinations of Theories for Decidable Fragments of First-order Logic Pascal Fontaine Loria, INRIA, Universit de Nancy (France) Montreal August 2, 2009 Montreal, August 2, 2009 1 / 15 Introduction Context / Motivation


  1. Combinations of Theories for Decidable Fragments of First-order Logic Pascal Fontaine Loria, INRIA, Université de Nancy (France) Montreal August 2, 2009 Montreal, August 2, 2009 1 / 15

  2. Introduction Context / Motivation www.verit-solver.org Satisfiability Modulo Theories SMT Combination of theories: uninterpreted symbols, arithmetic Satisfiability checking for formulas like � � a ≤ b ∧ b ≤ a + x ∧ x = 0 ∧ f ( a ) � = f ( b ) ∨ ( p ( a ) ∧ ¬ p ( b + x )) Proof obligations for verification of distributed algorithm: B, TLA+ specifications Extend the language with operators for sets, relations,. . . Montreal, August 2, 2009 2 / 15

  3. Introduction Introducing sets: operators operator Definition ∈ λ xp . p ( x ) ∩ λ pq . λ x . p ( x ) ∧ q ( x ) \ λ pq . λ x . p ( x ) ∧ ¬ q ( x ) ⊆ λ pq . ∀ x . p ( x ) ⇒ q ( x ) . . . . . . transitive λ r . ∀ xyz . [ r ( x , y ) ∧ r ( y , z )] ⇒ r ( x , z ) . . . . . . λ r . ∀ xyz . r ( x , y , z ) = r ( y , z , x ) = r ( z , x , y ) permutation introduces quantifiers sat. checking in combination of initial theories + FOL theory Montreal, August 2, 2009 3 / 15

  4. Introduction Introducing sets: an example For example : a = b ∧ ( { f ( a ) } ∪ E ) ⊆ A ∧ f ( b ) �∈ C ∧ A ∪ B = C ∩ D becomes a = b ∧ ∀ x [( x = f ( a ) ∨ E ( x )) ⇒ A ( x )] ∧ ¬ C ( f ( b )) ∧ ∀ x . [ A ( x ) ∨ B ( x )] ≡ [ C ( x ) ∧ D ( x )] quantifiers come from second-order equalities, operators that contain quantifiers but the obtained FOL theory is BSR: ∃ ∗ ∀ ∗ ϕ ( ϕ function- and quantifier-free), and (for sets) monadic Montreal, August 2, 2009 4 / 15

  5. Introduction Motivation - problem - solution Motivation: extend the language of SMT solvers with operators on sets, relations,. . . Problem: combine a Bernays-Schönfinkel-Ramsey theory with a decidable fragment (the initial language of the SMT solver) It is indeed possible to combine a decidable theory from the BSR, monadic, or two variable classes, with (nearly) any decidable theory Montreal, August 2, 2009 5 / 15

  6. FOL decidable classes and combinations FOL decidable classes and combinations SMT solvers: satisfiability checking of (quantifier-free) formulas in a static combination of theories theories: disjoint, FOL, equational, decidable, stably infinite e.g. empty theory, linear arithmetic, arrays, lists, bitvectors Some major decidable equational FOL theories: Bernays-Schönfinkel-Ramsey: ∃ ∗ ∀ ∗ ϕ ( ϕ function- and quantifier-free) two-variables relational fragment monadic first-order logic Those theories are not stably infinite: ∀ x ∀ y x = y Nelson-Oppen not applicable Montreal, August 2, 2009 6 / 15

  7. FOL decidable classes and combinations Combining disjoint decision procedures (1) A combination of disjoint languages: � � L = x ≤ y , y ≤ x + f ( x ) , P ( h ( x ) − h ( y )) , ¬ P ( 0 ) , f ( x ) = 0 uninterpreted symbols ( P , f , h ), and arithmetic ( + , − , ≤ , 0 ). Combination of disjoint decision procedures Combination of the empty theory and theory for linear arithmetic (both stably-infinite) Separation using new variables: � � = x ≤ y , y ≤ x + v 1 , v 1 = 0 , v 2 = v 3 − v 4 , v 5 = 0 L 1 � � = P ( v 2 ) , ¬ P ( v 5 ) , v 1 = f ( x ) , v 3 = h ( x ) , v 4 = h ( y ) L 2 . L and L 1 ∪ L 2 both satisfiable or both unsatisfiable. Montreal, August 2, 2009 7 / 15

  8. FOL decidable classes and combinations Combining disjoint decision procedures (2) Cooperation by exchanging equalities: = { x ≤ y , y ≤ x + v 1 , v 1 = 0 , v 2 = v 3 − v 4 , v 5 = 0 } L 1 L 2 = { P ( v 2 ) , ¬ P ( v 5 ) , v 1 = f ( x ) , v 3 = h ( x ) , v 4 = h ( y ) } From L 1 , x = y : L 1 = { x ≤ y , y ≤ x + v 1 , v 1 = 0 , v 2 = v 3 − v 4 , v 5 = 0 } L ′ = { P ( v 2 ) , ¬ P ( v 5 ) , v 1 = f ( x ) , v 3 = h ( x ) , v 4 = h ( y ) , x = y } 2 From L ′ 2 , v 3 = v 4 : L ′ = { x ≤ y , y ≤ x + v 1 , v 1 = 0 , v 2 = v 3 − v 4 , v 5 = 0 , v 3 = v 4 } 1 L ′ = { P ( v 2 ) , ¬ P ( v 5 ) , v 1 = f ( x ) , v 3 = h ( x ) , v 4 = h ( y ) , x = y } 2 From L ′ 1 , v 2 = v 5 : L ′ = { x ≤ y , y ≤ x + v 1 , v 1 = 0 , v 2 = v 3 − v 4 , v 5 = 0 , v 3 = v 4 } 1 L ′′ = { P ( v 2 ) , ¬ P ( v 5 ) , v 1 = f ( x ) , v 3 = h ( x ) , v 4 = h ( y ) , x = y , v 2 = v 5 } 2 L ′′ 2 is unsatisfiable. Montreal, August 2, 2009 8 / 15

  9. FOL decidable classes and combinations Combining disjoint decision procedures (2) Cooperation by exchanging equalities: = { x ≤ y , y ≤ x + v 1 , v 1 = 0 , v 2 = v 3 − v 4 , v 5 = 0 } L 1 L 2 = { P ( v 2 ) , ¬ P ( v 5 ) , v 1 = f ( x ) , v 3 = h ( x ) , v 4 = h ( y ) } From L 1 , x = y : L 1 = { x ≤ y , y ≤ x + v 1 , v 1 = 0 , v 2 = v 3 − v 4 , v 5 = 0 } L ′ = { P ( v 2 ) , ¬ P ( v 5 ) , v 1 = f ( x ) , v 3 = h ( x ) , v 4 = h ( y ) , x = y } 2 From L ′ 2 , v 3 = v 4 : L ′ = { x ≤ y , y ≤ x + v 1 , v 1 = 0 , v 2 = v 3 − v 4 , v 5 = 0 , v 3 = v 4 } 1 L ′ = { P ( v 2 ) , ¬ P ( v 5 ) , v 1 = f ( x ) , v 3 = h ( x ) , v 4 = h ( y ) , x = y } 2 From L ′ 1 , v 2 = v 5 : L ′ = { x ≤ y , y ≤ x + v 1 , v 1 = 0 , v 2 = v 3 − v 4 , v 5 = 0 , v 3 = v 4 } 1 L ′′ = { P ( v 2 ) , ¬ P ( v 5 ) , v 1 = f ( x ) , v 3 = h ( x ) , v 4 = h ( y ) , x = y , v 2 = v 5 } 2 L ′′ 2 is unsatisfiable. Montreal, August 2, 2009 8 / 15

  10. FOL decidable classes and combinations Combining disjoint decision procedures (2) Cooperation by exchanging equalities: = { x ≤ y , y ≤ x + v 1 , v 1 = 0 , v 2 = v 3 − v 4 , v 5 = 0 } L 1 L 2 = { P ( v 2 ) , ¬ P ( v 5 ) , v 1 = f ( x ) , v 3 = h ( x ) , v 4 = h ( y ) } From L 1 , x = y : L 1 = { x ≤ y , y ≤ x + v 1 , v 1 = 0 , v 2 = v 3 − v 4 , v 5 = 0 } L ′ = { P ( v 2 ) , ¬ P ( v 5 ) , v 1 = f ( x ) , v 3 = h ( x ) , v 4 = h ( y ) , x = y } 2 From L ′ 2 , v 3 = v 4 : L ′ = { x ≤ y , y ≤ x + v 1 , v 1 = 0 , v 2 = v 3 − v 4 , v 5 = 0 , v 3 = v 4 } 1 L ′ = { P ( v 2 ) , ¬ P ( v 5 ) , v 1 = f ( x ) , v 3 = h ( x ) , v 4 = h ( y ) , x = y } 2 From L ′ 1 , v 2 = v 5 : L ′ = { x ≤ y , y ≤ x + v 1 , v 1 = 0 , v 2 = v 3 − v 4 , v 5 = 0 , v 3 = v 4 } 1 L ′′ = { P ( v 2 ) , ¬ P ( v 5 ) , v 1 = f ( x ) , v 3 = h ( x ) , v 4 = h ( y ) , x = y , v 2 = v 5 } 2 L ′′ 2 is unsatisfiable. Montreal, August 2, 2009 8 / 15

  11. FOL decidable classes and combinations Combining disjoint decision procedures (2) Cooperation by exchanging equalities: = { x ≤ y , y ≤ x + v 1 , v 1 = 0 , v 2 = v 3 − v 4 , v 5 = 0 } L 1 L 2 = { P ( v 2 ) , ¬ P ( v 5 ) , v 1 = f ( x ) , v 3 = h ( x ) , v 4 = h ( y ) } From L 1 , x = y : L 1 = { x ≤ y , y ≤ x + v 1 , v 1 = 0 , v 2 = v 3 − v 4 , v 5 = 0 } L ′ = { P ( v 2 ) , ¬ P ( v 5 ) , v 1 = f ( x ) , v 3 = h ( x ) , v 4 = h ( y ) , x = y } 2 From L ′ 2 , v 3 = v 4 : L ′ = { x ≤ y , y ≤ x + v 1 , v 1 = 0 , v 2 = v 3 − v 4 , v 5 = 0 , v 3 = v 4 } 1 L ′ = { P ( v 2 ) , ¬ P ( v 5 ) , v 1 = f ( x ) , v 3 = h ( x ) , v 4 = h ( y ) , x = y } 2 From L ′ 1 , v 2 = v 5 : L ′ = { x ≤ y , y ≤ x + v 1 , v 1 = 0 , v 2 = v 3 − v 4 , v 5 = 0 , v 3 = v 4 } 1 L ′′ = { P ( v 2 ) , ¬ P ( v 5 ) , v 1 = f ( x ) , v 3 = h ( x ) , v 4 = h ( y ) , x = y , v 2 = v 5 } 2 L ′′ 2 is unsatisfiable. Montreal, August 2, 2009 8 / 15

  12. FOL decidable classes and combinations Combining disj. DPs : “unsatisfiable” scenario Dec. Proc. 1 Dec. Proc. 2 deduced (disj. of) equality deduced (disj. of) equality Sound : every deduced fact is a consequence of the original deduced (disj. of) equality set of formulas UNSAT Montreal, August 2, 2009 9 / 15

  13. FOL decidable classes and combinations Combining disj. DPs : “satisfiable” scenario Dec. Proc. 1 Dec. Proc. 2 deduced (disj. of) equality Really SAT? (Complete?) deduced (disj. of) equality all disjunctions of equalities propagated deduced (disj. of) equality models agree on No more deducible (disj. of) eq. cardinalities Model 1 Model 2 Model 1 + 2 Montreal, August 2, 2009 10 / 15

  14. FOL decidable classes and combinations Combining disj. DPs : “satisfiable” scenario Dec. Proc. 1 Dec. Proc. 2 deduced (disj. of) equality Really SAT? (Complete?) deduced (disj. of) equality all disjunctions of equalities propagated deduced (disj. of) equality models agree on No more deducible (disj. of) eq. cardinalities Model 1 Model 2 Model 1 + 2 Montreal, August 2, 2009 10 / 15

  15. FOL decidable classes and combinations Ensuring agreement on cardinalities? Different frameworks (and capabilities) Nelson-Oppen: requirement on theories: stably infinite (not suitable for BSR) if satisfiable, there is an infinite model (FOL theories ⇒ ℵ 0 ) Combining with the empty theory (and some others): the empty theory does not constraint much the cardinalities . . . Montreal, August 2, 2009 11 / 15

  16. FOL decidable classes and combinations Cardinalities and decidable fragments Decidable classes Bernays-Schönfinkel-Ramsey: ∃ ∗ ∀ ∗ ϕ ( ϕ function- and quantifier-free) two-variables relational fragment monadic first-order logic all have following property (pumping theorem) for every theory, there is a computable k such that, if there is a model of cardinality ≥ k , there is a model of every cardinality ≥ k . The set of cardinalities is the finite or cofinite set: � � S T ∪ κ | κ is a cardinality ∧ κ ≥ k ( T ) with S T ⊂ N computable and finite, and k ( T ) computable ( T is gentle). Montreal, August 2, 2009 12 / 15

Recommend


More recommend