Hypothetical reasoning in propositional satisfiability
This presentation is the property of its rightful owner.
Sponsored Links
1 / 48

Hypothetical Reasoning in Propositional Satisfiability PowerPoint PPT Presentation


  • 95 Views
  • Uploaded on
  • Presentation posted in: General

Hypothetical Reasoning in Propositional Satisfiability. Joao Marques-Silva Technical University of Lisbon, IST/INESC, CEL Lisbon, Portugal. SAT’02, May, 2002. Hypothetical Reasoning. Preliminary ongoing research work Not yet published

Download Presentation

Hypothetical Reasoning in Propositional Satisfiability

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Hypothetical reasoning in propositional satisfiability

Hypothetical Reasoning inPropositional Satisfiability

Joao Marques-Silva

Technical University of Lisbon,

IST/INESC, CEL

Lisbon, Portugal

SAT’02, May, 2002


Hypothetical reasoning

Hypothetical Reasoning

  • Preliminary ongoing research work

    • Not yet published

      • Main ideas available as a (preliminary) technical report:

        • I. Lynce and J. Marques-Silva, “Hypothetical Reasoning in Propositional Satisfiability,” Technical Report 1/2002, INESC-ID, March 2001

        • http://sat.inesc.pt/~jpms/research/tech-reports/RT-01-2002.pdf

    • Some of the concepts still evolving

  • Feedback welcome !

  • Joint work with Ines Lynce


Motivation

Motivation

  • SAT solvers have been the subject of significant improvements in recent years

  • The utilization of SAT is increasing in industry

    • More challenging problem instances

  • Improvements to current key techniques unlikely(?)

    • Better (non-chronological) backtracking?

    • Better data structures?

    • Newer (more competitive) strategies?

  • How to improve SAT solvers?

    • Devise new paradigms…

    • Integrate already used techniques


Outline

Outline

  • Notation & Definitions

  • Evolution of SAT Solvers

    • Overview established approaches

  • Next challenges in SAT

  • Other promising approaches

  • Our proposed approach

  • Hypothetical reasoning (HR)

    • The overall approach

    • Applying reasoning conditions

      • Relation with other existing techniques

  • Preliminary experimental results


Notation definitions

Notation & Definitions

  • CNF Formula, clauses, literals:

    • A CNF formula () is a conjunction of clauses

    • A clause () is a disjunction of literals

    • A literal (l) is a propositional variable or its complement

  • Assignments:

    • x, 0 denotes the assignment of value 0 to variable x

    • Can also use x = 0 to denote an assignment

j = (a + c)(b + c)(d + c)(¬a + ¬b + ¬c)

j = (a c)(b c)(d c)(¬a  ¬b ¬c)


Notation definitions cont d

Notation & Definitions (Cont’d)

  • Unit-clause rule:

    • If clause  is unit (has a single free literal l), then the free literal l must be satisfied for the clause to be satisfied

    • Iterated application of the unit-clause rule is referred to as unit propagation (UP) or boolean constraint propagation (BCP)

    • BCP(x, vx): denotes the set of implied variable assignments obtained by applying BCP as the result of the triggering assignment x, vx

      • If BCP( x, vx) unsatisfies one or more clauses, then we say that   BCP( x, vx)


A taxonomy of sat algorithms

Incomplete

Complete

Can prove unsatisfiability

Cannot prove unsatisfiability

Continuous formulations

Genetic algorithms

Simulated annealing

Tabu search

...

A Taxonomy of SAT Algorithms

SAT Algorithms

Backtrack search (DPLL)

Local search (hill climbing)

Resolution (original DP)

Stalmarck’s method (SM)

Recursive learning (RL)

BDDs

...


The most effective sat solvers

The Most Effective SAT Solvers

  • Backtrack search

  • Boolean constraint propagation

  • “Reasonable” branching heuristic

  • Clause recording

    • Non-chronological backtracking

  • Search strategies

    • Restarts

    • Random backtracking

  • Efficient data structures

    • E.g. head/tail lists; watched literals; literal sifting

  • Examples: BerkMin; Chaff; SATO; rel_sat; GRASP


Other effective sat solvers

Backtrack search

Unit propagation

Chronological backtracking

Fine-tuned branching heuristics

