Knowledge Compilation for Boolean Functional Synthesis S. Akshay, - - PowerPoint PPT Presentation

knowledge compilation for boolean functional synthesis
SMART_READER_LITE
LIVE PREVIEW

Knowledge Compilation for Boolean Functional Synthesis S. Akshay, - - PowerPoint PPT Presentation

Knowledge Compilation for Boolean Functional Synthesis S. Akshay, Jatin Arora, Supratik Chakraborty, S. Krishna, Divya Raghunathan, Shetal Shah Indian Institute of Technology Bombay 1 Boolean Functional Synthesis Boolean functions:


slide-1
SLIDE 1

Knowledge Compilation for Boolean Functional Synthesis

  • S. Akshay, Jatin Arora, Supratik Chakraborty, S. Krishna,

Divya Raghunathan, Shetal Shah Indian Institute of Technology Bombay

1

slide-2
SLIDE 2

Boolean Functional Synthesis

Boolean functions: fundamental building blocks in computing.

2

slide-3
SLIDE 3

Boolean Functional Synthesis

Boolean functions: fundamental building blocks in computing. Often easy to specify relationally;

Relation between inputs and outputs

2

slide-4
SLIDE 4

Boolean Functional Synthesis

Boolean functions: fundamental building blocks in computing. Often easy to specify relationally;

Relation between inputs and outputs E.g. Arbiter Arbiter R1 R2 G1 G2

2

slide-5
SLIDE 5

Boolean Functional Synthesis

Boolean functions: fundamental building blocks in computing. Often easy to specify relationally;

Relation between inputs and outputs E.g. Arbiter Arbiter R1 R2 G1 G2

(R1∨R2) → (G1∨G2) ∧ ¬(G1∧G2) ∧ (G1 → R1) ∧(G2 → R2)

2

slide-6
SLIDE 6

Boolean Functional Synthesis

Boolean functions: fundamental building blocks in computing. Often easy to specify relationally;

Relation between inputs and outputs E.g. Arbiter Arbiter R1 R2 G1 G2

(R1∨R2) → (G1∨G2) ∧ ¬(G1∧G2) ∧ (G1 → R1) ∧(G2 → R2)

But we need them in functional form

Outputs as functions of inputs

2

slide-7
SLIDE 7

Boolean Functional Synthesis

Boolean functions: fundamental building blocks in computing. Often easy to specify relationally;

Relation between inputs and outputs E.g. Arbiter Arbiter R1 R2 G1 G2

(R1∨R2) → (G1∨G2) ∧ ¬(G1∧G2) ∧ (G1 → R1) ∧(G2 → R2)

But we need them in functional form

Outputs as functions of inputs G1 = Func1(R1, R2), G2 = Func2(R1, R2),

2

slide-8
SLIDE 8

Boolean Functional Synthesis

Boolean functions: fundamental building blocks in computing. Often easy to specify relationally;

Relation between inputs and outputs E.g. Arbiter Arbiter R1 R2 G1 G2

(R1∨R2) → (G1∨G2) ∧ ¬(G1∧G2) ∧ (G1 → R1) ∧(G2 → R2)

But we need them in functional form

Outputs as functions of inputs G1 = Func1(R1, R2), G2 = Func2(R1, R2),

Boolean Functional Synthesis (BFnS) Synthesizing Boolean functions from a relational specification.

2

slide-9
SLIDE 9

Boolean Functional Synthesis BFnS

Formal definition Given Boolean relation ϕ(x1, .., xn, y1, .., ym) xi input variables yj output variables,

3

slide-10
SLIDE 10

Boolean Functional Synthesis BFnS

Formal definition Given Boolean relation ϕ(x1, .., xn, y1, .., ym) xi input variables yj output variables, Synthesize Boolean functions Fj(x1 . . . xn) for each yj s.t.

∀x1 . . . xn (∃y1 . . . ym ϕ(x1 . . . xn, y1 . . . ym) ⇔ ϕ(x1, . . . xn, F1, . . . Fm))

3

slide-11
SLIDE 11

Boolean Functional Synthesis BFnS

Formal definition Given Boolean relation ϕ(x1, .., xn, y1, .., ym) xi input variables yj output variables, Synthesize Boolean functions Fj(x1 . . . xn) for each yj s.t.

∀x1 . . . xn (∃y1 . . . ym ϕ(x1 . . . xn, y1 . . . ym) ⇔ ϕ(x1, . . . xn, F1, . . . Fm))

Fj is also called a Skolem function for yj in ϕ.

3

slide-12
SLIDE 12

