/* #region _TESTING_NEW_STUFF_ CommandLineOptions.Clo.vcVariety = CommandLineOptions.VCVariety.Block; //VCExpr wp = Wlp.Block(block, SuccCorrect, context); // Computes wp.S.true CommandLineOptions.Clo.vcVariety = CommandLineOptions.VCVariety.Doomed; #endregion */ VCExpr GenerateEVC(Implementation impl, out Dictionary<int, Absy> label2absy, Checker ch, out int assertionCount) { Contract.Requires(impl != null); Contract.Requires(ch != null); Contract.Ensures(Contract.Result<VCExpr>() != null); TypecheckingContext tc = new TypecheckingContext(null); impl.Typecheck(tc); label2absy = new Dictionary<int, Absy>(); VCExpr vc; switch (CommandLineOptions.Clo.vcVariety) { case CommandLineOptions.VCVariety.Doomed: vc = LetVC(cce.NonNull(impl.Blocks[0]), label2absy, ch.TheoremProver.Context, out assertionCount); break; default: Contract.Assert(false); throw new cce.UnreachableException(); // unexpected enumeration value } return vc; }
protected void ResolveImpl(Implementation impl) { Contract.Requires(impl != null); Contract.Ensures(impl.Proc != null); ResolutionContext rc = new ResolutionContext(new DummyErrorSink()); foreach (var decl in program.TopLevelDeclarations) { decl.Register(rc); } impl.Proc = null; // to force Resolve() redo the operation impl.Resolve(rc); TypecheckingContext tc = new TypecheckingContext(new DummyErrorSink()); impl.Typecheck(tc); }