summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorGravatar Valentin Wüstholz <wuestholz@gmail.com>2015-11-19 14:39:36 -0600
committerGravatar Valentin Wüstholz <wuestholz@gmail.com>2015-11-19 14:39:36 -0600
commit5bb7ad4c69ed1c782e50272d37bf116007a52f4c (patch)
treed4fd126405ffb5e34316516253fefc912bbd9fe2 /Source
parent3e37476e15593fe7889b2644bcf389f90f985e35 (diff)
Fix issue with partially-verified assertions.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/AbsyQuant.cs10
-rw-r--r--Source/VCGeneration/ConditionGeneration.cs8
2 files changed, 18 insertions, 0 deletions
diff --git a/Source/Core/AbsyQuant.cs b/Source/Core/AbsyQuant.cs
index 39f18657..3a27eddf 100644
--- a/Source/Core/AbsyQuant.cs
+++ b/Source/Core/AbsyQuant.cs
@@ -344,6 +344,11 @@ namespace Microsoft.Boogie {
rc.Error(this, "attributes :minimize and :maximize accept only one argument");
}
+ if (Key == "verified_under" && Params.Count != 1)
+ {
+ rc.Error(this, "attribute :verified_under accepts only one argument");
+ }
+
foreach (object p in Params) {
if (p is Expr) {
((Expr)p).Resolve(rc);
@@ -364,6 +369,11 @@ namespace Microsoft.Boogie {
tc.Error(this, "attributes :minimize and :maximize accept only one argument of type int, real or bv");
break;
}
+ if (Key == "verified_under" && (expr == null || !expr.Type.IsBool))
+ {
+ tc.Error(this, "attribute :verified_under accepts only one argument of type bool");
+ break;
+ }
}
}
public void AddLast(QKeyValue other) {
diff --git a/Source/VCGeneration/ConditionGeneration.cs b/Source/VCGeneration/ConditionGeneration.cs
index 5971d6f8..6a2eec29 100644
--- a/Source/VCGeneration/ConditionGeneration.cs
+++ b/Source/VCGeneration/ConditionGeneration.cs
@@ -1549,8 +1549,16 @@ namespace VC {
current.ClearParams();
current.AddParam(Substituter.ApplyReplacingOldExprs(incarnationSubst, oldFrameSubst, param));
}
+ if (current.Key == "verified_under") {
+ Contract.Assume(current.Params.Count == 1);
+ var param = current.Params[0] as Expr;
+ Contract.Assume(param != null && param.Type.IsBool);
+ current.ClearParams();
+ current.AddParam(Substituter.ApplyReplacingOldExprs(incarnationSubst, oldFrameSubst, param));
+ }
current = current.Next;
}
+
Expr copy = Substituter.ApplyReplacingOldExprs(incarnationSubst, oldFrameSubst, pc.Expr);
if (CommandLineOptions.Clo.ModelViewFile != null && pc is AssumeCmd) {
string description = QKeyValue.FindStringAttribute(pc.Attributes, "captureState");