Exemplo n.º 1
0
 private Cmd InlinedEnsures(CallCmd callCmd, Ensures ens) {
   if (QKeyValue.FindBoolAttribute(ens.Attributes, "InlineAssume")) {
     return new AssumeCmd(ens.tok, codeCopier.CopyExpr(ens.Condition));
   } else if (ens.Free) {
     return new AssumeCmd(ens.tok, Expr.True); 
   } else {
     Ensures/*!*/ ensCopy = (Ensures/*!*/)cce.NonNull(ens.Clone());
     ensCopy.Condition = codeCopier.CopyExpr(ens.Condition);
     return new AssertEnsuresCmd(ensCopy);
   }
 }
Exemplo n.º 2
0
 public override Ensures VisitEnsures(Ensures node)
 {
     return(base.VisitEnsures((Ensures)node.Clone()));
 }
Exemplo n.º 3
0
 public override Ensures VisitEnsures(Ensures node)
 {
     //Contract.Requires(node != null);
     Contract.Ensures(Contract.Result <Ensures>() != null);
     return(base.VisitEnsures((Ensures)node.Clone()));
 }