Boolean Functional Synthesis BFnS

Formal definition Given Boolean relation ϕ(x1, .., xn, y1, .., ym) xi input variables yj output variables, Synthesize Boolean functions Fj(x1 . . . xn) for each yj s.t.

∀x1 . . . xn (∃y1 . . . ym ϕ(x1 . . . xn, y1 . . . ym) ⇔ ϕ(x1, . . . xn, F1, . . . Fm))

Fj is also called a Skolem function for yj in ϕ. Interesting even if for some x1, . . . xn, there isn’t y1, . . . ym s.t. ϕ(x1 . . . xn, y1 . . . ym) holds.

3

slide-13
SLIDE 13

Applications of Boolean Functional Synthesis

  • 1. Factorization: Interesting but hard for synthesis!
  • 2. Disjunctive decomposition of transition relations [Trivedi et

al’02]

  • 3. Quantifier elimination, of course!

∃Y ϕ(X, Y ) ≡ ϕ(X, F(X))

  • 4. Certifying QBF-SAT solvers [Bendetti’05, ...]
  • 5. (Reactive) circuit/strategy synthesis [Alur et al’05, ...]
  • 6. Program synthesis

Combinatorial sketching [Solar-Lezama et al’06, Srivastava et al’13, ...] Complete functional synthesis [Kuncak et al’10, ...]

  • 7. Repair/partial synthesis of circuits [Fujita et al’13 ...]

4

slide-14
SLIDE 14

Existing Approaches

1 Closely related to Boolean unification

  • 1. Given ϕ(X, y1, .., yn) = 0, find most general unifiers of y1, .., ym

in terms of X. Early work by Boole (1847) and Lowenheim (1908)

5

slide-15
SLIDE 15

Existing Approaches

1 Closely related to Boolean unification

  • 1. Given ϕ(X, y1, .., yn) = 0, find most general unifiers of y1, .., ym

in terms of X. Early work by Boole (1847) and Lowenheim (1908)

  • 2. Extract Skolem functions from proof of validity of

∀X∃Yϕ(X, Y)

Bendetti’05, Jussilla et al’07, Jiang et al’11, Heule et al’14, ... Efficient if a short proof of validity is found Doesn’t work if ∀X∃Yϕ(X, Y) is not valid.

5

slide-16
SLIDE 16

Existing Approaches

1 Closely related to Boolean unification

  • 1. Given ϕ(X, y1, .., yn) = 0, find most general unifiers of y1, .., ym

in terms of X. Early work by Boole (1847) and Lowenheim (1908)

  • 2. Extract Skolem functions from proof of validity of

∀X∃Yϕ(X, Y)

Bendetti’05, Jussilla et al’07, Jiang et al’11, Heule et al’14, ... Efficient if a short proof of validity is found Doesn’t work if ∀X∃Yϕ(X, Y) is not valid.

  • 3. Generate Skolem functions matching given templates

Srivastava et al’13, ... Effective when small set of candidate Skolem functions known Not always the case

5

slide-17
SLIDE 17

Existing Approaches

  • 4. Function composition based approaches

Jiang’09, Trivedi et al’03 Iterated compositions cause formula blow up

6

slide-18
SLIDE 18

Existing Approaches

  • 4. Function composition based approaches

Jiang’09, Trivedi et al’03 Iterated compositions cause formula blow up

  • 5. Boolean functional synthesis using BDDs

Kukula et al’00, Kuncak et al’10, Fried et al’16, Tabajara et al’17 Scales for a class of benchmarks with pre-determined var orders Sans good var orders, performance degrades considerably

6

slide-19
SLIDE 19

Existing Approaches

  • 4. Function composition based approaches

Jiang’09, Trivedi et al’03 Iterated compositions cause formula blow up

  • 5. Boolean functional synthesis using BDDs

Kukula et al’00, Kuncak et al’10, Fried et al’16, Tabajara et al’17 Scales for a class of benchmarks with pre-determined var orders Sans good var orders, performance degrades considerably

  • 6. Incremental determinization

Rabe et al’17 Works well for a large class of PCNF inputs Doesn’t work if ∀X∃Yϕ(X, Y) is not valid

6

slide-20
SLIDE 20

Existing Approaches

  • 4. Function composition based approaches

Jiang’09, Trivedi et al’03 Iterated compositions cause formula blow up

  • 5. Boolean functional synthesis using BDDs

Kukula et al’00, Kuncak et al’10, Fried et al’16, Tabajara et al’17 Scales for a class of benchmarks with pre-determined var orders Sans good var orders, performance degrades considerably

  • 6. Incremental determinization

