Nah. This Tildy-Thingy Looks Much Better ⊲ Allows to express the update: “ y is x with f → v ” := y ∼ f x ∧ y [ f ] v ⊲ Equivalence relation: y ∼ f x ⇐ ⇒ x ∼ f y y ∼ f x ∧ x ∼ f z = ⇒ y ∼ f z ⊲ Other properties: y ∼ f x ∧ x ∼ g z = ⇒ y ∼ { f,g } z y ∼ f x ∧ y ∼ g x ⇐ ⇒ y ∼ ∅ x ⊲ Allows to remove variables: � y is x with f → v � ∃ x · ∧ z is x with g → w 10/24
Nah. This Tildy-Thingy Looks Much Better ⊲ Allows to express the update: “ y is x with f → v ” := y ∼ f x ∧ y [ f ] v ⊲ Equivalence relation: y ∼ f x ⇐ ⇒ x ∼ f y y ∼ f x ∧ x ∼ f z = ⇒ y ∼ f z ⊲ Other properties: y ∼ f x ∧ x ∼ g z = ⇒ y ∼ { f,g } z y ∼ f x ∧ y ∼ g x ⇐ ⇒ y ∼ ∅ x ⊲ Allows to remove variables: � y ∼ f x ∧ y [ f ] v � ∃ x · ∧ z ∼ g x ∧ z [ g ] w 10/24
Nah. This Tildy-Thingy Looks Much Better ⊲ Allows to express the update: “ y is x with f → v ” := y ∼ f x ∧ y [ f ] v ⊲ Equivalence relation: y ∼ f x ⇐ ⇒ x ∼ f y y ∼ f x ∧ x ∼ f z = ⇒ y ∼ f z ⊲ Other properties: y ∼ f x ∧ x ∼ g z = ⇒ y ∼ { f,g } z y ∼ f x ∧ y ∼ g x ⇐ ⇒ y ∼ ∅ x ⊲ Allows to remove variables: � y ∼ f x ∧ y [ f ] v � ∃ x · ↔ y [ f ] v ∧ z [ g ] w ∧ z ∼ g x ∧ z [ g ] w 10/24
Nah. This Tildy-Thingy Looks Much Better ⊲ Allows to express the update: “ y is x with f → v ” := y ∼ f x ∧ y [ f ] v ⊲ Equivalence relation: y ∼ f x ⇐ ⇒ x ∼ f y y ∼ f x ∧ x ∼ f z = ⇒ y ∼ f z ⊲ Other properties: y ∼ f x ∧ x ∼ g z = ⇒ y ∼ { f,g } z y ∼ f x ∧ y ∼ g x ⇐ ⇒ y ∼ ∅ x ⊲ Allows to remove variables: � y ∼ f x ∧ y [ f ] v � ∃ x · ↔ y [ f ] v ∧ z [ g ] w ∧ y ∼ { f,g } z ∧ z ∼ g x ∧ z [ g ] w 10/24
Model and Examples FT = F � FT ⊲ F infinite set of features (names for the edges); ⊲ F � FT : partial function with finite domain; 11/24
Model and Examples FT = F � FT ⊲ F infinite set of features (names for the edges); ⊲ F � FT : partial function with finite domain; t 1 t 2 t 3 g g g f f f h i h h g f h 11/24
Constraints and their Interpretation x . = y Equality x [ f ] y Feature x [ f ] ↑ Absence x [ F ] Fence x ∼ F y Similarity ⊲ x , y variables. ⊲ f ∈ F , F ⊂ F finite. 12/24
Constraints and their Interpretation x . FT , ρ | = = y Equality iff FT , ρ | = x [ f ] y Feature iff FT , ρ | = x [ f ] ↑ Absence iff FT , ρ | = x [ F ] Fence iff FT , ρ | = x ∼ F y Similarity iff ⊲ x , y variables. ⊲ f ∈ F , F ⊂ F finite. ⊲ ρ a valuation from variables to FT . 12/24
Constraints and their Interpretation x . FT , ρ | = = y ρ ( x ) = ρ ( y ) Equality iff FT , ρ | = x [ f ] y Feature iff FT , ρ | = x [ f ] ↑ Absence iff FT , ρ | = x [ F ] Fence iff FT , ρ | = x ∼ F y Similarity iff ⊲ x , y variables. ⊲ f ∈ F , F ⊂ F finite. ⊲ ρ a valuation from variables to FT . 12/24
Constraints and their Interpretation x . FT , ρ | = = y ρ ( x ) = ρ ( y ) Equality iff FT , ρ | = x [ f ] y ρ ( x )( f ) = ρ ( y ) Feature iff FT , ρ | = x [ f ] ↑ Absence iff FT , ρ | = x [ F ] Fence iff FT , ρ | = x ∼ F y Similarity iff ⊲ x , y variables. ⊲ f ∈ F , F ⊂ F finite. ⊲ ρ a valuation from variables to FT . 12/24
Constraints and their Interpretation x . FT , ρ | = = y ρ ( x ) = ρ ( y ) Equality iff FT , ρ | = x [ f ] y ρ ( x )( f ) = ρ ( y ) Feature iff FT , ρ | = x [ f ] ↑ f / ∈ dom ( ρ ( x )) Absence iff FT , ρ | = x [ F ] Fence iff FT , ρ | = x ∼ F y Similarity iff ⊲ x , y variables. ⊲ f ∈ F , F ⊂ F finite. ⊲ ρ a valuation from variables to FT . 12/24
Constraints and their Interpretation x . FT , ρ | = = y ρ ( x ) = ρ ( y ) Equality iff FT , ρ | = x [ f ] y ρ ( x )( f ) = ρ ( y ) Feature iff FT , ρ | = x [ f ] ↑ f / ∈ dom ( ρ ( x )) Absence iff FT , ρ | = x [ F ] dom ( ρ ( x )) ⊆ F Fence iff FT , ρ | = x ∼ F y Similarity iff ⊲ x , y variables. ⊲ f ∈ F , F ⊂ F finite. ⊲ ρ a valuation from variables to FT . 12/24
Constraints and their Interpretation x . FT , ρ | = = y ρ ( x ) = ρ ( y ) Equality iff FT , ρ | = x [ f ] y ρ ( x )( f ) = ρ ( y ) Feature iff FT , ρ | = x [ f ] ↑ f / ∈ dom ( ρ ( x )) Absence iff FT , ρ | = x [ F ] dom ( ρ ( x )) ⊆ F Fence iff FT , ρ | = x ∼ F y ρ ( x ) ↾ F = ρ ( y ) ↾ F Similarity iff ⊲ x , y variables. ⊲ f ∈ F , F ⊂ F finite. ⊲ ρ a valuation from variables to FT . 12/24
Examples (Again) t 1 t 2 t 3 g g g f i h f f h h g f h The following constraints are satisfied in FT , [ x → t 1 , y → t 2 , z → t 3 ] : z [ f ] x, x [ i ] ↑ , x [ { f, g, h, i } ] , x ∼ { i } y, x ∼ { h,i } y 13/24
Existential Fragment 14/24
Existential Fragment ⊲ Constraint system for symbolic execution. 15/24
Existential Fragment ⊲ Constraint system for symbolic execution. ⊲ Existential quantification on the outside. 15/24
Existential Fragment ⊲ Constraint system for symbolic execution. ⊲ Existential quantification on the outside. ⊲ “Saturation” system: 15/24
Existential Fragment ⊲ Constraint system for symbolic execution. ⊲ Existential quantification on the outside. ⊲ “Saturation” system: ⊲ that terminates, 15/24
Existential Fragment ⊲ Constraint system for symbolic execution. ⊲ Existential quantification on the outside. ⊲ “Saturation” system: ⊲ that terminates, ⊲ that keeps equivalences, 15/24
Existential Fragment ⊲ Constraint system for symbolic execution. ⊲ Existential quantification on the outside. ⊲ “Saturation” system: ⊲ that terminates, ⊲ that keeps equivalences, ⊲ with nice properties on the normal form. 15/24
Existential Fragment ⊲ Constraint system for symbolic execution. ⊲ Existential quantification on the outside. ⊲ “Saturation” system: ⊲ that terminates, ⊲ that keeps equivalences, ⊲ with nice properties on the normal form. ⊲ Normal form: incremental. 15/24
Existential Fragment ⊲ Constraint system for symbolic execution. ⊲ Existential quantification on the outside. ⊲ “Saturation” system: ⊲ that terminates, ⊲ that keeps equivalences, ⊲ with nice properties on the normal form. ⊲ Normal form: incremental. ⊲ The rules come from properties of the constructions. 15/24
Rules with the Feature Constraint Clash Rules x [ f ] y ∧ x [ f ] ↑ C-F EAT -A BS x [ f ] y ∧ x [ F ] ( f / ∈ F ) C-F EAT -F EN 16/24
Rules with the Feature Constraint Clash Rules x [ f ] y ∧ x [ f ] ↑ C-F EAT -A BS x [ f ] y ∧ x [ F ] ( f / ∈ F ) C-F EAT -F EN Simplification Rules ∃ X, z · ( x [ f ] y ∧ x [ f ] z ∧ c ) S-F EATS ⇒ ∃ X · ( x [ f ] y ∧ c { z �→ y } ) 16/24
Rules with the Similarity Constraint Propagation Rules x ∼ F y ∧ x [ f ] z ∧ c ( f / ∈ F ) P-F EAT ⇒ x ∼ F y ∧ x [ f ] z ∧ y [ f ] z ∧ c 17/24
Rules with the Similarity Constraint Propagation Rules x ∼ F y ∧ x [ f ] z ∧ c ( f / ∈ F ) P-F EAT ⇒ x ∼ F y ∧ x [ f ] z ∧ y [ f ] z ∧ c x ∼ F y ∧ x [ G ] ∧ c P-F EN ⇒ x ∼ F y ∧ x [ G ] ∧ y [ F ∪ G ] ∧ c 17/24
Rules with the Similarity Constraint Propagation Rules x ∼ F y ∧ x [ f ] z ∧ c ( f / ∈ F ) P-F EAT ⇒ x ∼ F y ∧ x [ f ] z ∧ y [ f ] z ∧ c x ∼ F y ∧ x [ G ] ∧ c P-F EN ⇒ x ∼ F y ∧ x [ G ] ∧ y [ F ∪ G ] ∧ c x ∼ F y ∧ x ∼ G z ∧ c P-S IM ⇒ x ∼ F y ∧ x ∼ G z ∧ y ∼ F ∪ G z ∧ c 17/24
Properties of the Normal Forms Lemma Take a clause c ( � = ⊥ ) [...] c = g ∧ ∃ X · l ⊲ in normal form; 18/24
Properties of the Normal Forms Lemma Take a clause c ( � = ⊥ ) [...] c = g ∧ ∃ X · l ⊲ in normal form; ⊲ such that there is no y [ f ] x with x ∈ X and y / ∈ X . 18/24
Properties of the Normal Forms Lemma Take a clause c ( � = ⊥ ) [...] c = g ∧ ∃ X · l ⊲ in normal form; ⊲ such that there is no y [ f ] x with x ∈ X and y / ∈ X . Then = ˜ FT | ∀ · c ↔ g 18/24
Properties of the Normal Forms Lemma Take a clause c ( � = ⊥ ) [...] c = g ∧ ∃ X · l ⊲ in normal form; ⊲ such that there is no y [ f ] x with x ∈ X and y / ∈ X . Then = ˜ FT | ∀ · c ↔ g ⊲ Corollary: all normal forms ( � = ⊥ ) are satisfiable: = ˜ ⊲ If c is a clause in normal form: FT | ∃ · c 18/24
Properties of the Normal Forms Lemma Take a clause c ( � = ⊥ ) [...] c = g ∧ ∃ X · l ⊲ in normal form; ⊲ such that there is no y [ f ] x with x ∈ X and y / ∈ X . Then = ˜ FT | ∀ · c ↔ g ⊲ Corollary: all normal forms ( � = ⊥ ) are satisfiable: = ˜ ⊲ If c is a clause in normal form: FT | ∃ · c ⊲ We can “garbage collect” the normal forms to make them smaller. 18/24
Garbage Collection r 0 usr x 0 lib y 0 19/24
Garbage Collection r 0 usr x 0 lib y 0 ⊲ mkdir /usr/lib/ocaml; 19/24
Garbage Collection ∼ { usr } r 0 r 1 usr usr ∼ { lib } x 0 x 1 lib lib ∼ { ocaml } y 0 y 1 ocaml ocaml z 1 [ ∅ ] ⊲ mkdir /usr/lib/ocaml; ⊲ Normal form: satisfiable 19/24
Garbage Collection ∼ { usr } r 0 r 1 usr usr ∼ { lib } x 0 x 1 lib lib ∼ { ocaml } y 0 y 1 ocaml ocaml z 1 [ ∅ ] ⊲ mkdir /usr/lib/ocaml; ⊲ Normal form: satisfiable ⊲ mkdir /usr/lib/haskell; 19/24
Garbage Collection ∼ { usr } ∼ { usr } r 0 r 1 r 2 usr usr usr ∼ { lib } ∼ { lib } x 0 x 1 x 2 lib lib lib ∼ { ocaml } ∼ { haskell } y 0 y 1 y 2 ocaml haskell ocaml haskell z 1 [ ∅ ] w 2 [ ∅ ] ⊲ mkdir /usr/lib/ocaml; ⊲ mkdir /usr/lib/haskell; 19/24
Garbage Collection ∼ { usr } ∼ { usr } r 0 r 1 r 2 usr usr usr ∼ { lib } ∼ { lib } x 0 x 1 x 2 lib lib lib ∼ { ocaml } ∼ { haskell } y 0 y 1 y 2 ocaml haskell ocaml ocaml haskell haskell z 1 z 1 [ ∅ ] w 2 [ ∅ ] ⊲ mkdir /usr/lib/ocaml; ⊲ mkdir /usr/lib/haskell; 19/24
Garbage Collection ∼ { usr } ∼ { usr } r 0 r 1 r 2 usr usr usr ∼ { lib } ∼ { lib } x 0 x 1 x 2 lib lib lib ∼ { ocaml } ∼ { haskell } y 0 y 1 y 2 ocaml haskell ocaml ocaml haskell haskell z 1 z 1 [ ∅ ] w 2 [ ∅ ] ⊲ mkdir /usr/lib/ocaml; ⊲ Normal form: satisfiable ⊲ mkdir /usr/lib/haskell; 19/24
Garbage Collection ∼ { usr } ∼ { usr } r 0 r 1 r 2 usr usr usr ∼ { lib } ∼ { lib } x 0 x 1 x 2 lib lib lib ∼ { ocaml } ∼ { haskell } y 0 y 1 y 2 ocaml haskell ocaml ocaml haskell haskell z 1 z 1 [ ∅ ] w 2 [ ∅ ] ⊲ mkdir /usr/lib/ocaml; ⊲ Normal form: satisfiable ⊲ mkdir /usr/lib/haskell; 19/24
Garbage Collection ∼ { usr } r 0 r 2 usr usr ∼ { lib } x 0 x 2 lib lib ∼ { ocaml , haskell } y 0 y 2 ocaml haskell ocaml haskell z 1 [ ∅ ] w 2 [ ∅ ] ⊲ mkdir /usr/lib/ocaml; ⊲ Normal form: satisfiable ⊲ mkdir /usr/lib/haskell; 19/24
First Order 20/24
Quantifier Switching ⊲ What can we express with local variables? ∃ x · ( y [ f ] x ∧ x [ g ] ↑ ) 21/24
Quantifier Switching ⊲ What can we express with local variables? ∃ x · ( y [ f ] x ∧ x [ g ] ↑ ) ⊲ Usually: add predicates to the language that cover these cases ⊲ Here: predicates about paths (hard to work with). 21/24
Quantifier Switching ⊲ What can we express with local variables? ∃ x · ( y [ f ] x ∧ x [ g ] ↑ ) ⊲ Usually: add predicates to the language that cover these cases ⊲ Here: predicates about paths (hard to work with). ⊲ The feature constraint is a function: ∃ X, x · ( y [ f ] x ∧ c ) y / ∈ X F EAT -F UN ⇒ ¬ y [ f ] ↑ ∧∀ x · ( y [ f ] x → ∃ X · ( y [ f ] x ∧ c )) y � = x 21/24
Quantifier Switching ⊲ What can we express with local variables? ∃ x · ( y [ f ] x ∧ x [ g ] ↑ ) ⊲ Usually: add predicates to the language that cover these cases ⊲ Here: predicates about paths (hard to work with). ⊲ The feature constraint is a function: ∃ X, x · ( y [ f ] x ∧ c ) y / ∈ X F EAT -F UN ⇒ ¬ y [ f ] ↑ ∧∀ x · ( y [ f ] x → ∃ X · ( y [ f ] x ∧ c )) y � = x ⊲ In the example: ¬ y [ f ] ↑ ∧∀ x · ( y [ f ] x → x [ g ] ↑ ) 21/24
How Does That Help? ∃ X, x · ( y [ f ] x ∧ c ) y / ∈ X F EAT -F UN ⇒ ¬ y [ f ] ↑ ∧∀ x · ( y [ f ] x → ∃ X · ( y [ f ] x ∧ c )) y � = x 22/24
How Does That Help? ∃ X, x · ( y [ f ] x ∧ c ) y / ∈ X F EAT -F UN ⇒ ¬ y [ f ] ↑ ∧∀ x · ( y [ f ] x → ∃ X · ( y [ f ] x ∧ c )) y � = x Lemma (reminder) Take a clause c ( � = ⊥ ) [...] c = g ∧ ∃ X · l ⊲ in normal form; ⊲ such that there is no y [ f ] x with x ∈ X and y / ∈ X . Then = ˜ FT | ∀ · c ↔ g 22/24
How Does That Help? ∃ X, x · ( y [ f ] x ∧ c ) y / ∈ X F EAT -F UN ⇒ ¬ y [ f ] ↑ ∧∀ x · ( y [ f ] x → ∃ X · ( y [ f ] x ∧ c )) y � = x Lemma (reminder) Take a clause c ( � = ⊥ ) [...] c = g ∧ ∃ X · l ⊲ in normal form; ⊲ such that there is no y [ f ] x with x ∈ X and y / ∈ X . Then = ˜ FT | ∀ · c ↔ g ⊲ F EAT -F UN puts us in the hypothesis of the lemma. 22/24
How Does That Help? ∃ X, x · ( y [ f ] x ∧ c ) y / ∈ X F EAT -F UN ⇒ ¬ y [ f ] ↑ ∧∀ x · ( y [ f ] x → ∃ X · ( y [ f ] x ∧ c )) y � = x Lemma (reminder) Take a clause c ( � = ⊥ ) [...] c = g ∧ ∃ X · l ⊲ in normal form; ⊲ such that there is no y [ f ] x with x ∈ X and y / ∈ X . Then = ˜ FT | ∀ · c ↔ g ⊲ F EAT -F UN puts us in the hypothesis of the lemma. ⊲ Switch an existential quantification into an universal one. 22/24
How Does That Help? ∃ X, x · ( y [ f ] x ∧ c ) y / ∈ X F EAT -F UN ⇒ ¬ y [ f ] ↑ ∧∀ x · ( y [ f ] x → ∃ X · ( y [ f ] x ∧ c )) y � = x Lemma (reminder) Take a clause c ( � = ⊥ ) [...] c = g ∧ ∃ X · l ⊲ in normal form; ⊲ such that there is no y [ f ] x with x ∈ X and y / ∈ X . Then = ˜ FT | ∀ · c ↔ g ⊲ F EAT -F UN puts us in the hypothesis of the lemma. ⊲ Switch an existential quantification into an universal one. ⊲ We can go for a weak quantifier elimination. 22/24
Weak Quantifier Elimination ⊲ If we have a procedure: ∃ X · c ⇒ ∀ Y · c ′ 23/24
Recommend
More recommend