Пример #1
0
        public static void Instrument(Program program, HashSet <string> scalars)
        {
            memAccess     = BoogieAstFactory.MkLocal("memAccess", Microsoft.Boogie.Type.Int) as LocalVariable;
            scalarGlobals = new HashSet <string>();
            program.TopLevelDeclarations
            .OfType <GlobalVariable>()
            .Where(g => scalars.Contains(g.Name))
            .Iter(g => scalarGlobals.Add(g.Name));

            program.TopLevelDeclarations
            .OfType <Implementation>()
            .Iter(Instrument);

            var decl = BoogieAstFactory.MkProc(recordProc, new List <Variable>(new Variable[] { BoogieAstFactory.MkFormal("address", Microsoft.Boogie.Type.Int, true) }), new List <Variable>());

            program.AddTopLevelDeclaration(decl);
        }