Rabe et al’17 Works well for a large class of PCNF inputs Doesn’t work if ∀X∃Yϕ(X, Y) is not valid

  • 7. Quantifier instantiation techniques in SMT solvers

Barrett et al’15, Bierre et al’17 Works even for bit-vector and other theories May not scale well for large specs with large # quantified vars

  • 8. Input-output separation: Tabajara et al’18
  • 9. Initial approximation iterative refinement Akshay et al’16

6

slide-21
SLIDE 21

How Hard (or Easy) Is It?

BFnS is NP-hard

Consider a co-NPNP (or ΠP

2 )-complete problem:

Is ∀x1, ...xn∃y1, ...ymϕ(x1, .., xn, y1, .., ym) true?

7

slide-22
SLIDE 22

How Hard (or Easy) Is It?

BFnS is NP-hard

Consider a co-NPNP (or ΠP

2 )-complete problem:

Is ∀x1, ...xn∃y1, ...ymϕ(x1, .., xn, y1, .., ym) true?

Synthesize Skolem function F1(x1 . . . xn), ...Fm(x1 . . . xn), substitute for y1, ...ym and invoke a co-NP oracle.

7

slide-23
SLIDE 23

How Hard (or Easy) Is It?

BFnS is NP-hard

Consider a co-NPNP (or ΠP

2 )-complete problem:

Is ∀x1, ...xn∃y1, ...ymϕ(x1, .., xn, y1, .., ym) true?

Synthesize Skolem function F1(x1 . . . xn), ...Fm(x1 . . . xn), substitute for y1, ...ym and invoke a co-NP oracle. co-NPNP included in co-NPBFnS

7

slide-24
SLIDE 24

How Hard (or Easy) Is It?

BFnS is NP-hard

Consider a co-NPNP (or ΠP

2 )-complete problem:

Is ∀x1, ...xn∃y1, ...ymϕ(x1, .., xn, y1, .., ym) true?

Synthesize Skolem function F1(x1 . . . xn), ...Fm(x1 . . . xn), substitute for y1, ...ym and invoke a co-NP oracle. co-NPNP included in co-NPBFnS

What about size of Skolem functions?

Does there always exist compact Skolem functions, although synthesizing may take exponential time?

7

slide-25
SLIDE 25

How Hard (or Easy) Is It?

BFnS is NP-hard

Consider a co-NPNP (or ΠP

2 )-complete problem:

Is ∀x1, ...xn∃y1, ...ymϕ(x1, .., xn, y1, .., ym) true?

Synthesize Skolem function F1(x1 . . . xn), ...Fm(x1 . . . xn), substitute for y1, ...ym and invoke a co-NP oracle. co-NPNP included in co-NPBFnS

What about size of Skolem functions?

Does there always exist compact Skolem functions, although synthesizing may take exponential time?

Lower bound results in circuit-size refer to monotone circuits [Razbarov 1985; Alon and Boppana 1987]

Skolem functions need not be monotone Different argument for lower bounds on Skolem circuits

7

slide-26
SLIDE 26

Some Good and Bad News

Bad news: [CAV2018] Unless ΠP

2 = ΣP 2 , there exist specs F for which Skolem

function sizes must be super-polynomial in |F|.

8

slide-27
SLIDE 27

Some Good and Bad News

Bad news: [CAV2018] Unless ΠP

2 = ΣP 2 , there exist specs F for which Skolem

function sizes must be super-polynomial in |F|. Unless non-uniform exponential-time hypothesis fails, . . . . . . . . . sizes must be exponential in |F|.

8

slide-28
SLIDE 28

Some Good and Bad News

Bad news: [CAV2018] Unless ΠP

2 = ΣP 2 , there exist specs F for which Skolem

function sizes must be super-polynomial in |F|. Unless non-uniform exponential-time hypothesis fails, . . . . . . . . . sizes must be exponential in |F|. Efficient algorithms for Boolean functional synthesis unlikely

8

slide-29
SLIDE 29

Some Good and Bad News

Bad news: [CAV2018] Unless ΠP

2 = ΣP 2 , there exist specs F for which Skolem

function sizes must be super-polynomial in |F|. Unless non-uniform exponential-time hypothesis fails, . . . . . . . . . sizes must be exponential in |F|. Efficient algorithms for Boolean functional synthesis unlikely Good news: [CAV2018] If F is in weak decomposable negation normal form (wDNNF), synthesis solvable in polynomial (in |F|) time and space.

8

slide-30
SLIDE 30

Some Good and Bad News

Bad news: [CAV2018] Unless ΠP

