本文整理汇总了C#中Microsoft.Boogie.Implementation.Typecheck方法的典型用法代码示例。如果您正苦于以下问题:C# Implementation.Typecheck方法的具体用法?C# Implementation.Typecheck怎么用?C# Implementation.Typecheck使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.Boogie.Implementation
的用法示例。
在下文中一共展示了Implementation.Typecheck方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GenerateEVC
/*
#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;
}
示例2: ResolveImpl
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);
}