summaryrefslogtreecommitdiff
path: root/Source/Provers/Z3
diff options
context:
space:
mode:
authorGravatar rustanleino <unknown>2009-10-04 07:01:06 +0000
committerGravatar rustanleino <unknown>2009-10-04 07:01:06 +0000
commitf0df4f110687974508a4c96e4ebb58a9cd7270c8 (patch)
treeb4ec1a6714d898c8f58057306a90ff40747d6be9 /Source/Provers/Z3
parentbdaa9996170aed0b2638962014fe80777b98d5c7 (diff)
Added /z3lets switch, which governs which kinds of LET expressions are sent to Z3. By default, both LET TERM and LET FORMULA expressions are used. Mode /z3lets:2 uses only LET FORMULA, which works around a current Z3 issue with LET expressions and nested quantifiers.
Diffstat (limited to 'Source/Provers/Z3')
-rw-r--r--Source/Provers/Z3/ProverInterface.ssc18
1 files changed, 15 insertions, 3 deletions
diff --git a/Source/Provers/Z3/ProverInterface.ssc b/Source/Provers/Z3/ProverInterface.ssc
index 02b4f505..c3a61fe3 100644
--- a/Source/Provers/Z3/ProverInterface.ssc
+++ b/Source/Provers/Z3/ProverInterface.ssc
@@ -75,6 +75,13 @@ namespace Microsoft.Boogie.Z3
return CommandLineOptions.Clo.Z3types || BitVectors == CommandLineOptions.BvHandling.Z3Native;
}
}
+ public int Lets {
+ get
+ ensures 0 <= result && result < 4;
+ {
+ return CommandLineOptions.Clo.Z3lets;
+ }
+ }
public bool V1 = false;
public bool V2 = false; // default set in PostParse
public bool DistZ3 = false;
@@ -107,8 +114,8 @@ namespace Microsoft.Boogie.Z3
ExeName = "z3-v1.3.exe";
}
if (DistZ3) {
- ExeName = "z3-dist.exe";
- CommandLineOptions.Clo.RestartProverPerVC = true;
+ ExeName = "z3-dist.exe";
+ CommandLineOptions.Clo.RestartProverPerVC = true;
}
}
@@ -227,7 +234,6 @@ namespace Microsoft.Boogie.Z3
eraser = new TypeEraserPremisses((TypeAxiomBuilderPremisses)AxBuilder, Gen);
break;
}
-
VCExpr! exprWithoutTypes = eraser != null ? eraser.Erase(expr, polarity) : expr;
LetBindingSorter! letSorter = new LetBindingSorter(Gen);
@@ -243,6 +249,12 @@ namespace Microsoft.Boogie.Z3
sortedExpr = flattener.Flatten(sortedExpr);
sortedAxioms = flattener.Flatten(sortedAxioms);
}
+ if (Opts.Lets != 3) {
+ // replace let expressions with implies
+ Let2ImpliesMutator letImplier = new Let2ImpliesMutator(Gen, Opts.Lets == 1, Opts.Lets == 2);
+ sortedExpr = letImplier.Mutate(sortedExpr);
+ sortedAxioms = letImplier.Mutate(sortedAxioms);
+ }
//////////////////////////////////////////////////////////////////////////
//SubtermCollector! coll = new SubtermCollector (gen);