Probing & reasoning techniques

Lookahead (variable probing)

Equivalency reasoning

Search strategies

Restarts

Efficient data structures

E.g. head/tail lists

Examples:

EQSATZ

Built on top of SATZ

Uses equivalency reasoninig

RAND-SATZ

Built on top of SATZ

Branching randomization

Search restarts

SATZ

No search restarts

No equivalency reasoning

Forms of look-ahead probing

Other Effective SAT Solvers


Other dedicated sat solvers

Other Dedicated SAT Solvers

  • Local search for dedicated classes of instances

    • Incomplete class of algorithms

    • Useful if instances known to be satisfiable

  • Solvers with domain-specific information

    • Incremental SAT

    • SAT on Boolean networks


Challenging problem instances

Challenging Problem Instances

  • SAT is being applied in industrial settings

    • Electronic design automation

    • Formal verification of hardware/software systems

  • SAT solvers are expected to handle problem instances:

    • that have hundred thousand / few million variables

    • that have tens of million clauses

    • that may be unsatisfiable

      • SAT solvers must be capable of proving unsatisfiability

        • completeness is a key issue !


Challenges to sat solvers

Challenges to SAT Solvers

  • Dramatic improvements to backtrack search SAT solvers unlikely

    • Can utilize equivalency reasoning

      • Hard to interact with clause recording and non-chronological backtracking

    • Can apply lookahead techniques

      • Hard to interact with clause recording and non-chronological backtracking

    • Can devise new search strategies

      • Search restarts, random backtracking, … ?


Other approaches

Other Approaches

  • Resolution

    • Unlikely to be a practical proof procedure

  • Variable probing (branch-merge rule)

  • Clause probing (recursive learning)

    • Not (yet) extensively evaluated

  • Additional mechanisms for identifying necessary assignments and inferring new clauses

    • Integrated solution still lacking


Resolution original dp

Resolution (original DP)

  • Iteratively apply resolution (consensus) to eliminate one variable each time

    • i.e., resolution between all pairs of clauses containing x and ¬x

    • formula satisfiability is preserved

  • Stop applying resolution when,

    • Either empty clause is derived  instance is unsatisfiable

    • Or only clauses satisfied or with pure literals are obtained  instance is satisfiable

j = (a + c)(b + c)(d + c)(¬a + ¬b + ¬c)

Eliminate variable c

1= (a + ¬a + ¬b)(b + ¬a + ¬b )(d + ¬a + ¬b )

= (d + ¬a + ¬b )

Instance is SAT !


Stalmarck s method sm in cnf

Recursion can be of arbitrary depth

Stalmarck’s Method (SM) in CNF

  • Recursive application of the branch-merge ruleto each variable with the goal of identifying common conclusions

j = (a+ b)(¬a+ c) (¬b + d)(¬c + d)

j = (a+ b)(¬a+ c) (¬b+ d)(¬c + d)

j = (a + b)(¬a + c) (¬b + d)(¬c + d)

j = (a+ b)(¬a+ c) (¬b + d)(¬c+ d)

Try a = 0:

(a = 0)  (b = 1)  (d = 1)

C(a = 0) = {a = 0, b = 1, d = 1}

Try a = 1:

(a = 1)  (c = 1)  (d = 1)

C(a = 1) = {a = 1, c = 1, d = 1}

C(a = 0)  C(a = 1) = {d = 1}

Any assignment to variable a implies d = 1.

Hence, d = 1 is a necessary assignment !


An alternative explanation for sm

resolution

(b + c)

resolution

(c + d)

resolution

(d)

An Alternative Explanation for SM

j = (a + b)(¬a + c) (¬b + d)(¬c + d)

Sequence of resolution

operations for finding

necessary assignments

Comment: SM provides a

mechanism for identifying

suitable resolution operations


Recursive learning rl in cnf

Recursion can be of arbitrary depth

Recursive Learning (RL) in CNF

  • Recursive evaluation of clause satisfiability requirements for identifying common assignments

 = (a + b)(¬a + d) (¬b + d)

 = (a+ b)(¬a+ d) (¬b + d)

 = (a + b)(¬a + d) (¬b + d)

 = (a + b)(¬a + d) (¬b+ d)

Try a = 1:

(a = 1)  (d = 1)