2 = ΣP 2 , there exist specs F for which Skolem

function sizes must be super-polynomial in |F|. Unless non-uniform exponential-time hypothesis fails, . . . . . . . . . sizes must be exponential in |F|. Efficient algorithms for Boolean functional synthesis unlikely Good news: [CAV2018] If F is in weak decomposable negation normal form (wDNNF), synthesis solvable in polynomial (in |F|) time and space.

zj ¬zj ∧ wDNNF Disallowed paths in NNF of ϕ

8

slide-31
SLIDE 31

Some Good and Bad News

Bad news: [CAV2018] Unless ΠP

2 = ΣP 2 , there exist specs F for which Skolem

function sizes must be super-polynomial in |F|. Unless non-uniform exponential-time hypothesis fails, . . . . . . . . . sizes must be exponential in |F|. Efficient algorithms for Boolean functional synthesis unlikely Good news: [CAV2018] If F is in weak decomposable negation normal form (wDNNF), synthesis solvable in polynomial (in |F|) time and space.

zj ¬zj ∧ wDNNF Disallowed paths in NNF of ϕ

Experiments: Efficient synthesis even when F not in wDNNF

8

slide-32
SLIDE 32

Current Talk

Is there a weaker (than wDNNF) representation form of F that guarantees poly-time (in |F|) synthesis?

9

slide-33
SLIDE 33

Current Talk

Is there a weaker (than wDNNF) representation form of F that guarantees poly-time (in |F|) synthesis? YES: Synthesis Negation Normal Form (SynNNF) Subsumes and exponentially more succinct than BDD/DNNF/wDNNF/...

9

slide-34
SLIDE 34

Current Talk

Is there a weaker (than wDNNF) representation form of F that guarantees poly-time (in |F|) synthesis? YES: Synthesis Negation Normal Form (SynNNF) Subsumes and exponentially more succinct than BDD/DNNF/wDNNF/... Can we synthesize F from a “simplified” specification?

9

slide-35
SLIDE 35

Current Talk

Is there a weaker (than wDNNF) representation form of F that guarantees poly-time (in |F|) synthesis? YES: Synthesis Negation Normal Form (SynNNF) Subsumes and exponentially more succinct than BDD/DNNF/wDNNF/... Can we synthesize F from a “simplified” specification? YES: Folklore wisdom Formalized as refinement w.r.t. synthesis

9

slide-36
SLIDE 36

Current Talk

Is there a weaker (than wDNNF) representation form of F that guarantees poly-time (in |F|) synthesis? YES: Synthesis Negation Normal Form (SynNNF) Subsumes and exponentially more succinct than BDD/DNNF/wDNNF/... Can we synthesize F from a “simplified” specification? YES: Folklore wisdom Formalized as refinement w.r.t. synthesis Can we algorithmically compile F to a refined SynNNF spec

  • F?

9

slide-37
SLIDE 37

Current Talk

Is there a weaker (than wDNNF) representation form of F that guarantees poly-time (in |F|) synthesis? YES: Synthesis Negation Normal Form (SynNNF) Subsumes and exponentially more succinct than BDD/DNNF/wDNNF/... Can we synthesize F from a “simplified” specification? YES: Folklore wisdom Formalized as refinement w.r.t. synthesis Can we algorithmically compile F to a refined SynNNF spec

  • F?

YES: Super-polynomial time in worst-case Practical performance promising!

9

slide-38
SLIDE 38

Classical Knowledge Compilation

Wikipedia ... a family of approaches for addressing the intractability of a number of artificial intelligence problems. A propositional model is compiled in an off-line phase in order to support some queries in polytime.

10

slide-39
SLIDE 39

Classical Knowledge Compilation

Wikipedia ... a family of approaches for addressing the intractability of a number of artificial intelligence problems. A propositional model is compiled in an off-line phase in order to support some queries in polytime. Compiler ϕ CNF Circuit...

  • ϕ

BDD/DNNF/... Polytime Engine Model Count Consistency All Models...

10

slide-40
SLIDE 40

Knowledge Compilation for Synthesis

Our Definition ... a family of approaches for addressing the intractability of synthesis problems. A propositional model is compiled in an

  • ff-line phase in order to support some queries in polytime.

11

slide-41
SLIDE 41

Knowledge Compilation for Synthesis

Our Definition ... a family of approaches for addressing the intractability of synthesis problems. A propositional model is compiled in an

  • ff-line phase in order to support some queries in polytime.

Compiler ϕ CNF Circuit...

  • ϕ

Refined SynNNF Polytime Engine Skolem functions Inputs X Outputs Y

