public virtual AtomicRE VisitAtomicRE(AtomicRE node) { Contract.Requires(node != null); Contract.Ensures(Contract.Result <AtomicRE>() != null); node.b = this.VisitBlock(node.b); return(node); }
public static VCExpr RegExpr(RE r, VCExpr N, VCContext ctxt) { Contract.Requires(r != null); Contract.Requires(N != null); Contract.Requires(ctxt != null); Contract.Ensures(Contract.Result <VCExpr>() != null); if (r is AtomicRE) { AtomicRE ar = (AtomicRE)r; return(Block(ar.b, N, ctxt)); } else if (r is Sequential) { Sequential s = (Sequential)r; return(RegExpr(s.first, RegExpr(s.second, N, ctxt), ctxt)); } else if (r is Choice) { Choice ch = (Choice)r; VCExpr res; if (ch.rs == null || ch.rs.Count == 0) { res = N; } else { VCExpr currentWLP = RegExpr(cce.NonNull(ch.rs[0]), N, ctxt); for (int i = 1, n = ch.rs.Count; i < n; i++) { currentWLP = ctxt.Ctxt.ExprGen.And(currentWLP, RegExpr(cce.NonNull(ch.rs[i]), N, ctxt)); } res = currentWLP; } return(res); } else { Contract.Assert(false); throw new cce.UnreachableException(); // unexpected RE subtype } }
public override AtomicRE VisitAtomicRE(AtomicRE node) { return(base.VisitAtomicRE((AtomicRE)node.Clone())); }
public override AtomicRE VisitAtomicRE(AtomicRE node) { //Contract.Requires(node != null); Contract.Ensures(Contract.Result <AtomicRE>() != null); return(base.VisitAtomicRE((AtomicRE)node.Clone())); }
public override AtomicRE VisitAtomicRE(AtomicRE node) { problematicNode = node; return(node); }