variant based decidable satisfiability in initial
play

Variant-Based Decidable Satisfiability in Initial Algebras with - PowerPoint PPT Presentation

Variant-Based Decidable Satisfiability in Initial Algebras with Predicates errez 1 e Meseguer 2 Ra ul Guti Jos 1 DSIC, Universitat Polit` ecnica de Val` encia, Spain 2 University of Illinois at Urbana-Champaign,Illinois, USA Namur


  1. Variant-Based Decidable Satisfiability in Initial Algebras with Predicates errez 1 e Meseguer 2 Ra´ ul Guti´ Jos´ 1 DSIC, Universitat Polit` ecnica de Val` encia, Spain 2 University of Illinois at Urbana-Champaign,Illinois, USA Namur (Belgium), October 11, 2017 R. Guti´ errez & J. Meseguer (UPV & UIUC) VAR-PRED Namur, October 11, 2017 1 / 23

  2. Motivation Motivation 1 Some of the most recent advances in software verification are due to the systematic use of decision procedures in model checkers and theorem provers. 2 For a system specified by theory T , SMT solving can partially automate verification by using procedures for decidable subtheories T i . 3 Limitation of SMT tools: lack of extensibility of decidable fragment. 4 Users can extend a specification’s decidable fragment if theory-generic decision procedures are added. 5 Variant-based satisfiability (VS): a decision procedure for initial algebras T Σ / E ∪ B generic on theories (Σ , E ∪ B ) under quite general conditions. 6 Limitation: current VS algorithm applies well to user-definable data structures, but cannot handle user-definable predicates. R. Guti´ errez & J. Meseguer (UPV & UIUC) VAR-PRED Namur, October 11, 2017 2 / 23

  3. Motivation Goal Goal Extend variant-based satisfiability to initial algebras with user-definable predicates under fairly general conditions using two key ideas: 1 characterizing the cases when p ( u 1 , . . . , u n ) � = tt by means of constrained patterns; and 2 eliminating all occurrences of disequalities of the form p ( u 1 , . . . , u n ) � = tt in a quantifier-free (QF) formula by means of such patterns. R. Guti´ errez & J. Meseguer (UPV & UIUC) VAR-PRED Namur, October 11, 2017 3 / 23

  4. Motivation Outline 1 Motivation 2 Variant Satisfiability 3 Predicates 4 OS-compactness 5 Negative Patterns 6 Inductive Satisfiability Decision Procedure 7 Implementation 8 Conclusions R. Guti´ errez & J. Meseguer (UPV & UIUC) VAR-PRED Namur, October 11, 2017 4 / 23

  5. Variant Satisfiability Example: Sets of Natural Numbers (Σ , E ∪ B ) fmod ACU-NAT is fmod ACU-NAT-FUN is sort Natural . pr ACU-NAT . op 0 : -> Natural [ctor] . op max : Natural Natural -> Natural op 1 : -> Natural [ctor] . [comm] . op _+_ : Natural Natural -> Natural op min : Natural Natural -> Natural [ctor assoc comm id: 0] . [comm] . endfm op _-_ : Natural Natural -> Natural . *** monus vars N M : Natural . eq max(N,N + M) = N + M [variant] . eq min(N,N + M) = N [variant] . eq N - (N + M) = 0 [variant]. eq (N + M) - N = M [variant] . endfm R. Guti´ errez & J. Meseguer (UPV & UIUC) VAR-PRED Namur, October 11, 2017 5 / 23

  6. Variant Satisfiability Example: Sets of Natural Numbers (Σ , E ∪ B ) fmod ACU-NAT-SET is pr ACU-NAT . vars NS NS’ : NaturalSet . sort NaturalSet . sort Pred . *** identity of set union eq NS , mt = NS [variant] . subsort Natural < NaturalSet . *** idempotency of set union eq NS , NS = NS [variant] . op mt : -> NaturalSet [ctor] . *** idempotency of set union op _,_ : NaturalSet NaturalSet -> eq NS , NS , NS’ = NS , NS’ NaturalSet [ctor assoc comm] . [variant] . op tt : -> Pred [ctor] . *** set containment eq mt =C NS = tt [variant] . op _=C_ : NaturalSet NaturalSet -> eq NS =C NS = tt [variant] . Pred [ctor] . eq NS =C NS , NS’ = tt [variant] . endfm R. Guti´ errez & J. Meseguer (UPV & UIUC) VAR-PRED Namur, October 11, 2017 6 / 23

  7. Variant Satisfiability Variants Given a decomposition R = (Σ , B , � E ) of a MS equational theory (Σ , E ) and a Σ-term t , a variant of t is a pair ( u , θ ) such that: • u = B ( t θ )! � E , B , • dom ( θ ) ⊆ vars ( t ), and • θ = θ ! � E , B , that is, θ ( x ) = θ ( x )! � E , B for all variables x . ( u , θ ) is called a ground variant iff, furthermore, u ∈ T Σ . Given variants ( u , θ ) and ( v , γ ) of t , ( u , θ ) is called more general than ( v , γ ), denoted ( u , θ ) ⊒ B ( v , γ ), iff there is a substitution ρ such that: • ( θρ ) | vars ( t ) = B γ , and • u ρ = B v . Let � t � � E , B = { ( u i , θ i ) | i ∈ I } denote a complete set of variants of t , that is, a set of variants such that for any variant ( v , γ ) of t there is an i ∈ I , such that ( u i , θ i ) ⊒ B ( v , γ ). R. Guti´ errez & J. Meseguer (UPV & UIUC) VAR-PRED Namur, October 11, 2017 7 / 23

  8. Variant Satisfiability Example: Variants get variants in ACU-NAT-FUN : get variants in ACU-NAT-FUN: min(1, N:Natural + K:Natural) . N:Natural - K:Natural . Variant #1 Variant #1 Natural: min(1, N:Natural + K:Natural) Natural: N:Natural - K:Natural Variant #2 Variant #2 Natural: 1 Natural: 0 K:Natural --> 1 + K1:Natural K:Natural --> K1:Natural + N:Natural Variant #3 Variant #3 Natural: 1 Natural: N1:Natural N:Natural --> 1 + N1:Natural N:Natural --> N1:Natural + K:Natural Variant #4 Natural: 0 N:Natural --> 0 K:Natural --> 0 R. Guti´ errez & J. Meseguer (UPV & UIUC) VAR-PRED Namur, October 11, 2017 8 / 23

  9. Variant Satisfiability Finite Variant Property • A decomposition R = (Σ , B , R ) has the finite variant property (FVP) iff for each Σ-term t there is a finite complete set of variants � t � R , B = { ( u 1 , θ 1 ) . . . ( u n , θ n ) } . • If B has a finitary B -unification algorithm, and R = (Σ , B , R ) has FVP, � t � R , B can be chosen to be the set of most general variants. Note FVP easy to check when it holds. Example: ACU-NAT-SET is FVP. R. Guti´ errez & J. Meseguer (UPV & UIUC) VAR-PRED Namur, October 11, 2017 9 / 23

  10. Predicates Representing Predicates • A predicate is viewed as a function symbol p : s 1 . . . s n → Pred , with Pred a new sort having constant tt . • An atomic formula p ( t 1 , . . . , t n ) is then expressed as the equation p ( t 1 , . . . , t n ) = tt . R. Guti´ errez & J. Meseguer (UPV & UIUC) VAR-PRED Namur, October 11, 2017 10 / 23

  11. Predicates Example: Predicates on Sets of Natural Numbers fmod ACU-NAT-SET-PREDS is pr ACU-NAT-SET . *** strict order op _>_ : Natural Natural -> Pred [ctor] . *** sort predicates op natural : NaturalSet -> Pred [ctor] . op even : NaturalSet -> Pred [ctor] . op odd : NaturalSet -> Pred [ctor] . vars N M : Natural . eq N + M + 1 > N = tt [variant] . eq natural(N) = tt [variant] . eq even(N + N) = tt [variant] . eq odd(N + N + 1) = tt [variant] . endfm R. Guti´ errez & J. Meseguer (UPV & UIUC) VAR-PRED Namur, October 11, 2017 11 / 23

  12. Predicates Constructor Variants Question What variants of t cover as instances modulo B all canonical forms of all ground instances of t ? Let R = (Σ , B , R ) be an FVP decomposition of (Σ , E ) protecting a constructor decomposition R Ω = (Ω , B Ω , R Ω ). Assume that: • Σ = Ω ∪ ∆ with Ω ∩ ∆ = ∅ ; • B has a finitary B -unification algorithm and B = B Ω ⊎ B ∆ , with B Ω Ω-equations and if u = v ∈ B ∆ , u , v are non-variable ∆-terms. Call � t � Ω R , B = { ( v , θ ) ∈ � t � R , B | v ∈ T Ω ( X ) } the set of constructor variants of t . Answer If [ u ] ∈ C R Ω is of the form u = B ( t γ )! R , B , then there is ( v , θ ) ∈ � t � Ω R , B and a normalized ground substitution τ such that u = B v τ . R. Guti´ errez & J. Meseguer (UPV & UIUC) VAR-PRED Namur, October 11, 2017 12 / 23

  13. OS-compactness OS-Compactness An equational OS-FO theory (Σ , E ) is called OS-compact iff: • for each sort s in Σ we can effectively determine whether s is finite or infinite in T Σ / E , s , and, if finite, can effectively compute a representative ground term rep ([ u ]) ∈ [ u ] for each [ u ] ∈ T Σ / E , s ; • = E is decidable and E has a finitary unification algorithm; and • any finite conjunction � D of negated Σ-atoms whose variables all have infinite sorts and such that � D is E -consistent is satisfiable in T Σ , E . Call an OS theory (Σ , E ) OS-compact iff OS-FO theory (Σ , E ) is OS-compact. Theorem If (Σ , E ) is an OS-compact theory, then satisfiability of QF Σ-formulas in T Σ , E is decidable. R. Guti´ errez & J. Meseguer (UPV & UIUC) VAR-PRED Namur, October 11, 2017 13 / 23

  14. OS-compactness Current Variant Satisfiability Theorem 1 If (Ω , B Ω ) has B Ω only with ACCU -axioms, then (Ω , B Ω ) is OS-compact. Theorem 2 (Variant Satisfiability) If (Σ , E ∪ B ) if FVP and protects (Ω , B Ω ) with B Ω ⊆ ACCU , then QF satisfiability in (Σ , E ∪ B ) is decidable. R. Guti´ errez & J. Meseguer (UPV & UIUC) VAR-PRED Namur, October 11, 2017 14 / 23

  15. OS-compactness Limitation Question What happens with the user-definable predicates? • p is a constructor operator of sort Pred which is not a free constructor modulo the axioms B Ω . • The OS-compactness of a constructor decomposition R Ω = (Ω , B Ω , R Ω ) can be broken (or be a hard to prove task) when adding user-definable predicates. Solution We provide a decision procedure for validity and satisfiability of QF formulas in the initial algebra of an FVP theory R that may contain user-definable predicates and protects a constructor decomposition R that need not be OS-compact under reasonable assumptions. R. Guti´ errez & J. Meseguer (UPV & UIUC) VAR-PRED Namur, October 11, 2017 15 / 23

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