11

slide-42
SLIDE 42

SynNNF: A Quick Introduction

Represent ϕ(x1, .., xn, y1, .., ym) as NNF DAG

Boolean circuit, ∧ and ∨ at internal nodes, ¬ only at leaves

12

slide-43
SLIDE 43

SynNNF: A Quick Introduction

Represent ϕ(x1, .., xn, y1, .., ym) as NNF DAG

Boolean circuit, ∧ and ∨ at internal nodes, ¬ only at leaves

Ex: ϕ(x1, x2, y1, y2) ≡ (y1 ∨ (¬y2 ∧ ¬x1)) ∨ (¬y1 ∧ (x2 ∨ ¬x1))

12

slide-44
SLIDE 44

SynNNF: A Quick Introduction

Represent ϕ(x1, .., xn, y1, .., ym) as NNF DAG

Boolean circuit, ∧ and ∨ at internal nodes, ¬ only at leaves

Ex: ϕ(x1, x2, y1, y2) ≡ (y1 ∨ (¬y2 ∧ ¬x1)) ∨ (¬y1 ∧ (x2 ∨ ¬x1))

ϕ : ∨ ∨ y1 ∧ ¬y2 ¬x1 ∧ ¬y1 ∨ x2 ¬x1

12

slide-45
SLIDE 45

SynNNF: A Quick Introduction

Positive form of specification Define ϕ(x1, ..., xn, y1, ..., ym, y1, ...ym)

In NNF DAG of ϕ, replace every ¬yi leaf by fresh variable yi

13

slide-46
SLIDE 46

SynNNF: A Quick Introduction

Positive form of specification Define ϕ(x1, ..., xn, y1, ..., ym, y1, ...ym)

In NNF DAG of ϕ, replace every ¬yi leaf by fresh variable yi

Ex: ϕ(x1, x2, y1, y2) ≡ (y1 ∨ (¬y2 ∧ ¬x1)) ∨ (¬y1 ∧ (x2 ∨ ¬x1))

  • ϕ(x1, x2, y1, y2, y1, y2) ≡ (y1 ∨ (y2 ∧ ¬x1)) ∨ (y1 ∧ x2 ∨ ¬x1)

13

slide-47
SLIDE 47

SynNNF: A Quick Introduction

Positive form of specification Define ϕ(x1, ..., xn, y1, ..., ym, y1, ...ym)

In NNF DAG of ϕ, replace every ¬yi leaf by fresh variable yi

Ex: ϕ(x1, x2, y1, y2) ≡ (y1 ∨ (¬y2 ∧ ¬x1)) ∨ (¬y1 ∧ (x2 ∨ ¬x1))

  • ϕ(x1, x2, y1, y2, y1, y2) ≡ (y1 ∨ (y2 ∧ ¬x1)) ∨ (y1 ∧ x2 ∨ ¬x1)
  • ϕ : ∨

∨ y1 ∧ y2 ¬x1 ∧ y1 ∨ x2 ¬x1

13

slide-48
SLIDE 48

Simple properties of ϕ

  • ϕ(x1...xn,

i

  • 0..0, yi+1...ym,

i

  • 0..0, ¬yi+1...¬ym) ⇒ ∃y1...yi ϕ(...)
  • ϕ(x1...xn,

i

  • 1..1, yi+1...ym,

i

  • 1..1, ¬yi+1...¬ym) ⇐ ∃y1...yi ϕ(...)

14

slide-49
SLIDE 49

Simple properties of ϕ

  • ϕ(x1...xn,

i

  • 0..0, yi+1...ym,

i

  • 0..0, ¬yi+1...¬ym) ⇒ ∃y1...yi ϕ(...)
  • ϕ(x1...xn,

i

  • 1..1, yi+1...ym,

i

  • 1..1, ¬yi+1...¬ym) ⇐ ∃y1...yi ϕ(...)

ϕ : ∨ ∨ ∧ ¬y2 ¬x1 ∧ ∨ x2 ¬x1

⇒ ∃y1ϕ ⇒

ϕ : ∨ ∨ 1 ∧ ¬y2 ¬x1 ∧ 1 ∨ x2 ¬x1

14

slide-50
SLIDE 50

Simple properties of ϕ

  • ϕ(x1...xn,

i

  • 0..0, yi+1...ym,

i

  • 0..0, ¬yi+1...¬ym) ⇒ ∃y1...yi ϕ(...)
  • ϕ(x1...xn,

i

  • 1..1, yi+1...ym,

i

  • 1..1, ¬yi+1...¬ym) ⇐ ∃y1...yi ϕ(...)

