Decision Procedures for Equality Logic 2 - PowerPoint PPT Presentation

About This Presentation
Title:

Decision Procedures for Equality Logic 2

Description:

Decision Procedures for Equality Logic 2. Deciding equality logic with UFs: ... unite the equivalence classes of x and y. For each function symbol F, unite the ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 15
Provided by: wwwi2Info
Category:

less

Transcript and Presenter's Notes

Title: Decision Procedures for Equality Logic 2


1
Decision Procedures for Equality Logic 2
2
Deciding equality logic with UFs Shostak's
Congruence-closure
  • Input Equality Logic formula ?UF
  • Convert ?UF to DNF
  • For each clause
  • Define an equivalence class for each variable and
    each function instance.
  • For each equality x y unite the equivalence
    classes of x and y. For each function symbol F,
    unite the classes of F(x) and F(y). Repeat until
    convergence.
  • If all disequalities are between terms from
    different equivalence classes, return 'SAT'.
  • Return 'UNSAT'.

3
Problems with Shostak's algorithm
  • The method is basically for conjunctions of
    equalities
  • In the original presentation, Shostak implemented
    support for disjunctions by means of
    case-splitting, which is the bottleneck of this
    method
  • Hier DNF conversion
  • Variants exists with time complexity O(n log n)?
  • How to solve the general case with arbitrary
    Boolean structure efficiently?

4
Basic notions
  • ?E x y y z z ? x
  • The Equality predicates x y, y z, z ?
    xwhich we can break to two sets E x y,
    y z, E? z ? x
  • The Equality Graph GE(?E) hV,E,E?i(a.k.a
    E-graph)?

5
  • Def. The equality literals set E of an equality
    logic formula ?E is the set of positive literals
    in ?E. The disequality literals set E? of an
    equality logic formula ?E is the set of
    disequality literals in ?E.
  • Def. Given an equality logic formula ?E in NNF,
    the equality graph that corresponds to ?E,
    denoted by GE(?E), is an undirected graph
    (V,E,E?), where - the nodes in V correspond to
    the variables in ?E, - the edges in E
    correspond to the predicates in the equality
    literals set of ?E and - the edges in E?
    correspond to the predicates in the
    disequality literals set of ?E.

6
Basic notions
  • ??E x y y z z ? x unsatisfiable
  • ???2E x y y z _ z ? x satisfiable
  • The graph GE(?E) represents an abstraction of ?E
  • It ignores the Boolean structure of ?E

7
Basic notions
  • Def A path made of E edges is an equality
    path.We write x z.
  • Def A path made of E edges exactly one edge
    from E??is a disequality path. We write x ?y.

8
Basic notions
  • Def. A cycle with exactly one disequality edge is
    a contradictory cycle.
  • In a contradictory cycle, for every two nodes x,y
    it holds that x y and x ? y.

9
Basic notions
  • Def A subgraph is called satisfiable iff the
    conjunction of the predicates represented by its
    edges is satisfiable.
  • Thm A subgraph is unsatisfiable iff it contains
    a contradictory cycle.

10
Basic notions
  • Def A cycle is simple if it is represented by a
    path in which none of the vertices is repeated,
    other than the starting and ending vertices.
  • Thm Every contradictory cycle is either simple
    or contains a simple contradictory cycle.

11
Simplifications
  • Assume that ?E is in NNF.
  • Thm Replacing each pure literal in ?E whose
    corresponding edge is not part of any simple
    contradictory cycle with true preserves
    satisfiability.

12
Simplification example
x3
True
False
x4
x2
True
x1
  • (x1 x2 _ x1 ? x4) (x1 ? x3 _ x2 x3)?
  • (x1 x2 _ True) (x1 ? x3 _ x2 x3)?
  • Satisfiable!

13
Simplification proof sketch
x3
x4
x2
True
x1
  • (x1 x2 _ x1 ? x4) (x1 ? x3 _ x2 x3)?
  • (x1 x2 _ True ) (x1 ? x3 _ x2 x3)?
  • ) monotonicity of NNF formulas only pure
    literals are replaced by true
  • ( Assume sat. assignment e.g. x1 0, x2 x3
    1, x4 2.Shift assignments such that the
    literals replaced by true get true, e.g. shift
    (the equivalence class of) x4 by minus 2.

14
Syntactic vs. Semantic splits
  • So far we saw how to handle disjunctions through
    syntactic case-splitting.
  • There are much better ways to do it than simply
    transforming it to DNF!
  • Now we start looking at methods that split the
    search space instead. This is called semantic
    splitting.
  • SAT is a very good engine for performing semantic
    splitting, due to its ability to guide the
    search, prune the search-space etc.
Write a Comment
User Comments (0)
About PowerShow.com