C(a = 1) = {a = 1, d = 1}

Try b = 1:

(b = 1)  (d = 1)

C(b = 1) = {b = 1, d = 1}

Every way of satisfying (a + b) implies d = 1. Hence, d = 1 is a necessary assignment !

C(a = 1)  C(b = 1) = {d = 1}


An alternative explanation for rl

resolution

(b + d)

resolution

(d)

An Alternative Explanation for RL

 = (a + b)(¬a + d) (¬b + d)

Sequence of resolution

operations for finding

necessary assignments

Comment: RL provides yet

another mechanism for identifying

suitable resolution operations


Sm vs rl

SM vs. RL

  • Both complete procedures for SAT

  • Stalmarck’s method (in CNF):

    • hypothetical reasoning based on variables

    • use variable assignment conditions to probe assignments

      • variable probing

  • Recursive learning (in CNF):

    • hypothetical reasoning based on clauses

    • use clause satisfiability conditions to probe assignments

      • clause probing

  • Both can be viewed as the process of identifying selective resolution operations

  • Both can be integrated into backtrack search algorithms


The objectives of hr

Integrate variable probing and clause probing

Complete proof procedure for SAT

Devise conditions for a priori identification of new clauses

That entail most of existing clause inference procedures

Evolve from identification of necessary assignments to generalized clause reasoning

Applications:

Complete proof procedure for SAT

Preprocessing engine to existing SAT solvers

With polynomial effort

Replace unit propagation with HR with backtrack search solvers

With polynomial effort

Cooperate with backtrack search solvers

In parallel solutions for SAT

The Objectives of HR


The organization of hr

The Organization of HR

  • Recursive procedure that:

    • Extends variable probing

      • To incorporate clause probing

      • Ensures completeness

    • Establishes general clause inference conditions

      • That cover (most) existing clause inference conditions

    • Readily implements a number of additional techniques

      • 2-var equivalence; hyper resolution (with binary clauses); equivalency reasoning; binary clause inference conditions; …

  • Can be integrated into backtrack search


How to implement hr

How to Implement HR ?

  • Independent probing, given conditions on variables and on clauses, may not be practical

    • O(L2+ L N) = O(L2) at each step

      • L: number of literals

      • N: number of variables

  • Construct assignment & trigger tables, for implementing variable and clause probing

    • O(L N) at each step

      • In practice, worst-case complexity is extremely unlikely

    • OBS: unrestricted clause inference conditions are computationally hard to implement


Assignment table

Assignment Table

  • Captures the result of applying BCP to each variable assignment

  • Create a (2N x 2N) matrix:

    • Each row is associated with an assignment x, vx

    • 1-valued entries denote assignments y, vy implied by BCP due to trigger assignment x, vx, i.e. BCP(x, vx)

  • OBS: In practice can use a sparse matrix representation !


Assignment table example

Assignment Table (Example)

  • b, 0 implies (with BCP) the assignments b, 0, c, 0 and d, 0


Trigger table

Trigger Table

  • Captures which variable assignments directly imply (w/ BCP) each variable assignment

  • Create a (2N x 2N) matrix:

    • Each row is associated with an assignment x, vx

    • 1-valued entries denote assignments y, vy that imply, with BCP, the assignment x, vx

  • OBS: The trigger table is the transpose of the assignment table !

    • Required to create trigger table if using a sparse matrix representation of the assignment table


Trigger table example

Trigger Table (Example)

  • b, 1 is implied (due to BCP) by the assignments a, 0, a, 1 and b, 1


Utilizations of assignment tables

For both assignments to a, a, 0 and a, 1 , we obtain b, 1.

b, 1 is a necessary assignment

Utilizations of Assignment Tables

  • Necessary assignments from variable assignment conditions — variable probing


Utilizations of assignment tables1

Every assignment that

satisfies (b  d), also implies c, 0.

c, 0 is a necessary assignment

Utilizations of Assignment Tables

  • Necessary assignments from clause satisfiability conditions — clause probing

    • Assuming existence of clause (b  d)


Utilizations of assignment tables2

One of these assignments must hold (because of a)

 create clause (b  c)

Utilizations of Assignment Tables

  • Clause inference from variable assignment conditions


Utilizations of assignment tables3

