Esempio n. 1
0
        public override void Verify(string fileName, TransHelper.TransEnv env, Microsoft.FSharp.Collections.FSharpList <CAST.Top> decls)
        {
            // this really only dumps the code to the .bpl file
            Init(env, fileName);
            decls = env.ApplyTransformers(decls);
            if (options.NoVerification)
            {
                return;
            }

            if (env.ShouldContinue)
            {
                if (env.Options.AggressivePruning && env.Options.Functions.Count() > 0)
                {
                    decls = TransUtil.pruneBy(env, env.Options.Functions.First(), decls);
                }

                var boogieDecls = Translator.translate(null, env, () => VccCommandLineHost.StandardPrelude(options), decls);
                var p           = TranslateToBoogie(boogieDecls);
                if (env.ShouldContinue)
                {
                    try {
                        swSaveBPL.Start();
                        CommandLineOptions.Install(new CommandLineOptions());
                        using (var writer = new TokenTextWriter(AddOutputDirIfRequested(Path.ChangeExtension(fileName, ".bpl")))) {
                            p.Emit(writer);
                        }
                    } finally {
                        swSaveBPL.Stop();
                    }
                }
            }
        }
Esempio n. 2
0
 public override FunctionVerifier GetFunctionVerifier(string fileName, TransHelper.TransEnv env, Microsoft.FSharp.Collections.FSharpList <CAST.Top> decls)
 {
     Init(env, fileName);
     decls = env.ApplyTransformers(decls);
     return(new VccFunctionVerifier(this, decls, env));
 }