Extending an Isabelle Formalisation of CDCL to Optimising CDCL - - PowerPoint PPT Presentation

extending an isabelle formalisation of cdcl to optimising
SMART_READER_LITE
LIVE PREVIEW

Extending an Isabelle Formalisation of CDCL to Optimising CDCL - - PowerPoint PPT Presentation

Extending an Isabelle Formalisation of CDCL to Optimising CDCL Mathias Fleury joint work with Christoph Weidenbach Matryoshka+Veridis 2019 Lets find a model with minimal weight 10 4 20 13 Optimal partial model: Optimal


slide-1
SLIDE 1

Extending an Isabelle Formalisation


  • f CDCL to Optimising CDCL

Mathias Fleury joint work with Christoph Weidenbach

Matryoshka+Veridis 2019

slide-2
SLIDE 2

Let’s find a model with minimal weight

10 20 Optimal partial model: Optimal total model: 4 13

¬ ¬ ¬

2

slide-3
SLIDE 3

How reliable is the theory?

Conference version Journal version

Branch and Bound for Boolean Optimization and
 the Generation of Optimality Certificates


Javier Larrosa, Robert Nieuwenhuis, Albert Oliveras, and Enric Rodríguez-Carbonell (SAT 2009)

A Framework for Certified Boolean Branch-and-Bound Optimization

Javier Larrosa, Robert Nieuwenhuis, Albert Oliveras, and Enric Rodríguez-Carbonell (JAR 2011)

3

slide-4
SLIDE 4

How reliable is the theory?

4

slide-5
SLIDE 5

=

10 20

¬

10 1

¬

=

Let’s optimise our problem

5

slide-6
SLIDE 6

Let’s optimise our problem

OCDCL = CDCL + identify better models
 + conflicts based on weights

6

slide-7
SLIDE 7

Let’s optimise our problem

=

10 20

¬

10 1

¬ ¬

Optimal model 11

¬

¬ ¬

∨ ∨

¬ ¬

7

slide-8
SLIDE 8

How lazy do you like your
 formalisation?

OCDCLW = CDCL + improve + conflict rules Christoph’s view: copy-paste of proofs My first idea: reuse CDCL proofs OCDCL = CDCL + improve +
 {-M. cost M ≥ min_cost}

8

slide-9
SLIDE 9

How lazy do you like your
 formalisation?

My first idea: reuse CDCL proofs OCDCL = CDCL + improve +
 {-M. cost M ≥ min_cost} My second idea: CDCLbnb = CDCL + improve +
 T(min_cost)

9

reuse CDCL proofs

slide-10
SLIDE 10

How lazy do you like your
 formalisation?

CDCLbnb = CDCL + improve +
 T(min_cost) OCDCL = CDCLbnb where
 T(min_cost) = {-M. cost M ≥ min_cost} OCDCLW = OCDCL + restrictions

10

slide-11
SLIDE 11

Reuse!

CDCLbnb CDCL

by removing the additional component,
 is a special case of definitions and invariants

CDCL

properties

11

can be seen as a fragment of

slide-12
SLIDE 12

Reuse!

C ∨ L ∈ N ⟹ M ⊨as ¬C ⟹ undefined_lit M L ⟹
 (M, N) ⇒CDCL (L # M, N)

in Isabelle

Propagate rule

C ∨ L ∈ N ⟹ M ⊨as ¬C ⟹ undefined_lit M L ⟹
 (M, N, O) ⇒CDCLbnb (L # M, N, O)

in Isabelle

Propagate rule

  • btained for free, thanks to abstraction over the state!


also invariants and theorems can be reused

12

slide-13
SLIDE 13

Reuse!

CDCLbnb CDCL

by removing the additional component,
 is a special case of definitions and invariants

CDCL

properties

13

can be seen as a fragment of

slide-14
SLIDE 14

Translate to reuse

C ∨ L ∈ N+T(min_cost) ⟹ M ⊨as ¬C ⟹
 undefined_lit M L ⟹
 (M, N + T(min_cost), O) ⇒CDCL 


(L # M, N + T(min_cost), O)

in Isabelle

Propagate rule

C ∨ L ∈ N ⟹ M ⊨as ¬C ⟹ undefined_lit M L ⟹
 (M, N, O) ⇒CDCLbnb (L # M, N, O)

in Isabelle

Propagate rule

14

slide-15
SLIDE 15

Reuse!

CDCLbnb CDCL

by removing the additional component,
 is a special case of can be seen as a fragment of definitions and invariants

CDCL

properties

15

slide-16
SLIDE 16

CDCLbnb = CDCL + improve +
 T(min_cost)

ignore the additional
 component

Inherited: Definitions (for free)

16

Reuse in practise!

slide-17
SLIDE 17

CDCLbnb = CDCL + improve +
 T(min_cost)

no strategy
 but terminating well-founded
 for most applications

Termination (for free) Inherited:

Reuse in practise!

17

Definitions (for free)

slide-18
SLIDE 18

CDCLbnb = CDCL + improve +
 T(min_cost)

strategy strategy invariants
 holds improve can
 always be applied


  • n total models

Ends with an unsat set (nearly for free) Inherited: Termination (for free)

Definitions (for free)

18

Reuse in practise!

CDCLbnb does not know anything about what is optimised!

slide-19
SLIDE 19

OCDCL = CDCLbnb where
 T(min_cost) = {-M. cost M ≥ min_cost} If I is a total model of N with cost < min_cost,
 then I is a model of N+T(min_cost)

Why does it work?

19

Lemma

slide-20
SLIDE 20

If I is a total model of N with cost < min_cost,
 then I is a model of N+T(min_cost)

Why does it work?

20

Lemma

Fails for partial models!

slide-21
SLIDE 21

How lazy do you like your
 formalisation?

OCDCLW = OCDCL + restrictions

21

make sure that the rules on paper
 and in Isabelle are the same

slide-22
SLIDE 22

Another application:
 Dead features

=

⟹ ⟹ ¬

Can every option be true?

22

slide-23
SLIDE 23

How lazy do you like your
 formalisation?

CDCLcmW = CDCL + improve + conflict rules Christoph’s view: copy-paste of proofs My idea: CDCLcm = CDCLbnb where
 T(models_founds) = {-M. there is a model with
 more trues in models_founds}

23

slide-24
SLIDE 24

How lazy do you like your
 formalisation?

Lines of codes (kloc) CDCLbnb 2,0 OCDCL 1,8 OCDCLW 1,0 Partial Encoding 1,2 MaxSAT 0,4

can solve (a lot of boilerplate)

24

slide-25
SLIDE 25

Concrete outcome

  • CDCL with branch and bound
  • Via an encoding, also partial optimal models

Conclusion

Methodology

  • Locales, locales, locales
  • Be lazy!

Future work

  • CDCL(T)

25

OCDCL = CDCLbnb where
 T(min_cost) = {-M. cost M ≥ min_cost} OCDCL = CDCLbnb where
 T(min_cost) = {-D. {M. cost M ≥ min_cost} ⊧ D}

slide-26
SLIDE 26

Conclusion: How about CDCL(T)?

CDCLbnb where
 T = {clauses entailed theory} But isn’t CDCL(T) exactly: Not exactly, because the wrong conflict
 clause (negation of the trail) is used

26

slide-27
SLIDE 27

Translate to reuse

C ∨ L ∈ N + T(min_cost) ⟹ M ⊨as ¬C ⟹
 undefined_lit M L ⟹
 (M, N + T(min_cost), O) ⇒CDCLbnb 


(L # M, N + T(min_cost), O)

in Isabelle

Propagate rule

Theory propagation

27