Symbolic Encodings of Bounded Synthesis Saarland University Peter - - PowerPoint PPT Presentation

symbolic encodings of bounded synthesis
SMART_READER_LITE
LIVE PREVIEW

Symbolic Encodings of Bounded Synthesis Saarland University Peter - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

Symbolic Encodings of Bounded Synthesis

Peter Faymonville1, Bernd Finkbeiner1, Markus N. Rabe2, Leander Tentrup1

1Reactive Systems Group

Saarland University

2UC Berkeley

slide-2
SLIDE 2

Reactive synthesis φ Synthesis S

realizable unrealizable bound [Schewe/F. 2007]

slide-3
SLIDE 3

Bounded synthesis φ Synthesis S

realizable unrealizable bound n [Schewe/F. 2007]

slide-4
SLIDE 4

Bounded synthesis

▸ synthesis of systems with minimal # states ▸ basis for other output-sensitive synthesis algorithms,

e.g. bounded cycle synthesis [F./Klein 2016]

▸ undecidable synthesis problems, e.g., distributed synthesis, become decidable ▸ complexity split between input and output

slide-5
SLIDE 5

TBURST4 (synthesized with Acacia+ v2.3)

slide-6
SLIDE 6

TBURST4 (synthesized with bounded synthesis)

slide-7
SLIDE 7

TBURST4 (synthesized with bounded cycle synthesis)

slide-8
SLIDE 8

Complexity of standard synthesis (in specification)

1-process architectures — 2EXPTIME

Env

1 a b Pipeline architectures — NONELEMENTARY

Env

1 2 3 a b c d 2-process arbiter architecture — UNDECIDABLE

Env

1 2 r1 r2 g1 g2

slide-9
SLIDE 9

Complexity of bounded synthesis (in bound)

1-process architectures — NP

Env

1 a b Pipeline architectures — NP

Env

1 2 3 a b c d 2-process arbiter architecture — NP

Env

1 2 r1 r2 g1 g2

slide-10
SLIDE 10

Constraint-based bounded synthesis

specification φ Co-Büchi automaton universal Büchi automaton nondeterministic deterministic automaton emptiness game constraint system

bounded standard

slide-11
SLIDE 11

Constraint-based bounded synthesis

specification φ 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

bounded standard

slide-12
SLIDE 12

Constraint-based bounded synthesis

specification φ Co-Büchi automaton universal Büchi automaton nondeterministic deterministic automaton emptiness game constraint system symbolic encoding BDDs, antichains, etc standard encoding (2007): explicit

bounded standard

slide-13
SLIDE 13

Constraint-based bounded synthesis

specification φ 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

bounded standard

slide-14
SLIDE 14

Bounded synthesis

universal co-Büchi automaton Aφ q0 q1 q2 qe ⊺ r1 r2 g1g2 g1 g2 ⊺ φ = (r1 → g1) ∧ (r2 → g2) ∧ ¬(g1 ∧ g2) Transition System T t0 t1 ⊺/g1 ⊺/g2

slide-15
SLIDE 15

Run graph of automaton and transition system

Run graph with annotation λ q0 q1 q2 qe ⊺ r1 r2 g1g2 g1 g2 ⊺

t0 t1 ⊺/g1 ⊺/g2

⟨t0, q0⟩ λ ∶ 0 ⟨t1, q0⟩ λ ∶ 0 ⟨t1, q1⟩ λ ∶ 1 ⟨t1, q2⟩ λ ∶ 2 ⟨t0, q1⟩ λ ∶ 2 ⟨t0, q2⟩ λ ∶ 1 ⟨t0, qe⟩ λ ∶ ⟨t1, qe⟩ λ ∶

slide-16
SLIDE 16

Run graph of automaton and transition system

Run graph with annotation λ q0 q1 q2 qe ⊺ r1 r2 g1g2 g1 g2 ⊺

t0 t1 ⊺/g1 ⊺/g2

