From ac085d12308595c3f7bef2dad622da231b2eb899 Mon Sep 17 00:00:00 2001 From: rustanleino Date: Tue, 22 Jun 2010 02:14:31 +0000 Subject: Boogie: * Set Z3's QI_COST as the sum of "weight" and "generation", not their product. This worked better when setting the :weight of a quantifier (see below). Dafny: * Improved axiomatization of sequences; in particular, use an axiom to generate terms that say what the two pieces of a concatenation are * Two of the (previous) sequence axioms could cause a matching loop, in cases where Z3's arithmetic reasoning does not infer all rational arithmetic equalities during instantiation. The effect of this was apparently not noticed before, perhaps the concatenation/drop properties previously had to be supplied in manual assert statements. But now, with the improved sequence axiomatization (see previous bullet), this effect became remarkably noticeable. To reduce the bad effect of this apparent matching loop, Michal and I added a :weight annotation on two of the axioms, which, along with the Boogie change above, seems to give acceptable results. * Removed several assert lemmas that are no longer needed in Test programs (the test programs now contain only about a handful of such lemmas) --- Test/vacid0/Composite.dfy | 1 - Test/vacid0/LazyInitArray.dfy | 2 +- Test/vacid0/SparseArray.dfy | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) (limited to 'Test/vacid0') diff --git a/Test/vacid0/Composite.dfy b/Test/vacid0/Composite.dfy index ca5f206b..87e63e2c 100644 --- a/Test/vacid0/Composite.dfy +++ b/Test/vacid0/Composite.dfy @@ -91,7 +91,6 @@ class Composite { var p := parent; parent := null; if (p != null) { - assert (p.left == this) != (p.right == this); if (p.left == this) { p.left := null; } else { diff --git a/Test/vacid0/LazyInitArray.dfy b/Test/vacid0/LazyInitArray.dfy index 6ae00e24..c5a032fe 100644 --- a/Test/vacid0/LazyInitArray.dfy +++ b/Test/vacid0/LazyInitArray.dfy @@ -89,7 +89,7 @@ class LazyInitArray { { if (0 <= b[i] && b[i] < n && c[b[i]] == i) { } else { - assert n <= e[i]; + assert n <= e[i]; // lemma b[i] := n; c[n] := i; ghost var t := d[n]; diff --git a/Test/vacid0/SparseArray.dfy b/Test/vacid0/SparseArray.dfy index 0e6aff05..2c217264 100644 --- a/Test/vacid0/SparseArray.dfy +++ b/Test/vacid0/SparseArray.dfy @@ -87,7 +87,7 @@ class SparseArray { { if (0 <= b[i] && b[i] < n && c[b[i]] == i) { } else { - assert n <= e[i]; + assert n <= e[i]; // lemma b := b[i := n]; c := c[n := i]; ghost var t := d[n]; -- cgit v1.2.3