コード例 #1
0
 protected void AddKnownVariables(IDictionary <int, string> knownVariables)
 {
     foreach (var item in knownVariables)
     {
         KnownVariables.Add(item.Key, item.Value);
     }
 }
コード例 #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));
        }
コード例 #3
0
ファイル: TypeDeclCollector.cs プロジェクト: zvonimir/boogie
 public void AddKnownVariable(VCExprVar variable)
 {
     if (KnownVariables.Contains(variable))
     {
         return;
     }
     KnownVariables.Add(variable);
 }
コード例 #4
0
 public void AddKnownVariable(VCExprVar variable)
 {
     if (KnownVariables.Contains(variable))
     {
         return;
     }
     KnownVariables.Add(variable);
     if (declHandler != null)
     {
         declHandler.VarDecl(variable);
     }
 }
コード例 #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));
        }