Ejemplo n.º 1
0
 public void AddKnownVariable(VCExprVar variable)
 {
     if (KnownVariables.Contains(variable))
     {
         return;
     }
     KnownVariables.Add(variable);
     if (declHandler != null)
     {
         declHandler.VarDecl(variable);
     }
 }
Ejemplo n.º 2
0
        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));
        }