First-order Relational Logic Research Road-map Relational Specification Evaluation Using SMT Solvers in Finding Finite Models and Cores for Relational Logic Ferhat Erata 1 , 2 Ruzica Piskac 1 1 Yale University, Computer Science, New Haven, CT, USA 2 UNIT Information Technologies Ltd., Izmir, Turkey The 27th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering, Tallinn, Estonia 26–30 August, 2019 F. Erata et. al. Using SMT Solvers in Relational Logic
First-order Relational Logic Research Road-map Relational Specification Evaluation Information Technology for European Advancement (ITEA) ITEA-ModelWriter: Synchronized Document Engineering Platform https://itea3.org/project/modelwriter.html ITEA-ASSUME: Affordable Safe & Secure Mobility Evolution https://itea3.org/project/assume.html ITEA-XIVT: eXcellence In Variant Testing https://itea3.org/project/xivt.html F. Erata et. al. Using SMT Solvers in Relational Logic
First-order Relational Logic Research Road-map Relational Specification Evaluation European Cooperation in Science and Technology (COST) IC1404 Multi-Paradigm Modelling for Cyber-Physical Systems http://www.cost.eu/COST_Actions/ict/IC1404 IC1402 Runtime Verification beyond Monitoring http://www.cost.eu/COST_Actions/ict/IC1402 F. Erata et. al. Using SMT Solvers in Relational Logic
First-order Relational Logic Research Road-map Relational Specification Evaluation Outline First-order Relational Logic 1 Applications of Alloy Alloy Demonstration Research Road-map 2 Relational Specification 3 Universe and Bounds Constraints Outcome Evaluation 4 F. Erata et. al. Using SMT Solvers in Relational Logic
First-order Relational Logic Applications of Alloy Research Road-map Grammar Relational Specification Alloy Demonstration Evaluation Applications of Alloy Access Control and Security Policies. Feature Modeling and Analysis Domain Specific Languages and Modeling. Testing and Automated Test Case Generation Software Architecture Configuration and Reconfiguration, Data Structure Repair Program verification. Databases. Model-Driven Development. Network Protocols Requirements F. Erata et. al. Using SMT Solvers in Relational Logic
First-order Relational Logic Applications of Alloy Research Road-map Grammar Relational Specification Alloy Demonstration Evaluation Front-end Universe and Bounds problem ::= universe relDecl ∗ formula ∗ universe ::= { atom ∗ } relDecl ::= relation : arity [ constant , constant ] constant ::= { tuple ∗ } tuple ::= � atom ∗ � arity ::= positiveinteger relation ::= identifier atom ::= identifier F. Erata et. al. Using SMT Solvers in Relational Logic
formula ::= expr ⊂ expr (subset) | expr = expr (equality) | some expr (at least one) | one expr (exactly one) | lone expr (at most one) | no expr (empty) | ¬ formula (negation) | formula ∧ formula (conjuction) | formula ∨ formula (disjunction) (implication) | formula ⇒ formula | formula ⇔ formula (biimplication) | ( ∀ | ∃ | ∃ ! | ∄ ) varDecls | formula (universal) | intexpr { < | ≤ | = | > | ≥ } intexpr (comparison) F. Erata et. al. Using SMT Solvers in Relational Logic
formula ::= expr in expr (subset) | expr = expr (equality) | some expr (at least one) | one expr (exactly one) | lone expr (at most one) | no expr (empty) | ! formula (negation) | formula and formula (conjuction) | formula or formula (disjunction) (implication) | formula implies formula | formula iff formula (biimplication) | ( all | some | one | no ) varDecls | formula (universal) | intexpr { < | ≤ | = | > | ≥ } intexpr (comparison) F. Erata et. al. Using SMT Solvers in Relational Logic
expr ::= var (variable) | expr = expr (equality) | ∼ expr (transpose) | ˆ expr (clousure) | expr ∪ expr (union) | expr ∩ expr (intersection) | expr \ expr (difference) | expr � expr (join) | expr × expr (product) (comprehension) | { varDecls | formula } | univ (universal set) | none (empty set) | iden (identity) F. Erata et. al. Using SMT Solvers in Relational Logic
expr ::= var (variable) | expr = expr (equality) | ∼ expr (transpose) | ˆ expr (clousure) | expr + expr (union) | expr & expr (intersection) | expr − expr (difference) | expr · expr (join) | expr → expr (product) (comprehension) | { varDecls | formula } | univ (universal set) | none (empty set) | iden (identity) F. Erata et. al. Using SMT Solvers in Relational Logic
intexpr ::= integer (literal) | # expr (cardinality) | sum ( expr ) (sum) | intexpr { + | − | × | ÷} intexpr (arithmetic) varDecls ::= ( variable : expr ) ∗ variable ::= identifier F. Erata et. al. Using SMT Solvers in Relational Logic
First-order Relational Logic Applications of Alloy Research Road-map Grammar Relational Specification Alloy Demonstration Evaluation Alloy Demonstration A Lisp-like List datatype L i s t = N i l | Cons of Element ∗ L i s t F. Erata et. al. Using SMT Solvers in Relational Logic
Research Road-map F. Erata et. al. Using SMT Solvers in Relational Logic
First-order Relational Logic Theory of Lists Research Road-map Universe and Bounds Relational Specification Constraints Evaluation Outcome KodKod Walktrough A Lisp-like List datatype L i s t = N i l | Cons of Element ∗ L i s t F. Erata et. al. Using SMT Solvers in Relational Logic
First-order Relational Logic Theory of Lists Research Road-map Universe and Bounds Relational Specification Constraints Evaluation Outcome Universe { o 0 , o 1 , l 0 , l 1 , l 2 , l 3 , l 4 , l 5 } Bounds List : 1 [ {� l 0 � , � l 1 � , � l 2 � , � l 3 � , � l 4 � , � l 5 �} ] Object : 1 [ {� o 0 � , � o 1 �} ] Nil : 1 [ {} , {� l 0 � , � l 1 � , � l 2 � , � l 3 � , � l 4 � , � l 5 �} ] : 2 [ {� l 4 , o 1 � , � l 3 , o 0 � , � l 2 , o 0 � , � l 1 , o 1 �} , car {� x , y � | x : List ∧ y : Object } ] cdr : 2 [ {� l 4 , l 3 � , � l 3 , l 0 � , � l 2 , l 0 � , � l 1 , l 2 �} , {� x , y � | x : List ∧ y : List } ] eq : 2 [ {} , {� x , y � | x : List ∧ y : List } ] F. Erata et. al. Using SMT Solvers in Relational Logic
First-order Relational Logic Theory of Lists Research Road-map Universe and Bounds Relational Specification Constraints Evaluation Outcome Universe { o 0 , o 1 , l 0 , l 1 , l 2 , l 3 , l 4 , l 5 } F. Erata et. al. Using SMT Solvers in Relational Logic
First-order Relational Logic Theory of Lists Research Road-map Universe and Bounds Relational Specification Constraints Evaluation Outcome Universe { o 0 , o 1 , l 0 , l 1 , l 2 , l 3 , l 4 , l 5 } KodKod API 1 String L i s t 0 = " L i s t 0 "; String L i s t 1 = " L i s t 1 "; 2 String L i s t 2 = " L i s t 2 "; String L i s t 3 = " L i s t 3 "; 3 String L i s t 4 = " L i s t 4 "; String L i s t 5 = " L i s t 5 "; 4 String Object0 = " Object0 "; 5 String Object1 = " Object1 "; 6 7 u n i v e r s e = new Universe ( List0 , List1 , Universe 8 List2 , List3 , List4 , List5 , Object0 , Object1 ) ; F. Erata et. al. Using SMT Solvers in Relational Logic
First-order Relational Logic Theory of Lists Research Road-map Universe and Bounds Relational Specification Constraints Evaluation Outcome Translation ( declare − datatypes () (( univ ( Object !1) ( Object !1) ( L i s t !0) ( L i s t !1) . . . ( L i s t !4) ( L i s t ! 5 ) ) ) ( declare − fun Object ( univ ) Bool ) ( declare − fun L i s t ( univ ) Bool ) . . . ( declare − fun eq ( univ univ ) Bool ) ( assert ( Object Object0 )) ( assert ( Object Object1 )) ( assert ( L i s t L i s t 0 )) . . . ( assert ( cdr L i s t 1 L i s t 2 )) F. Erata et. al. Using SMT Solvers in Relational Logic
First-order Relational Logic Theory of Lists Research Road-map Universe and Bounds Relational Specification Constraints Evaluation Outcome Axioms 1 . Nil is a List. 2 . Nil is a singleton. 3 . Nil list has neither car nor cdr . 4 . A Non-nil List has some car and cdr . 5 . Nil is always reachable from any List . 6 . Two lists are equal iff the objects they point to are same and the Lists they point are equal. 7 . car relation is a partial function. F. Erata et. al. Using SMT Solvers in Relational Logic
First-order Relational Logic Theory of Lists Research Road-map Universe and Bounds Relational Specification Constraints Evaluation Outcome Axioms 1 . Nil ⊆ List 2 . one Nil 3 . no ( Nil . cdr ∪ Nil . car ) 4 . ∀ l : List − Nil | some ( l . cdr ) ∧ some ( l . car ) (constraints) 5 . ∀ l : List | Nil ⊆ ( l . ∗ cdr ) 6 . ∀ a , b : List | a ⊆ b . eq iff ( a . car = b . car ) ∧ ( a . cdr ⊆ ( b . cdr ) . eq ) 7 . ∀ l : List | lone ( l . car ) F. Erata et. al. Using SMT Solvers in Relational Logic
First-order Relational Logic Theory of Lists Research Road-map Universe and Bounds Relational Specification Constraints Evaluation Outcome Alloy ( a l l l : one L i s t | lone ( l . car )) KodKod API 1 L i s t = Relation . unary (" L i s t " ) ; Relation 2 car = Relation . b inary (" car " ) ; Relation 3 l = Variable . unary (" l " ) ; Variable 4 Formula f1 = l . join ( car ) . lone () 5 . f o r A l l ( l . oneOf ( L i s t ) ) ; F. Erata et. al. Using SMT Solvers in Relational Logic
Recommend
More recommend