Example #1
0
        public static Term ClosednessAssumption(Term absValTyMap)
        {
            Identifier boundVar = new SimpleIdentifier("v");

            return(TermQuantifier.MetaAll(new List <Identifier> {
                boundVar
            },
                                          null,
                                          IsaBoogieTerm.IsClosedType(IsaBoogieTerm.TypeToVal(absValTyMap, new TermIdent(boundVar)))
                                          ));
        }
Example #2
0
        public static Term NonEmptyTypesAssumption(Term absValTyMap)
        {
            Identifier bvType      = new SimpleIdentifier("t");
            Term       bvTypeTerm  = new TermIdent(bvType);
            Identifier bvValue     = new SimpleIdentifier("v");
            Term       bvValueTerm = new TermIdent(bvValue);

            return(TermQuantifier.MetaAll(new List <Identifier> {
                bvType
            },
                                          null,
                                          TermBinary.MetaImplies(IsaBoogieTerm.IsClosedType(bvTypeTerm),
                                                                 TermQuantifier.Exists(new List <Identifier> {
                bvValue
            },
                                                                                       null,
                                                                                       TermBinary.Eq(IsaBoogieTerm.TypeToVal(absValTyMap, bvValueTerm), bvTypeTerm)
                                                                                       ))));
        }
        public static Term ProcedureIsCorrect(Term funDecls, Term constantDecls, Term globalDecls, Term axioms,
                                              Term procedure)
        {
            var typeInterpId = new SimpleIdentifier("A");

            return
                (TermQuantifier.MetaAll(
                     new List <Identifier> {
                typeInterpId
            },
                     null,
                     new TermApp(
                         IsaCommonTerms.TermIdentFromName("proc_is_correct"),
                         //TODO: here assuming that we use "'a" for the abstract value type carrier t --> make t a parameter somewhere
                         new TermWithExplicitType(new TermIdent(typeInterpId), IsaBoogieType.AbstractValueTyFunType(new VarType("a"))),
                         funDecls,
                         constantDecls,
                         globalDecls,
                         axioms,
                         procedure)));
        }