Exemplo n.º 1
0
 protected void AddKnownVariables(IDictionary <int, string> knownVariables)
 {
     foreach (var item in knownVariables)
     {
         KnownVariables.Add(item.Key, item.Value);
     }
 }
Exemplo 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) + ")";
                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));
        }
Exemplo n.º 3
0
 public void AddKnownVariable(VCExprVar variable)
 {
     if (KnownVariables.Contains(variable))
     {
         return;
     }
     KnownVariables.Add(variable);
 }
Exemplo n.º 4
0
 public void AddKnownVariable(VCExprVar variable)
 {
     if (KnownVariables.Contains(variable))
     {
         return;
     }
     KnownVariables.Add(variable);
     if (declHandler != null)
     {
         declHandler.VarDecl(variable);
     }
 }
Exemplo n.º 5
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);
            }

            return(base.Visit(node, arg));
        }