January 12, 2018 Strategy Synthesis for Linear Arithmetic Games Azadeh Farzan 1 Zachary Kincaid 2 1 University of Toronto 2 Princeton University
• Functional synthesis • Reactive synthesis Many problems in formal methods can be formulated as logical games . • inputs, output s.t. specification holds • event , response s.t. avoid bad state and event , response s.t. avoid bad state and This paper: Algorithms for synthesizing winning strategies for satisfiability and reachability games in the theory of linear arithmetic.
• Reactive synthesis Many problems in formal methods can be formulated as logical games . • event , response s.t. avoid bad state and event , response s.t. avoid bad state and This paper: Algorithms for synthesizing winning strategies for satisfiability and reachability games in the theory of linear arithmetic. • Functional synthesis • ∀ inputs, ∃ output s.t. specification holds
Many problems in formal methods can be formulated as logical games . This paper: Algorithms for synthesizing winning strategies for satisfiability and reachability games in the theory of linear arithmetic. • Functional synthesis • ∀ inputs, ∃ output s.t. specification holds • Reactive synthesis • ∀ event 1 , ∃ response 1 s.t. avoid bad state and ∀ event 2 , ∃ response 2 s.t. avoid bad state and · · ·
Many problems in formal methods can be formulated as logical games . This paper: Algorithms for synthesizing winning strategies for satisfiability and reachability games in the theory of linear arithmetic. • Functional synthesis • ∀ inputs, ∃ output s.t. specification holds • Reactive synthesis • ∀ event 1 , ∃ response 1 s.t. avoid bad state and ∀ event 2 , ∃ response 2 s.t. avoid bad state and · · ·
Satisfjability games
• A play of this game: SAT and UNSAT take turns picking elements of Game interpretation is satisfiable • matrix. The SAT player wins if the corresponding structure is a model of the z y x w . SAT has a winning strategy quantifier prefix matrix ϕ ≜ ∃ w . ∀ x . ∃ y . ∀ z . ( y < 1 ∨ 2 w < y ) ∧ ( z < y ∨ x < z ) � �� � � �� � • Two players: SAT and UNSAT • SAT wants to make the formula true • UNSAT wants to make the formula false
The SAT player wins if the corresponding structure is a model of the Game interpretation w is satisfiable • matrix. z y x SAT has a winning strategy matrix quantifier prefix ϕ ≜ ∃ w . ∀ x . ∃ y . ∀ z . ( y < 1 ∨ 2 w < y ) ∧ ( z < y ∨ x < z ) � �� � � �� � • Two players: SAT and UNSAT • SAT wants to make the formula true • UNSAT wants to make the formula false • A play of this game: SAT and UNSAT take turns picking elements of Q . [ ]
The SAT player wins if the corresponding structure is a model of the Game interpretation matrix is satisfiable • matrix. z y x SAT has a winning strategy quantifier prefix ϕ ≜ ∃ w . ∀ x . ∃ y . ∀ z . ( y < 1 ∨ 2 w < y ) ∧ ( z < y ∨ x < z ) � �� � � �� � • Two players: SAT and UNSAT • SAT wants to make the formula true • UNSAT wants to make the formula false • A play of this game: SAT and UNSAT take turns picking elements of Q . [ w �→ 1; ]
The SAT player wins if the corresponding structure is a model of the Game interpretation matrix is satisfiable • matrix. z y SAT has a winning strategy quantifier prefix ϕ ≜ ∃ w . ∀ x . ∃ y . ∀ z . ( y < 1 ∨ 2 w < y ) ∧ ( z < y ∨ x < z ) � �� � � �� � • Two players: SAT and UNSAT • SAT wants to make the formula true • UNSAT wants to make the formula false • A play of this game: SAT and UNSAT take turns picking elements of Q . [ w �→ 1; x �→ 2 3; ]
The SAT player wins if the corresponding structure is a model of the Game interpretation matrix is satisfiable • matrix. z SAT has a winning strategy quantifier prefix ϕ ≜ ∃ w . ∀ x . ∃ y . ∀ z . ( y < 1 ∨ 2 w < y ) ∧ ( z < y ∨ x < z ) � �� � � �� � • Two players: SAT and UNSAT • SAT wants to make the formula true • UNSAT wants to make the formula false • A play of this game: SAT and UNSAT take turns picking elements of Q . [ w �→ 1; x �→ 2 3; y �→ − 1; ]
The SAT player wins if the corresponding structure is a model of the Game interpretation matrix is satisfiable • matrix. SAT has a winning strategy quantifier prefix ϕ ≜ ∃ w . ∀ x . ∃ y . ∀ z . ( y < 1 ∨ 2 w < y ) ∧ ( z < y ∨ x < z ) � �� � � �� � • Two players: SAT and UNSAT • SAT wants to make the formula true • UNSAT wants to make the formula false • A play of this game: SAT and UNSAT take turns picking elements of Q . [ w �→ 1; x �→ 2 3; y �→ − 1; z �→ 1]
Game interpretation matrix is satisfiable • matrix. The SAT player wins if the corresponding structure is a model of the SAT has a winning strategy quantifier prefix ϕ ≜ ∃ w . ∀ x . ∃ y . ∀ z . ( y < 1 ∨ 2 w < y ) ∧ ( z < y ∨ x < z ) � �� � � �� � • Two players: SAT and UNSAT • SAT wants to make the formula true • UNSAT wants to make the formula false • A play of this game: SAT and UNSAT take turns picking elements of Q . [ w �→ 1; x �→ 2 3; y �→ − 1; z �→ 1]
Game interpretation quantifier prefix matrix. The SAT player wins if the corresponding structure is a model of the matrix ϕ ≜ ∃ w . ∀ x . ∃ y . ∀ z . ( y < 1 ∨ 2 w < y ) ∧ ( z < y ∨ x < z ) � �� � � �� � • Two players: SAT and UNSAT • SAT wants to make the formula true • UNSAT wants to make the formula false • A play of this game: SAT and UNSAT take turns picking elements of Q . [ w �→ 1; x �→ 2 3; y �→ − 1; z �→ 1] • ϕ is satisfiable ⇐ ⇒ SAT has a winning strategy
least upper bound Winning strategy: lub x y if x y then x else y ∀ x . ∀ y . ∃ lub . lub ≥ x ∧ lub ≥ y ∧ [ ∀ ub . ( ub ≥ x ∧ ub ≥ y ) = ⇒ ub ≥ lub ] � �� � � �� �
Winning strategy: lub x y if x y then x else y ∀ x . ∀ y . ∃ lub . ∀ ub . lub ≥ x ∧ lub ≥ y ∧ [( ub ≥ x ∧ ub ≥ y ) = ⇒ ub ≥ lub ]
Winning strategy: ∀ x . ∀ y . ∃ lub . ∀ ub . lub ≥ x ∧ lub ≥ y ∧ [( ub ≥ x ∧ ub ≥ y ) = ⇒ ub ≥ lub ] lub ( x , y ) = if x ≥ y then x else y
beats beats beats beats beats X improves X U n SimSat: SAT via mutual strategy improvement S n [Farzan & Kincaid, IJCAI 2016] U S U improves S 0
beats beats beats beats X improves X U n SimSat: SAT via mutual strategy improvement S n [Farzan & Kincaid, IJCAI 2016] U S improves S 0 beats U 1
beats beats beats S n improves X U n X SimSat: SAT via mutual strategy improvement [Farzan & Kincaid, IJCAI 2016] U improves S 0 S 1 beats beats U 1
beats beats SimSat: SAT via mutual strategy improvement S n improves X U n X improves [Farzan & Kincaid, IJCAI 2016] S 0 S 1 beats beats beats · · · U 1 U 2
beats SimSat: SAT via mutual strategy improvement [Farzan & Kincaid, IJCAI 2016] improves X U n X S n improves S 0 S 1 beats beats beats beats · · · U 1 U 2
beats SimSat: SAT via mutual strategy improvement [Farzan & Kincaid, IJCAI 2016] improves X U n X S n improves S 0 S 1 beats beats beats beats · · · U 1 U 2
beats SimSat: SAT via mutual strategy improvement [Farzan & Kincaid, IJCAI 2016] improves X U n X S n improves S 0 S 1 beats beats beats beats · · · U 1 U 2
Strategy skeletons x y x improves ∀ x . ∀ y . ∃ lub . ∀ ub . lub ≥ x ∧ lub ≥ y ∧ [( ub ≥ x ∧ ub ≥ y ) = ⇒ ub ≥ lub ] • ∀ x ∀ y • x ≥ y y ≥ x ∃ lub • • ∀ ub
Strategy skeletons x x y y x y improves x ∀ x . ∀ y . ∃ lub . ∀ ub . lub ≥ x ∧ lub ≥ y ∧ [( ub ≥ x ∧ ub ≥ y ) = ⇒ ub ≥ lub ] • ∀ x ∀ y • ∃ lub • • ∀ ub
Strategy skeletons x x y y x y x improves ∀ x . ∀ y . ∃ lub . ∀ ub . lub ≥ x ∧ lub ≥ y ∧ [( ub ≥ x ∧ ub ≥ y ) = ⇒ ub ≥ lub ] • • ∀ x ∀ y • • ∃ lub • • • ∀ ub
From skeletons to strategies y y x ? x ∀ x . ∀ y . ∃ lub . ∀ ub . lub ≥ x ∧ lub ≥ y ∧ [( ub ≥ x ∧ ub ≥ y ) = ⇒ ub ≥ lub ] • • • • x ≤ 0 x > 0 • • • •
• F i uses only symbols common to descendents & non-descendents • label of root is false • For all nodes n i • conjunction of children’s labels implies F i Given tree with leaves labeled by formulas s.t. the conjunction of all labels F i We can find labels for internal nodes s.t.: F F F Tree interpolation (special case) is inconsistent: n 1 n 2 n 3 n 4 n 5 n 6 n 7 F 4 F 5 F 6 F 7
• F i uses only symbols common to descendents & non-descendents • label of root is false • For all nodes n i • conjunction of children’s labels implies F i Given tree with leaves labeled by formulas s.t. the conjunction of all labels F i We can find labels for internal nodes s.t.: Tree interpolation (special case) is inconsistent: n 1 F 1 F 2 F 3 n 2 n 3 n 4 n 5 n 6 n 7 F 4 F 5 F 6 F 7
Recommend
More recommend