diff options
author | 2011-02-17 22:15:46 +0000 | |
---|---|---|
committer | 2011-02-17 22:15:46 +0000 | |
commit | 04595976af73e34f31c529b40f0761adbc6f3902 (patch) | |
tree | f1558eb621cbfcaf1f8ebfad7c6b98f07bf30177 /Source/Provers/SMTLib/TypeDeclCollector.cs | |
parent | 5a35f0c711586f03613b5d1414bd26ade65b47c5 (diff) |
Use explicit mechanism for skipping to the next assertion
Diffstat (limited to 'Source/Provers/SMTLib/TypeDeclCollector.cs')
-rw-r--r-- | Source/Provers/SMTLib/TypeDeclCollector.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/Provers/SMTLib/TypeDeclCollector.cs b/Source/Provers/SMTLib/TypeDeclCollector.cs index 05c0ed9e..a4af7f40 100644 --- a/Source/Provers/SMTLib/TypeDeclCollector.cs +++ b/Source/Provers/SMTLib/TypeDeclCollector.cs @@ -52,10 +52,10 @@ void ObjectInvariant() private readonly IDictionary<VCExprVar/*!*/, bool>/*!*/ KnownVariables =
new Dictionary<VCExprVar/*!*/, bool> ();
-
private readonly Dictionary<Type/*!*/, bool>/*!*/ KnownTypes = new Dictionary<Type, bool>();
private readonly Dictionary<string/*!*/, bool>/*!*/ KnownStoreFunctions = new Dictionary<string, bool>();
private readonly Dictionary<string/*!*/, bool>/*!*/ KnownSelectFunctions = new Dictionary<string, bool>();
+ private readonly HashSet<string> KnownLBLNEG = new HashSet<string>();
public List<string/*!>!*/> AllDeclarations { get {
@@ -118,6 +118,13 @@ void ObjectInvariant() string decl = "(declare-fun " + printedName + " (" + argTypes + ") " + TypeToStringReg(f.OutParams[0].TypedIdent.Type) + ")";
AddDeclaration(decl);
KnownFunctions.Add(f, true);
+ } else {
+ var lab = node.Op as VCExprLabelOp;
+ if (lab != null && !lab.pos && !KnownLBLNEG.Contains(lab.label)) {
+ KnownLBLNEG.Add(lab.label);
+ var name = SMTLibNamer.QuoteId(SMTLibNamer.BlockedLabel(lab.label));
+ AddDeclaration("(declare-fun " + name + " () Bool)");
+ }
}
}
@@ -139,8 +146,6 @@ void ObjectInvariant() return base.Visit(node, arg);
}
-
-
public override bool Visit(VCExprQuantifier node, bool arg)
{
Contract.Requires(node != null);
|