Title: Decision Procedures for Equality Logic 3
1Decision Procedures for Equality Logic 3
2Decision Procedures for Equality Logic
- We will first investigate methods that solve
Equality Logic. Uninterpreted functions are
eliminated with one of the reduction schemes. - Our starting point the E-Graph GE(?E)
- Recall GE(?E) represents an abstraction of
?EIt represents ALL equality formulas with the
same set of equality predicates as ?E
3From Equality to Propositional LogicBryant
Velev 2000 the Sparse method
- ?E x1 x2 x2 x3 x1 ? x3
- ?enc e1 e2 e3
- Encode all edges with Boolean variables
- (note for now, ignore polarity)?
- This is an abstraction
- Transitivity of equality is lost!
- Must add transitivity constraints!
4From Equality to Propositional Logic
- ?E x1 x2 x2 x3 x1 ? x3
- ?enc e1 e2 e3
- For each cycle add a transitivity constraint
- ?trans (e1 e2 ! e3) (e1 e3 ! e2)
- (e3 e2 ! e1)?
- Check ?enc ?trans
5From Equality to Propositional Logic
- There can be an exponential number of cycles, so
lets try to make it better. - Thm It is sufficient to constrain simple cycles
only
e2
e3
e4
e1
e5
e6
Only two simple cycles here.
6From Equality to Propositional Logic
- Still, there is an exponential number of simple
cycles. - Def A chord of a cycle is an edge connecting two
non-adjacent nodes of the cycle. - Thm Bryant Velev It is sufficient to
constrain chord-free simple cycles only.
x
y
The edge xv is a chord of the cycle xyvz.
z
v
7From Equality to Propositional Logic
- Still, there can be an exponential number of
chord-free simple cycles - Solution make the graph chordal by adding
edges.
.
8From Equality to Propositional Logic
- Def. A graph is chordal iff every cycle of size 4
or more has a chord. - Def. A vertex v of an arbitrary graph G is called
simplicial if all vertices adjacent to v are
pairwise adjacent. - How to recognize chordal graphs?Repeatedly find
a simplicial vertex and eliminate it from the
graph until no vertices remain (and the graph is
chordal) or no simplicial vertices remain (and
the graph is non-chordal).
9(No Transcript)
10From Equality to Propositional Logic
- How to make a graph chordal ? Make
non-simplicial vertices simplicial by adding
edges.
11From Equality to Propositional Logic
- Once the graph is chordal, we can constrain only
the triangles. - Note that this procedure adds not more than a
polynomial of edges, and results in a
polynomial no. of constraints.
T
T
T
T
Contradiction!
T
F
T
12Improvement
- So far we did not consider the polarity of the
edges. - Claim in the following graph ?trans e3 e2 !
e1 is sufficient - This is only true because of monotonicity of NNF
13Definitions
- Def. A contradictory cycle C is constrained under
T? if T does not allow this assignment
14Theorem
red
- If ?trans constrains all simple contradictory
cycles and - for every assignment ?, ? ² ?trans ! ? ² ?trans
- then ?E is satisfiable iff ?enc ?trans is
satisfiable
red
red
From the Sparse method
The equality formula