Seminar on Decision Procedures Problem 1 WS1S

Seminar on Decision Procedures
By Ruzica Piskac
Seminar on Decision Procedures
Ruzica Piskac
Problem 1
WS1S
1. Convert the following WS1S formula to equivalent WS1S0 formula.
∃x∃y(x < 3 ∧ y < x)
2. Determine the validity/satisfiability of the following formulas using the decision
procedure shown in the lecture (by automaton construction).
∀x.∃P.x ∈ P
¬∃y.S(y, x)
Problem 2
Array Property Fragment
1. Apply the decision procedure for the array property fragment of the theory of
arrays TA in order to decide validity of the following ΣA -formulae:
• ∃j. ahi C ei[j] = e
• ∀j. ahi C ei[j] = e
2. Apply the decision procedure for the array property fragment of the theory of
integer-indexed arrays TAZ in order to decide validity of the following ΣZA -formula:
sorted(a, l, k) ∧ sorted(a, k, u) → sorted(a, l, u)
Recall the definition of the sorted predicate:
sorted(a, l, u)
:=
∀i, j. l ≤ i ≤ j ≤ u → a[i] ≤ a[j]
Hint: Substitute sorted in the formula by its definition.
1
Seminar on Decision Procedures
Problem 3
By Ruzica Piskac
Bitvectors
Consider the following bitvector formula defined over variables x[2] , y[4] , and z[4] .
(x[2] ◦ y[4] [3 : 3])[1 : 2] ◦ (z[4] ◦ y[4] ◦ 0[2] )[0 : 3] = (x[2] ◦ z[4] )[4 : 5] ◦ y[4] [0 : 2] ◦ 0[1]
Check the satisfiability of the above formulas, and, if satisfiable, construct the solution
using:
• the naïve method introduced in the lecture
• the improved method introduced in the lecture
Problem 4
Nelson-Oppen Combination Procedure
Using the Nelson-Oppen combination method check the satisfiability of the following
formulas:
• x + y = 0 ∧ f (x) + f (−y) = 1 (theories: TZ and TE )
• g(x + y, z) = f (g(x, y)) ∧ x + z = y ∧ z ≥ 0 ∧ x ≥ y ∧ g(x, x) = z ∧ f (z) 6= g(2x, 0)
(theories: TQ and TE )
• c + d = e ∧ f (e) = c + d ∧ f (f (c + d)) 6= e (theories: TZ and TE )
2
Seminar on Decision Procedures
Problem 5
By Ruzica Piskac
DPLL(T)
Use DPLL(T) to check the satisfiability of the following formulas. In all the assignments, when you use TheoryPropagation, explain why your use of TheoryPropagation
is correct. If you terminate with a satisfying assignment, make sure your assignment
is T-consistent. Finally, when you use the Backjump rule, show how you computed
the Backjump clause.
• Check the satisfiability of the following set of clauses in the theory of equality
with uninterpreted functions:
C1
C2
C3
C4
C5
:
:
:
:
:
{a = b, c 6= b}
{f (a) 6= f (c), g(b) 6= f (a), a = b}
{g(g(a)) 6= g(g(b)), q}
{¬q, c = b}
{g(a) 6= g(b), a = c}
• Check the satisfiability of the following set of clauses belonging to the difference
logic:
C1
C2
C3
C4
C5
C6
:
:
:
:
:
:
{y − z ≤ 1, z − u ≤ 1}
{u − y ≤ −3, z − u ≤ 1}
{u − z ≤ 0, w − y ≤ −2}
{w − u ≤ −2, u − w ≤ −2}
{y − w ≤ 1}
{z − u ≤ −2, z − y ≤ −4}
3