Symbolic Encodings of Bounded Synthesis Saarland University Peter Faymonville 1 , Bernd Finkbeiner 1 , Markus N. Rabe 2 , Leander Tentrup 1 1 Reactive Systems Group 2 UC Berkeley
Reactive synthesis Synthesis realizable unrealizable bound [Schewe/F. 2007] φ S
Bounded synthesis Synthesis realizable unrealizable [Schewe/F. 2007] bound n φ S
Bounded synthesis e.g. bounded cycle synthesis [F./Klein 2016] ▸ synthesis of systems with minimal # states ▸ basis for other output-sensitive synthesis algorithms, ▸ undecidable synthesis problems, e.g., distributed synthesis , become decidable ▸ complexity split between input and output
TBURST4 (synthesized with Acacia+ v2.3)
TBURST4 (synthesized with bounded synthesis)
TBURST4 (synthesized with bounded cycle synthesis)
Complexity of standard synthesis (in specification) Env Pipeline architectures — NONELEMENTARY Env Env 2-process arbiter architecture — UNDECIDABLE 1-process architectures — 2EXPTIME a b 1 a b c d 3 1 2 r 1 r 2 g 1 1 2 g 2
Complexity of bounded synthesis (in bound) Env Pipeline architectures — NP Env Env 2-process arbiter architecture — NP 1-process architectures — NP a b 1 a b c d 3 1 2 r 1 r 2 g 1 1 2 g 2
Constraint-based bounded synthesis Co-Büchi automaton universal Büchi automaton nondeterministic deterministic automaton emptiness game constraint system specification φ standard bounded
Constraint-based bounded synthesis Co-Büchi automaton universal Büchi automaton nondeterministic deterministic automaton emptiness game constraint system doubly exponential in specification exponential in specification NP in bound specification φ standard bounded
Constraint-based bounded synthesis Co-Büchi automaton universal Büchi automaton nondeterministic deterministic automaton emptiness game constraint system symbolic encoding BDDs, antichains, etc standard encoding (2007): explicit specification φ standard bounded
Constraint-based bounded synthesis Co-Büchi automaton universal Büchi automaton nondeterministic deterministic automaton emptiness game constraint system symbolic encoding BDDs, antichains, etc standard encoding (2007): explicit new encoding (2017): symbolic specification φ standard bounded
Bounded synthesis universal co-Büchi automaton A φ Transition System T ⊺ / g 1 ⊺ t 0 t 1 ⊺ / g 2 q 0 r 1 r 2 q 1 q 2 g 1 g 2 q e g 1 g 2 ⊺ ( r 1 → g 1 ) ∧ ( r 2 → g 2 ) ∧ ¬ ( g 1 ∧ g 2 ) φ =
Run graph of automaton and transition system Run graph with annotation λ ⊺ q 0 r 1 r 2 ⟨ t 0 , q 0 ⟩ ⟨ t 1 , q 0 ⟩ ⟨ t 0 , q e ⟩ q 1 g 1 g 2 q 2 q e λ ∶ 0 λ ∶ 0 λ ∶ � g 1 g 2 ⊺ ⟨ t 1 , q 1 ⟩ ⟨ t 1 , q 2 ⟩ ⟨ t 0 , q 1 ⟩ ⟨ t 0 , q 2 ⟩ ⟨ t 1 , q e ⟩ ⊺ / g 1 t 0 t 1 λ ∶ 1 λ ∶ 2 λ ∶ 2 λ ∶ 1 λ ∶ � ⊺ / g 2
Run graph of automaton and transition system Run graph with annotation λ ⊺ q 0 r 1 r 2 ⟨ t 0 , q 0 ⟩ ⟨ t 1 , q 0 ⟩ ⟨ t 0 , q e ⟩ q 1 g 1 g 2 q 2 q e λ ∶ 0 λ ∶ 0 λ ∶ � g 1 g 2 ⊺ ⟨ t 1 , q 1 ⟩ ⟨ t 1 , q 2 ⟩ ⟨ t 0 , q 1 ⟩ ⟨ t 0 , q 2 ⟩ ⟨ t 1 , q e ⟩ ⊺ / g 1 t 0 t 1 λ ∶ 1 λ ∶ 2 λ ∶ 2 λ ∶ 1 λ ∶ � ⊺ / g 2
Encode the existence of a transition system and a valid annotation Encoding bounded synthesis with constraints ▸ Representation of transition system ▸ states t ∈ T ▸ transitions τ t , i , t ′ ▸ output labeling o t , i ▸ Representation of annotation on run graph T × Q ▸ state occurrence λ B ▸ rejecting bound λ # ⎛ t , q ))⎞ ( δ t , q , i , q ′ → ⋀ ( τ t , i , t ′ → λ B λ B t 0 , q 0 ∧ ⋀ ⎝ λ B t , q → ⋀ t ′ , q ′ ∧ λ # t ′ , q ′ ⊳ q ′ λ # ⋀ ⋀ ⎠ q ∈ Q q ′ ∈ Q i ∈ 2 I t ∈ T t ′ ∈ T
Target logics SAT QBF DQBF ▸ Only existentially quantified boolean variables permitted. ▸ No symbolic encoding of functions. ▸ Universally and existentially quantified boolean variables in total order. ▸ Symbolic encoding of functions with single applications. ▸ Universally and existentially quantified boolean variables in partial order. ▸ Symbolic encoding of functions with multiple applications.
Results of difgerent encodings LTL realizability, SYNTCOMP 2016 experiment set basic SMT state-symbolic fully-symbolic time (sec.) # instances input-symbolic 10 3 10 2 10 1 10 0 10 − 1 10 − 2 0 10 20 30 40 50 70 90 100 110 120 130 140 150 60 80 160
Basic encoding (SAT) Symbolic I T Q ✗ ✗ ✗ ∃ { λ B t , q ∣ t ∈ T , q ∈ Q } t , q , λ # ∃ { τ t , i , t ′ ∣ ( t , t ′ ) ∈ T × T , i ∈ 2 I } ∃ { o t , i ∣ o ∈ O , t ∈ T , i ∈ 2 I }
Basic encoding (SAT) Symbolic I T Q ✗ ✗ ✗ ∃ { λ B t , q ∣ t ∈ T , q ∈ Q } t , q , λ # ∃ { τ t , i , t ′ ∣ ( t , t ′ ) ∈ T × T , i ∈ 2 I } ∃ { o t , i ∣ o ∈ O , t ∈ T , i ∈ 2 I } λ B t 0 , q 0 ∧ ⋀ i ∈ 2 I ⋁ ⋀ τ t , i , t ′ t ∈ T t ′ ∈ T ⎛ t , q ))⎞ ( δ t , q , i , q ′ → ⋀ ( τ t , i , t ′ → λ B ⎝ λ B t ′ , q ′ ∧ λ # t ′ , q ′ ⊳ q ′ λ # t , q → ⋀ ⋀ ⋀ ⋀ ⎠ q ∈ Q t ∈ T q ′ ∈ Q i ∈ 2 I t ′ ∈ T
Input-symbolic encoding (QBF) Symbolic I T Q ✓ ✗ ✗ ∃ { λ B t , q ∣ t ∈ T , q ∈ Q } t , q , λ # ∀ I ∃ { τ t , t ′ ∣ ( t , t ′ ) ∈ T × T } ∃ { o t ∣ o ∈ O , t ∈ T }
Input-symbolic encoding (QBF) Symbolic I T Q ✓ ✗ ✗ ∃ { λ B t , q ∣ t ∈ T , q ∈ Q } t , q , λ # ∀ I ∃ { τ t , t ′ ∣ ( t , t ′ ) ∈ T × T } ∃ { o t ∣ o ∈ O , t ∈ T } λ B t 0 , q 0 ∧ ⋀ ⋁ τ t , t ′ t ∈ T t ′ ∈ T ⎛ t , q ))⎞ ( δ t , q , q ′ → ⋀ ( τ t , t ′ → λ B ⎝ λ B t ′ , q ′ ∧ λ # t ′ , q ′ ⊳ q ′ λ # t , q → ⋀ ⋀ ⋀ ⎠ q ∈ Q t ∈ T q ′ ∈ Q t ′ ∈ T
State-symbolic encoding (DQBF) Symbolic I T Q ✓ ✓ ✗ q ∶ 2 T → B b ∣ q ∈ Q } ∃ { λ B q ∶ 2 T → B , λ # ∃ τ ∶ 2 T × 2 I → 2 T ∃ { o ∶ 2 T × 2 I → B ∣ o ∈ O } ∀ I . ∀ T , T ′ .
State-symbolic encoding (DQBF) Symbolic I T Q ✓ ✓ ✗ q ∶ 2 T → B b ∣ q ∈ Q } ∃ { λ B q ∶ 2 T → B , λ # ∃ τ ∶ 2 T × 2 I → 2 T ∃ { o ∶ 2 T × 2 I → B ∣ o ∈ O } ∀ I . ∀ T , T ′ . ( T = 0 → λ B q 0 ( T )) ⎛ q ( T ))⎞ q ( T ) → ⋀ ( δ q , q ′ ∧ ( τ ( T , I ) ⇒ T ′ ) → λ B q ′ ( T ′ ) ∧ λ # q ′ ( T ′ ) ⊳ q ′ λ # ⎝ λ B ⋀ ⎠ q ∈ Q q ′ ∈ Q
Fully-symbolic encoding (DQBF) Symbolic I T Q ✓ ✓ ✓ ∃ λ B ∶ 2 T × 2 Q → B , λ # ∶ 2 T × 2 Q → B b ∃ τ ∶ 2 T × 2 I → 2 T ∃ { o ∶ 2 T × 2 I → B ∣ o ∈ O } ∀ I . ∀ T , T ′ . ∀ Q , Q ′ .
Fully-symbolic encoding (DQBF) Symbolic I T Q ✓ ✓ ✓ ∃ λ B ∶ 2 T × 2 Q → B , λ # ∶ 2 T × 2 Q → B b ∃ τ ∶ 2 T × 2 I → 2 T ∃ { o ∶ 2 T × 2 I → B ∣ o ∈ O } ∀ I . ∀ T , T ′ . ∀ Q , Q ′ . ( T = 0 ∧ Q = 0 → λ B ( T , Q )) ∧ ( λ B ( T , Q ) → ( δ ∧ ( τ ( T , I ) ⇒ T ′ ) → λ B ( T ′ , Q ′ ) ∧ λ # ( T ′ , Q ′ ) ⊳ λ # ( T , Q )))
Realizability results on selected instances 387.8 – 0 159.3 5 – 0 2711.8 2 1840.3 2 genbuf 212.7 5 5 2 432.1 3 639.4 6 36.9 5 loadcomp 69.0 3 701.2 6 0.4 2 generalized-bufger 2093.8 4 5 5 261.6 8 239.4 3 1010.7 8 1769.0 6 detector – 0 270.8 75.3 2 2 83.2 8 1148.8 5 load-balancer 792.5 2 3194.8 6 – 0 3542.8 1.6 176.5 Maximal parameter value, cumulative solving time (timeout 1h) 100.5 2 0.6 4 2994.5 4 full-arbiter 902.7 6 59.2 8 3 5 2.7 8 1008.7 7 simple-arbiter instance Party Acacia state-sym input-sym basic 13.3 3 2683.4 loadfull prio-arbiter 213.5 4 83.7 4 25.1 2 3 8 268.7 5 44.2 19.2 4 111.7 roundrob-arbiter 4 143.1 4 227.0 370.3 11.0 2 4 345.6 max k sum t max k sum t max k sum t max k sum t max k sum t
Realizability results in comparison LTL realizability, SYNTCOMP 2016 experiment set input-symbolic basic SMT Party elli rally state-symbolic fully-symbolic time (sec.) # instances Acacia 10 3 10 2 10 1 10 0 10 − 1 10 − 2 0 10 20 30 40 50 70 90 100 110 120 130 140 150 60 80 160
Implementation extraction 2. Create AIGER circuit and minimize using abc 1. Use certification feature of solvers to compute witness for o and τ ▸ Assignments from SAT solver ▸ Skolem functions from QBF solver
Implementation size Input-symbolic vs. basic encoding, circuit size (# AND-Gates) basic input-symbolic 10 3 10 2 10 1 10 0 10 0 10 1 10 2 10 3
Implementation size Input-symbolic encoding vs. state-of-the-art tools, circuit size (# AND-Gates) Party elli rally BoSy (input-symbolic) Acacia BoSy (input-symbolic) 10 5 10 3 10 4 10 2 10 3 10 2 10 1 10 1 10 0 10 0 10 0 10 1 10 2 10 3 10 4 10 5 10 0 10 1 10 2 10 3
Conclusions Runtime competitive with non-bounded symbolic synthesis Implementation size > order of magnitude better ▸ Symbolic encoding for bounded synthesis pays ofg ▸ Today, QBF = input symbolic encoding is the sweetspot: ▸ Significant potential for DQBF solvers
Recommend
More recommend