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); if (declHandler != null) { declHandler.VarDecl(node); } } return(base.Visit(node, arg)); }