protected void AddKnownVariables(IDictionary <int, string> knownVariables) { foreach (var item in knownVariables) { KnownVariables.Add(item.Key, item.Value); } }
public override bool Visit(VCExprVar node, bool arg) { Contract.Requires(node != null); if (!BoundTermVars.Contains(node) && !KnownVariables.Contains(node)) { string printedName = Namer.GetQuotedName(node, node.Name); Contract.Assert(printedName != null); RegisterType(node.Type); string decl = "(declare-fun " + printedName + " () " + TypeToString(node.Type) + ")"; if (!(printedName.StartsWith("assume$$") || printedName.StartsWith("soft$$") || printedName.StartsWith("try$$"))) { AddDeclaration(decl); } KnownVariables.Add(node); if (declHandler != null) { declHandler.VarDecl(node); } } return(base.Visit(node, arg)); }
public void AddKnownVariable(VCExprVar variable) { if (KnownVariables.Contains(variable)) { return; } KnownVariables.Add(variable); }
public void AddKnownVariable(VCExprVar variable) { if (KnownVariables.Contains(variable)) { return; } KnownVariables.Add(variable); if (declHandler != null) { declHandler.VarDecl(variable); } }
public override bool Visit(VCExprVar node, bool arg) { Contract.Requires(node != null); if (!BoundTermVars.Contains(node) && !KnownVariables.Contains(node)) { string printedName = Namer.GetQuotedName(node, node.Name); Contract.Assert(printedName != null); RegisterType(node.Type); string decl = "(declare-fun " + printedName + " () " + TypeToString(node.Type) + ")"; AddDeclaration(decl); KnownVariables.Add(node); } return(base.Visit(node, arg)); }