public VcAxiomLemmaManager(
            VCInstantiation <VCExpr> vcAxiomInst,
            BoogieMethodData methodData,
            IEnumerable <Function> vcFunctions,
            VcRewriteLemmaGen vcRewriteLemmaGen,
            IVariableTranslationFactory variableFactory)
        {
            this.vcAxiomInst       = vcAxiomInst;
            this.methodData        = methodData;
            this.vcRewriteLemmaGen = vcRewriteLemmaGen;
            this.variableFactory   = variableFactory;
            basicCmdIsaVisitor     = new BasicCmdIsaVisitor(variableFactory);
            boogieContext          = new BoogieContextIsa(IsaCommonTerms.TermIdentFromName("A"),
                                                          IsaCommonTerms.TermIdentFromName("M"), IsaCommonTerms.TermIdentFromName("\\<Lambda>"),
                                                          IsaCommonTerms.TermIdentFromName("\\<Gamma>"), IsaCommonTerms.TermIdentFromName("\\<Omega>"));
            var typeDeclTranslation = new ConcreteTypeDeclTranslation(boogieContext);

            declToVCMapping =
                LemmaHelper.DeclToTerm(
                    ((IEnumerable <NamedDeclaration>)methodData.Functions).Union(methodData.Constants), vcFunctions,
                    typeDeclTranslation, uniqueNamer);
            //separate unique namer for function interpretations (since they already have a name in uniqueNamer): possible clashes
            funToInterpMapping = LemmaHelper.FunToTerm(methodData.Functions, new IsaUniqueNamer());
            assmManager        = new AssumptionManager(methodData.Functions, methodData.Constants, variableFactory);
        }
示例#2
0
        public VcPhaseLemmaManager(VCInstantiation <Block> vcinst,
                                   BoogieMethodData methodData,
                                   IEnumerable <Function> vcFunctions,
                                   IsaBlockInfo isaBlockInfo,
                                   IVariableTranslationFactory variableFactory)
        {
            this.vcinst          = vcinst;
            this.methodData      = methodData;
            programVariables     = methodData.AllVariables();
            initState            = IsaBoogieTerm.Normal(normalInitState);
            this.isaBlockInfo    = isaBlockInfo;
            this.variableFactory = variableFactory;
            boogieContext        = new BoogieContextIsa(
                IsaCommonTerms.TermIdentFromName("A"),
                IsaCommonTerms.TermIdentFromName("M"),
                IsaCommonTerms.TermIdentFromName("\\<Lambda>"),
                IsaCommonTerms.TermIdentFromName("\\<Gamma>"),
                IsaCommonTerms.TermIdentFromName("\\<Omega>")
                );
            var typeDeclTranslation = new ConcreteTypeDeclTranslation(boogieContext);

            declToVCMapping = LemmaHelper.DeclToTerm(
                ((IEnumerable <NamedDeclaration>)methodData.Functions).Union(programVariables),
                vcFunctions,
                typeDeclTranslation,
                uniqueNamer);
            //separate unique namer for function interpretations (since they already have a name in uniqueNamer): possible clashes
            funToInterpMapping = LemmaHelper.FunToTerm(methodData.Functions, new IsaUniqueNamer());

            assmManager = new AssumptionManager(methodData.Functions, programVariables, variableFactory);
        }