diff options
author | qadeer <unknown> | 2011-02-06 06:13:47 +0000 |
---|---|---|
committer | qadeer <unknown> | 2011-02-06 06:13:47 +0000 |
commit | 3718f4836a0a5d80b07f2e9f41cacbebbf7958fe (patch) | |
tree | 75799a4a9330f355e58f66a612e0cc7de646a769 /Source/Provers/Z3api/SafeContext.cs | |
parent | 0f96c5cb02b4f1354841f22d29a7dbc86a12be51 (diff) |
implemented /UseUnsatCoreForInlining option for use in stratified inlining
Diffstat (limited to 'Source/Provers/Z3api/SafeContext.cs')
-rw-r--r-- | Source/Provers/Z3api/SafeContext.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/Provers/Z3api/SafeContext.cs b/Source/Provers/Z3api/SafeContext.cs index f3a42670..97ff41c5 100644 --- a/Source/Provers/Z3api/SafeContext.cs +++ b/Source/Provers/Z3api/SafeContext.cs @@ -388,10 +388,13 @@ namespace Microsoft.Boogie.Z3 }
}
- public ProverInterface.Outcome CheckAssumptions(List<VCExpr> assumptions, LineariserOptions linOptions, out List<Z3ErrorModelAndLabels> boogieErrors)
+ public ProverInterface.Outcome CheckAssumptions(List<VCExpr> assumptions, LineariserOptions linOptions,
+ out List<Z3ErrorModelAndLabels> boogieErrors,
+ out List<int> unsatCore)
{
Microsoft.Boogie.Helpers.ExtraTraceInformation("Sending data to the theorem prover");
boogieErrors = new List<Z3ErrorModelAndLabels>();
+ unsatCore = new List<int>();
LBool outcome = LBool.Undef;
Model z3Model;
@@ -440,6 +443,14 @@ namespace Microsoft.Boogie.Z3 }
else if (outcome == LBool.False)
{
+ foreach (Term t in core)
+ {
+ for (int i = 0; i < assumption_terms.Length; i++)
+ {
+ if (t.Equals(assumption_terms[i]))
+ unsatCore.Add(i);
+ }
+ }
return ProverInterface.Outcome.Valid;
}
else
|