10.07.2015 Views

Classifying and Solving Horn Clauses for Verification - Lab for ...

Classifying and Solving Horn Clauses for Verification - Lab for ...

Classifying and Solving Horn Clauses for Verification - Lab for ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

14 Rümmer, Hojjat, Kuncak(1) r1(X, Res) ← true(2) r2(X’, Res) ← r1(X, Res) ∧ X’ ≥ 0(3) r3(X, Res’) ← r2(X, Res) ∧ rf(X, Res’)(5) false ← r3(X, Res) ∧ Res X + 1(6) r5(N, Rec, Tmp) ← true(7) r6(N, Rec, Tmp) ← r5’(N, Rec, Tmp) ∧ N > 0(8) r7(N, Rec, Tmp’) ← r6(N, Rec, Tmp) ∧ rf’(N − 1, Tmp’)(9) r8(N, Rec, Tmp) ← r5(N, Rec, Tmp) ∧ N ≤ 0(10) r9(N, Rec’, Tmp) ← r7(N, Rec, Tmp) ∧ Rec’ = Tmp + 1(11) r9(N, Rec’, Tmp) ← r8(N, Rec, Tmp) ∧ Rec’ = 1(12) rf (N, Rec) ← r9(N, Rec, Tmp)(6’) r5 ’( N, Rec, Tmp) ← true(6’’) r5’’(N, Rec, Tmp) ← true(9’) r8 ’( N, Rec, Tmp) ← r5’’(N, Rec, Tmp) ∧ N ≤ 0(11’) r9 ’( N, Rec’, Tmp) ← r8’(N, Rec, Tmp) ∧ Rec’ = 1(12’) rf ’( N, Rec) ← r9’(N, Rec, Tmp)There are two maximum tree-like subsets: T 1 = {(1), (2), (3), (5), (6), (9), (11), (12)},<strong>and</strong> T 2 = {(1), (2), (3), (5), (7), (8), (10), (12), (6 ′ ), (6 ′′ ), (9 ′ ), (11 ′ ), (12 ′ )}. The subset T 1has been discussed in Example 1. In the same way, it is possible to construct a solution<strong>for</strong> T 2 by solving a tree interpolation problem. The two solutions can be combined toconstruct a solution of T 1 ∪ T 2 :T 1 T 2 T 1 ∪ T 2r 1 (x, r) true true truer 2 (x, r) x ≥ 0 true x ≥ 0r 3 (x, r) r = x + 1 r = x + 1 r = x + 1r 5 (n, c, t) true true truer 6 (n, c, t) − n ≥ 1 n ≥ 1r 7 (n, c, t) − t = n t = nr 8 (n, c, t) n ≤ 0 − n ≤ 0r 9 (n, c, t) n ≤ −1 ∨ (c = 1 ∧ n = 0) c = n + 1 n ≤ −1 ∨ c = n + 1r f (n, c) n ≤ −1 ∨ (c = 1 ∧ n = 0) c = n + 1 n ≤ −1 ∨ c = n + 1r ′ 5r ′′5r ′ 8r ′ 9r ′ f(n, c, t) − true true(n, c, t) − true true(n, c, t) − n ≤ 0 n ≤ 0(n, c, t) − n ≤ −1 ∨ (c = 1 ∧ n = 0) n ≤ −1 ∨ (c = 1 ∧ n = 0)(n, c, t) − n ≤ −1 ∨ (c = 1 ∧ n = 0) n ≤ −1 ∨ (c = 1 ∧ n = 0)In particular, the disjunction of the two interpretations of r 9 (n, c, t) has to be used,in order to satisfy both (10) <strong>and</strong> (11) (similarly <strong>for</strong> r f (n, c)). In contrast, the conjunctionof the interpretations of r 2 (x, r) is needed to satisfy (3).6 The Complexity of Recursion-free <strong>Horn</strong> <strong>Clauses</strong>over Quantifier-free Presburger ArithmeticWe give an overview of the considered fragments of recursion-free <strong>Horn</strong> clauses, <strong>and</strong>the corresponding interpolation problem, in Fig. 6. The diagram also shows the com-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!