⟨t0, q0⟩ λ ∶ 0 ⟨t1, q0⟩ λ ∶ 0 ⟨t1, q1⟩ λ ∶ 1 ⟨t1, q2⟩ λ ∶ 2 ⟨t0, q1⟩ λ ∶ 2 ⟨t0, q2⟩ λ ∶ 1 ⟨t0, qe⟩ λ ∶ ⟨t1, qe⟩ λ ∶

slide-17
SLIDE 17

Encoding bounded synthesis with constraints

Encode the existence of a transition system and a valid annotation

▸ Representation of transition system

▸ states t ∈ T ▸ transitions τt,i,t′ ▸ output labeling ot,i

▸ Representation of annotation on run graph T × Q

▸ state occurrence λB ▸ rejecting bound λ#

λB

t0,q0 ∧ ⋀ q∈Q

t∈T

⎛ ⎝λB

t,q → ⋀ q′∈Q

i∈2I

(δt,q,i,q′ → ⋀

t′∈T

(τt,i,t′ → λB

t′,q′ ∧ λ# t′,q′ ⊳q′ λ# t,q))⎞

slide-18
SLIDE 18

Target logics

SAT

▸ Only existentially quantified boolean variables permitted. ▸ No symbolic encoding of functions.

QBF

▸ Universally and existentially quantified boolean variables in total order. ▸ Symbolic encoding of functions with single applications.

DQBF

▸ Universally and existentially quantified boolean variables in partial order. ▸ Symbolic encoding of functions with multiple applications.

slide-19
SLIDE 19

Results of difgerent encodings

LTL realizability, SYNTCOMP 2016 experiment set

10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 10−2 10−1 100 101 102 103 # instances time (sec.) fully-symbolic state-symbolic SMT basic input-symbolic

slide-20
SLIDE 20

Basic encoding (SAT)

I T Q Symbolic ✗ ✗ ✗ ∃{λB

t,q, λ# t,q ∣ t ∈ T, q ∈ Q}

∃{τt,i,t′ ∣ (t, t′) ∈ T × T, i ∈ 2I} ∃{ot,i ∣ o ∈ O, t ∈ T, i ∈ 2I}

slide-21
SLIDE 21

Basic encoding (SAT)

I T Q Symbolic ✗ ✗ ✗ ∃{λB

t,q, λ# t,q ∣ t ∈ T, q ∈ Q}

∃{τt,i,t′ ∣ (t, t′) ∈ T × T, i ∈ 2I} ∃{ot,i ∣ o ∈ O, t ∈ T, i ∈ 2I} λB

t0,q0 ∧ ⋀ t∈T

i∈2I ⋁ t′∈T

τt,i,t′ ⋀

q∈Q

t∈T

⎛ ⎝λB

t,q → ⋀ q′∈Q

i∈2I

(δt,q,i,q′ → ⋀

t′∈T

(τt,i,t′ → λB

t′,q′ ∧ λ# t′,q′ ⊳q′ λ# t,q))⎞

slide-22
SLIDE 22

Input-symbolic encoding (QBF)

I T Q Symbolic ✓ ✗ ✗ ∃{λB

t,q, λ# t,q ∣ t ∈ T, q ∈ Q}

∀I ∃{τt,t′ ∣ (t, t′) ∈ T × T} ∃{ot ∣ o ∈ O, t ∈ T}

slide-23
SLIDE 23

Input-symbolic encoding (QBF)

I T Q Symbolic ✓ ✗ ✗ ∃{λB

t,q, λ# t,q ∣ t ∈ T, q ∈ Q}

∀I ∃{τt,t′ ∣ (t, t′) ∈ T × T} ∃{ot ∣ o ∈ O, t ∈ T} λB

t0,q0 ∧ ⋀ t∈T

t′∈T

τt,t′ ⋀

q∈Q

t∈T

⎛ ⎝λB

t,q → ⋀ q′∈Q

(δt,q,q′ → ⋀

t′∈T

(τt,t′ → λB

t′,q′ ∧ λ# t′,q′ ⊳q′ λ# t,q))⎞

slide-24
SLIDE 24

State-symbolic encoding (DQBF)

I T Q Symbolic ✓ ✓ ✗ ∃{λB

q ∶2T → B, λ# q∶2T → Bb ∣ q ∈ Q}

∃τ ∶ 2T × 2I → 2T ∃{o∶2T × 2I → B ∣ o ∈ O} ∀I. ∀T, T′.

slide-25
SLIDE 25

State-symbolic encoding (DQBF)

I T Q Symbolic ✓ ✓ ✗ ∃{λB

q ∶2T → B, λ# q∶2T → Bb ∣ q ∈ Q}

∃τ ∶ 2T × 2I → 2T ∃{o∶2T × 2I → B ∣ o ∈ O} ∀I. ∀T, T′. (T = 0 → λB

q0(T))

q∈Q

⎛ ⎝λB

q (T) → ⋀ q′∈Q

(δq,q′ ∧ (τ(T, I) ⇒ T′) → λB

q′(T′) ∧ λ# q′(T′) ⊳q′ λ# q(T))⎞

slide-26
SLIDE 26

Fully-symbolic encoding (DQBF)

I T Q Symbolic ✓ ✓ ✓ ∃λB∶2T × 2Q → B, λ#∶2T × 2Q → Bb ∃τ ∶ 2T × 2I → 2T ∃{o∶2T × 2I → B ∣ o ∈ O} ∀I. ∀T, T′. ∀Q, Q′.

slide-27
SLIDE 27

Fully-symbolic encoding (DQBF)

I T Q Symbolic ✓ ✓ ✓ ∃λB∶2T × 2Q → B, λ#∶2T × 2Q → Bb ∃τ ∶ 2T × 2I → 2T ∃{o∶2T × 2I → 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)))

slide-28
SLIDE 28

Realizability results on selected instances

Maximal parameter value, cumulative solving time (timeout 1h) basic input-sym state-sym Acacia Party instance max k sum t max k sum t max k sum t max k sum t max k sum t simple-arbiter 7 1008.7 8 2.7 3 100.5 8 59.2 6 902.7 full-arbiter 4 2994.5 3 0.6 2 13.3 5 2683.4 3 111.7 roundrob-arbiter 4 143.1 4 227.0 2 11.0 4 345.6 4 19.2 loadfull 5 268.7 8 44.2 2 25.1 4 83.7 4 213.5 prio-arbiter 4 176.5 4 1.6 2 0.4 6 701.2 3 69.0 loadcomp 5 36.9 6 639.4 3 432.1 5 387.8 5 212.7 genbuf 2 1840.3 2 2711.8 – 5 159.3 – generalized-bufger 2 2093.8 2 3542.8 – 6 3194.8 2 792.5 load-balancer 5 1148.8 8 83.2 2 75.3 5 270.8 – detector 6 1769.0 8 1010.7 3 239.4 8 261.6 5 370.3

slide-29
SLIDE 29

Realizability results in comparison

LTL realizability, SYNTCOMP 2016 experiment set

10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 10−2 10−1 100 101 102 103 # instances time (sec.) fully-symbolic state-symbolic Party elli rally SMT basic input-symbolic Acacia

slide-30
SLIDE 30

Implementation extraction

  • 1. Use certification feature of solvers to compute witness for o and τ

▸ Assignments from SAT solver ▸ Skolem functions from QBF solver

  • 2. Create AIGER circuit and minimize using abc
slide-31
SLIDE 31

Implementation size

Input-symbolic vs. basic encoding, circuit size (# AND-Gates)

100 101 102 103 100 101 102 103 basic input-symbolic

slide-32
SLIDE 32

Implementation size

Input-symbolic encoding vs. state-of-the-art tools, circuit size (# AND-Gates) 100 101 102 103 104 105 100 101 102 103 104 105

Acacia BoSy (input-symbolic)

100 101 102 103 100 101 102 103

Party elli rally BoSy (input-symbolic)

slide-33
SLIDE 33

Conclusions

▸ Symbolic encoding for bounded synthesis pays ofg ▸ Today, QBF = input symbolic encoding is the sweetspot:

Runtime competitive with non-bounded symbolic synthesis Implementation size > order of magnitude better

▸ Significant potential for DQBF solvers