ϕ : ∨ ∨ ∧ ¬x1 ∧ ∨ x2 ¬x1

⇒ ∃y1y2ϕ ⇒

ϕ : ∨ ∨ 1 ∧ 1 ¬x1 ∧ 1 ∨ x2 ¬x1

15

slide-51
SLIDE 51

SynNNF: A Quick Introduction

Given Positive form of spec ϕ(x1, . . . xn, y1, . . . ym, y1, . . . ym) Sequence (linear order) of outputs (y1, . . . ym)

16

slide-52
SLIDE 52

SynNNF: A Quick Introduction

Given Positive form of spec ϕ(x1, . . . xn, y1, . . . ym, y1, . . . ym) Sequence (linear order) of outputs (y1, . . . ym) Let [ ϕ]i be

  • ϕ(x1, . . . xn,

i−1

  • 1..1,

yi, yi+1 . . . ym,

i−1

  • 1..1,

yi, ¬yi+1 . . . ¬ym).

16

slide-53
SLIDE 53

SynNNF: A Quick Introduction

Given Positive form of spec ϕ(x1, . . . xn, y1, . . . ym, y1, . . . ym) Sequence (linear order) of outputs (y1, . . . ym) Let [ ϕ]i be

  • ϕ(x1, . . . xn,

i−1

  • 1..1,

yi, yi+1 . . . ym,

i−1

  • 1..1,

yi, ¬yi+1 . . . ¬ym). Does ∃x1, . . . xn∃yi+1 . . . ym ( [ ϕ]i ⇔ yi ∧ yi ) hold?

16

slide-54
SLIDE 54

SynNNF: A Quick Introduction

Given Positive form of spec ϕ(x1, . . . xn, y1, . . . ym, y1, . . . ym) Sequence (linear order) of outputs (y1, . . . ym) Let [ ϕ]i be

  • ϕ(x1, . . . xn,

i−1

  • 1..1,

yi, yi+1 . . . ym,

i−1

  • 1..1,

yi, ¬yi+1 . . . ¬ym). Does ∃x1, . . . xn∃yi+1 . . . ym ( [ ϕ]i ⇔ yi ∧ yi ) hold? Can [ ϕ]i be made to behave like yi ∧ yi?

16

slide-55
SLIDE 55

SynNNF: A Quick Introduction

Given Positive form of spec ϕ(x1, . . . xn, y1, . . . ym, y1, . . . ym) Sequence (linear order) of outputs (y1, . . . ym) Let [ ϕ]i be

  • ϕ(x1, . . . xn,

i−1

  • 1..1,

yi, yi+1 . . . ym,

i−1

  • 1..1,

yi, ¬yi+1 . . . ¬ym). Does ∃x1, . . . xn∃yi+1 . . . ym ( [ ϕ]i ⇔ yi ∧ yi ) hold? Can [ ϕ]i be made to behave like yi ∧ yi? If [ ϕ]i cannot be made to behave like yi ∧ yi

16

slide-56
SLIDE 56

SynNNF: A Quick Introduction

Given Positive form of spec ϕ(x1, . . . xn, y1, . . . ym, y1, . . . ym) Sequence (linear order) of outputs (y1, . . . ym) Let [ ϕ]i be

  • ϕ(x1, . . . xn,

i−1

  • 1..1,

yi, yi+1 . . . ym,

i−1

  • 1..1,

yi, ¬yi+1 . . . ¬ym). Does ∃x1, . . . xn∃yi+1 . . . ym ( [ ϕ]i ⇔ yi ∧ yi ) hold? Can [ ϕ]i be made to behave like yi ∧ yi? If [ ϕ]i cannot be made to behave like yi ∧ yi for all i ∈ {1, . . . n},

16

slide-57
SLIDE 57

SynNNF: A Quick Introduction

Given Positive form of spec ϕ(x1, . . . xn, y1, . . . ym, y1, . . . ym) Sequence (linear order) of outputs (y1, . . . ym) Let [ ϕ]i be

  • ϕ(x1, . . . xn,

i−1

  • 1..1,

yi, yi+1 . . . ym,

i−1

  • 1..1,

yi, ¬yi+1 . . . ¬ym). Does ∃x1, . . . xn∃yi+1 . . . ym ( [ ϕ]i ⇔ yi ∧ yi ) hold? Can [ ϕ]i be made to behave like yi ∧ yi? If [ ϕ]i cannot be made to behave like yi ∧ yi for all i ∈ {1, . . . n}, Representation of ϕ is in SynNNF

16