Assume clause  = (a  b  c) exists. Each assignment that satisfies  implies either c, 0 or d, 0

 create clause (c  d)

Utilizations of Assignment Tables

  • Clause inference from clause satisfiability conditions


Utilizations of trigger tables

The assignments a, 0 and b, 1 imply the assignments c, 0 and c, 1; are disallowed

 create clause (a  b)

Utilizations of Trigger Tables

  • Clause inference from variable assignment conditions


Utilizations of trigger tables1

Assume clause  = (c  d) exists. The assignments a, 0 or b, 0 unsatisfy .

 create clause (a  b)

Utilizations of Trigger Tables

  • Clause inference from clause unsatisfiability conditions


Reasoning conditions summary

Reasoning Conditions Summary

  • Necessary assignments:

    • From variable assignment conditions(variable probing)

    • From clause satisfiability conditions(clause probing)

  • Inferred clauses:

    • Satisfiability conditions

      • Variable assignments

      • Clause satisfiability

    • Unsatisfiability conditions

      • Variable assignments

      • Clause satisfiability


Inference of clauses

Inference of Clauses

  • HR reasoning conditions can only infer binary clauses ?

    • No. Can infer arbitrary clauses !

    • Clause satisfiability conditions:

      • For each clause  = (t1  t2   tm) of formula , all clauses of the form (s1  s2   sm), such that s1, s2,,sm BCP(t1, 1)  …  BCP(tm, 1), are implicates of 

        • Clearly subsumption can potentially be applied

    • Clause unsatisfiability conditions:

      • For each set of assignments A = {t1, 0, t2, 0, , tm, 0 }, such that   BCP(t1, 0)  BCP(t2, 0)    BCP(tm, 0), then clause  = (t1  t2   tm)is an implicate of 


Reasoning conditions complexity

Reasoning Conditions Complexity

  • O(L N) for constructing assignment & trigger tables and implementing variable and clause probing

  • Why ?

    • BCP for filling each row is O(L)

    • For the 2N rows, construction of table is O(L N)

    • Each set intersection can trivially be accomplished in O(N)!

    • All intersections can be done in O((N + L) N) = O(L N)

      • Corresponding to variable and clause probing

    • Total time complexity is O(L N)

    • OBS: In practice worst-case complexity extremely unlikely

    • OBS: unrestricted clause inference conditions are computationally hard to implement; must use restrictions


The hr algorithm

O(L N)

Can loop O(N) times

Polynomial time if depth is constant !

The HR Algorithm

  • Basic HR algorithm (with depth d, target variables V)

    • return if depth d  0

    • For each variable v in set of target variables V

      • For each assignment to variable v

        • L1: Apply unit propagation (BCP)

          • Apply (tabular) reasoning conditions

          • Recur HR with depth (d-1)

          • Re-apply (tabular) reasoning conditions

        • [Optional] Loop from L1 if more assignments


Relation with other techniques

Relation with Other Techniques

  • Assignment & Trigger tables naturally capture:

    • Variable probing (branch-merge rule)

      • Lookahead techniques

    • Clause probing (recursive learning)

    • New clause inference conditions

  • Assignment & Trigger tables allow capturing:

    • Failed-literal rule

    • Two-variable equivalence

    • Closure of binary clause implication graph

    • Literal dropping

    • Equivalency-reasoning / Inference of binary clauses

    • Hyper resolution (with binary clause inference)

    • … ?


Relation with other techniques1

Relation with Other Techniques

  • Failed literal rule:

    • If an assignment x, 0 yields an unsatisfied clause, then x, 1 is a necessary assignment

    • In the construction of the assignment table,

      • If   BCP(x, 0), then x, 1 is a necessary assignment


Relation with other techniques2

Relation with Other Techniques

  • 2-variable equivalence:

    • First form:

      • If both (x  y) and (y  x) exist in formula, then x  y

    • Second form:

      • Utilize binary clause implication graph

      • Identify strongly connected components (SCCs)

        • If x, 0 and y, 0 in the same SCC, then x  y

    • If, from construction of the assignment table, y, 0 BCP(x, 0) and y, 1 BCP(x, 1), then x  y

      • Captures all SCCs in binary clause implication graph

      • Can identify additional 2-variable equivalences !


