summaryrefslogtreecommitdiff
path: root/Test/vacid0
diff options
context:
space:
mode:
authorGravatar rustanleino <unknown>2010-06-22 02:14:31 +0000
committerGravatar rustanleino <unknown>2010-06-22 02:14:31 +0000
commitac085d12308595c3f7bef2dad622da231b2eb899 (patch)
tree4ecbf7f2bd871b9ee06f7368ca2142242d962563 /Test/vacid0
parentc0f61b45a4c778829fed0f65378c23075bd4121d (diff)
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)
Diffstat (limited to 'Test/vacid0')
-rw-r--r--Test/vacid0/Composite.dfy1
-rw-r--r--Test/vacid0/LazyInitArray.dfy2
-rw-r--r--Test/vacid0/SparseArray.dfy2
3 files changed, 2 insertions, 3 deletions
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<T> {
{
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<T> {
{
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];