slide-58
SLIDE 58

SynNNF: Some observations

Every propositional formula representable in SynNNF for every

  • rdering of outputs

DNF always SynNNF for any output order

17

slide-59
SLIDE 59

SynNNF: Some observations

Every propositional formula representable in SynNNF for every

  • rdering of outputs

DNF always SynNNF for any output order

A formula may have multiple SynNNF representations

DNF, BDD, DNNF ...

17

slide-60
SLIDE 60

SynNNF: Some observations

Every propositional formula representable in SynNNF for every

  • rdering of outputs

DNF always SynNNF for any output order

A formula may have multiple SynNNF representations

DNF, BDD, DNNF ...

A given representation may be SynNNF for order1 of outputs and not in SynNNF for order2 of outputs.

Example coming up ...

17

slide-61
SLIDE 61

SynNNF: An Example

ϕ(x1, x2, y1, y2) = (y1 ∨ y2) ∧ (¬y2 ∨ x1) ∧ (¬x1 ∨ x2) ∧ ∨ y1 y2 ∨ ¬y2 x1 ∨ ¬x1 x2

18

slide-62
SLIDE 62

SynNNF: An Example

ϕ(x1, x2, y1, y2) = (y1 ∨ y2) ∧ (¬y2 ∨ x1) ∧ (¬x1 ∨ x2) ∧ ∨ y1 y2 ∨ ¬y2 x1 ∨ ¬x1 x2 Representation of ϕ not in DNNF/wDNNF

18

slide-63
SLIDE 63

SynNNF: An Example

ϕ(x1, x2, y1, y2) = (y1 ∨ y2) ∧ (¬y2 ∨ x1) ∧ (¬x1 ∨ x2) Output sequence: (y1, y2) ∧ ∨ y1 y2 ∨ ¬y2 x1 ∨ ¬x1 x2

19

slide-64
SLIDE 64

SynNNF: An Example

ϕ(x1, x2, y1, y2) = (y1 ∨ y2) ∧ (¬y2 ∨ x1) ∧ (¬x1 ∨ x2) Output sequence: (y1, y2) ∧ 1 1 y2 ∨ ¬y2 x1 ∨ ¬x1 x2

20

slide-65
SLIDE 65

SynNNF: An Example

ϕ(x1, x2, y1, y2) = (y1 ∨ y2) ∧ (¬y2 ∨ x1) ∧ (¬x1 ∨ x2) Output sequence: (y1, y2) ∧ 1 1 y2 ∨ ¬y2 x1 ∨ ¬x1 x2 Representation of ϕ in SynNNF w.r.t (y1, y2)

20

slide-66
SLIDE 66

Non-SynNNF: An Example

ϕ(x1, x2, y1, y2) = (y1 ∨ y2) ∧ (¬y2 ∨ x1) ∧ (¬x1 ∨ x2) Output sequence: (y2, y1) ∧ ∨ y1 = 0 y2 ∨ ¬y2 x1 = 0 ∨ ¬x1 x2

21

slide-67
SLIDE 67

Non-SynNNF: An Example

ϕ(x1, x2, y1, y2) = (y1 ∨ y2) ∧ (¬y2 ∨ x1) ∧ (¬x1 ∨ x2) Output sequence: (y2, y1) ∧ ∨ y1 = 0 y2 ∨ ¬y2 x1 = 0 ∨ ¬x1 x2 Representation of ϕ not in SynNNF w.r.t (y2, y1)

21

slide-68
SLIDE 68

BDD and SynNNF

y1 y2 x1 x2 y2 x1 x2 x1 1 ∨ ∧ ¬y1 . . . ∧ y1 . . .

22

slide-69
SLIDE 69

BDD and SynNNF

y1 y2 x1 x2 y2 x1 x2 x1 1 ∨ ∧ ¬y1 . . . ∧ y1 . . .

BDD → SynNNF in linear time for any output sequence and any BDD variable ordering.

22

slide-70
SLIDE 70

DNNF, wDNNF and SynNNF

z z or ¬z ϕ in DNNF ∧ Disallowed paths y y x ¬x ϕ in wDNNF ∧ Disallowed paths

23

slide-71
SLIDE 71

DNNF, wDNNF and SynNNF

z z or ¬z ϕ in DNNF ∧ Disallowed paths y y x ¬x ϕ in wDNNF ∧ Disallowed paths A specification in DNNF or wDNNF is already in SynNNF for any

  • utput sequence.

23

slide-72
SLIDE 72

SynNNF is relatively succinct

There exist polynomial sized SynNNF specifications that only admit

24