Relation with other techniques3

Relation with Other Techniques

  • Closure of binary clause implication graph:

    • If l1, 1  l2, 1 and l2, 1  l3, 1, then l1, 1  l3, 1 and infer clause (l1  l3)

    • From construction of the assignment table, if l2, 1 BCP(l1, 1), then create clause (l1  l2)

      • Captures the identification of the transitive closure of the implication graph

      • Can identify additional implications (and clauses) !


Relation with other techniques4

Relation with Other Techniques

  • Literal dropping [Dubois & Dequen, IJCAI’01]:

    • Given a clause  = (l1  l2   lk), if exists a proper subset of literals {s1, s2, …, sj } of , such that

      •   BCP(s1, 0  s2, 0    sj, 0), then create a new clause (s1  s2   sj), that subsumes 

    • Using the assignment table, if exists a set of assignments A = {t1, 0, t2, 0, , tm, 0 }, such that   BCP(t1, 0)  BCP(t2, 0)    BCP(tm, 0), then create the clause:

      •  = (t1  t2   tm)

    • Two techniques similar, but not comparable

      • Literal dropping less general (starts from existing clauses), but more accurate (considers BCP of set of assignments)


Relation with other techniques5

Relation with Other Techniques

  • Equivalency reasoning [Li, AAAI’00]:

    • Shown to be covered with:

      • Unit propagation; 2-variable equivalence; conditions for inferring binary clauses

  • Binary clause inference conditions [MS, CP’00]:

    • Inference from pattern 2B/1T:

      • Given (l1  x)  (l2  x)  (l1  l2  y), infer (x  y)

      • From the assignment table:

        • If x, 0  y, 1, then infer the clause (x  y)


Relation with other techniques6

Relation with Other Techniques

  • Binary clause inference conditions [MS, CP’00]:

    • Inference from pattern 0B/4T:

      • Given (l1  l2  x)  (l1  l2  x)  (l1  l2  y)  (l1  l2  y), infer clause (x  y)

    • From the assignment table:

      • Assume l1 = 0(depth 1)

        • Can infer (x  y)(depth 2)

          • From (l2  x)  (l2  y),

      • Assume l1 = 1(depth 1)

        • Can infer (x  y)(depth 2)

          • From (l2  x)  (l2  y),

      •  infer (x  y)

        • But HR with depth 2 required !


Relation with other techniques7

Relation with Other Techniques

  • Hyper resolution (w/ binary clauses) [Bacchus, SAT’02]:

    • Allows inference of binary clause

    • Given (l1  x)  (l2  x)    (lk  x)  (l1  l2   lk  y), infer (x  y)

    • From the assignment table:

      • If x, 0  y, 1, then infer the clause (x  y)


Preliminary results

Preliminary Results

  • Implemented reasoning conditions on top of JQuest

    • Assigment tables

    • Trigger tables

    • Necessary assignments

      • Probing due to variables and clauses (binary and ternary)

    • Clause inference conditions

      • Simplified version: only binary clauses can be inferred

  • Results for reasoning conditions on example problem instances

    • #Vars: number of variables; #Cls: number of clauses

    • #NA: necessary of assignments; #IBC: inferred binary clauses


Experimental results

Experimental Results


Implementing completing hr

Implementing/Completing HR

  • Implement (efficient) recursive wrapper

    • Incrementally define set of variables in recursive step

      • Reduce significantly the number of row updates in assignment and trigger tables

  • Instead of BCP-based reasoning conditions, evolve to clause-based reasoning conditions

  • How to use HR?

    • Standalone complete proof procedure ?

    • Integrated within backtrack search SAT solver ?

      • Hard to interact with clause recording and non-chronological backtracking

    • Used as a preprocessing engine to backtrack search SAT solvers ?


Conclusions

Conclusions

  • Proposed the Hypothetical Reasoning algorithm

    • Integrates variable probing (branch-merge rule) and clause probing (recursive learning)

    • Implements a number of additional techniques

      • That allow inferring new clauses

      • That entail most existing clause inference conditions

      • That entail a significant number of simplification techniques

  • Preliminary results for practical problem instances:

    • By applying reasoning conditions,

      • a significant number of necessary assignments can be identified and a significant number of new clauses can be inferred


  • Login