slide-73
SLIDE 73

SynNNF is relatively succinct

There exist polynomial sized SynNNF specifications that only admit Exponential-sized ROBDD/FBDD representations

24

slide-74
SLIDE 74

SynNNF is relatively succinct

There exist polynomial sized SynNNF specifications that only admit Exponential-sized ROBDD/FBDD representations Super-polynomial sized dDNNF representations, unless P = VNP

24

slide-75
SLIDE 75

SynNNF is relatively succinct

There exist polynomial sized SynNNF specifications that only admit Exponential-sized ROBDD/FBDD representations Super-polynomial sized dDNNF representations, unless P = VNP Super-polynomial sized wDNNF and DNNF representations unless P = NP

24

slide-76
SLIDE 76

SynNNF is relatively succinct

There exist polynomial sized SynNNF specifications that only admit Exponential-sized ROBDD/FBDD representations Super-polynomial sized dDNNF representations, unless P = VNP Super-polynomial sized wDNNF and DNNF representations unless P = NP There exist poly-sized NNF representations that only admit super-polynomial sized SynNNF representations Unless the polynomial hierarchy collapses

24

slide-77
SLIDE 77

SynNNF is relatively succinct

There exist polynomial sized SynNNF specifications that only admit Exponential-sized ROBDD/FBDD representations Super-polynomial sized dDNNF representations, unless P = VNP Super-polynomial sized wDNNF and DNNF representations unless P = NP There exist poly-sized NNF representations that only admit super-polynomial sized SynNNF representations Unless the polynomial hierarchy collapses NNF ⊏ SynNNF ⊏ wDNNF ⊏ DNNF ⊏ dDNNF ⊑ BDD

24

slide-78
SLIDE 78

How does SynNNF help Skolem function synthesis?

y1 y1 y2 y2 x ¬x

  • ϕ in SynNNF

1 x ¬x

  • ϕ in SynNNF

1 1 1 x ¬x

  • ϕ in SynNNF

Skolem for y1 Skolem for y2

Synthesis: m × |ϕ| circuit size, O(m2) additional wires.

25

slide-79
SLIDE 79

Refinement w.r.t. synthesis

Values of X s.t. ∃Yϕ(X, Y) Skolem functions F(X) Given spec: ϕ(X, Y)

slide-80
SLIDE 80

Refinement w.r.t. synthesis

Values of X s.t. ∃Yϕ(X, Y) Skolem functions F(X) Given spec: ϕ(X, Y) Refined spec: ϕ(X, Y)

  • ϕ syn ϕ
slide-81
SLIDE 81

Refinement w.r.t. synthesis

Values of X s.t. ∃Yϕ(X, Y) Skolem functions F(X) Given spec: ϕ(X, Y) Refined spec: ϕ(X, Y)

  • ϕ syn ϕ

Strongly

  • ϕ ∗

syn ϕ

26

slide-82
SLIDE 82

Refinement w.r.t. synthesis

Lemma If F syn F, every Skolem function vector for Y in F is also a Skolem function vector for Y in F.

27

slide-83
SLIDE 83

Refinement w.r.t. synthesis

Lemma If F syn F, every Skolem function vector for Y in F is also a Skolem function vector for Y in F. Example: (y2 ∧ y1) syn ((¬y1 ∨ y2 ∨ x1) ∧ (y1 ∨ ¬y2) ∧ (y1 ∨ ¬x1) ∧ (y2 ∨ x2))

27

slide-84
SLIDE 84

Putting it all together

Tool C2Syn: Input: ϕ in CNF (or AIG) Output: Refined ϕ in SynNNF Branches only on output variables Aggressively tries to refine whenever possible Details in our FMCAD 2019 paper

28

slide-85
SLIDE 85

Experimental Results

Comparison of run-time with CADET [Rabe et al 2016] BFSS [Akshay et al 2018] BDD [BDD pipeline of BFSS] Benchmarks: QBFEVAL 2018 and Factorization (408 total)

Benchmarks Compiled By C2Syn BDD Total (Total) Stage I Stage II Total compilation in SynNNF QBFEval (402) 103 83 186 153 283 FA.QD (6) 6 6 6 6

Table: Compilation into SynNNF

29

slide-86
SLIDE 86

Experimental Results

Bench C2Syn vs CADET C2Syn vs BFSS C2Syn \ C2Syn\ CADET\ C2Syn\ bfss\ (CADET ∪ mark CADET C2Syn bfss C2Syn bfss) QBFEval 78 105 83 78 75 FA.QD 2 3 2 Table: Comparison Results of C2Syn

30