public override void EvalCond(PathCond evalCond, IDictionary <FullCellAddr, PathCond> evalConds, List <CGCachedExpr> caches) { if (es.Length >= 1) { CachedAtom atom = new CachedAtom(es[0], caches); CGCachedExpr cached = atom.cachedExpr; es[0].EvalCond(evalCond, evalConds, caches); es[0] = cached; for (int i = 1; i < es.Length; i++) { CGExpr iConst = CGConst.Make(i); CGExpr cond = new CGEqual(new CGExpr[] { cached, iConst }); es[i].EvalCond(evalCond.And(new CachedAtom(cond, caches)), evalConds, caches); } } }
private CachedAtom(CachedAtom atom, bool negated) { this.cachedExpr = atom.cachedExpr; this.negated = negated; }
public readonly bool negated; // True if represents NOT(cachedExpr) public CachedAtom(CGExpr cond, List <CGCachedExpr> caches) { this.cachedExpr = new CGCachedExpr(cond, this, caches); this.negated = false; }
public readonly bool negated; // True if represents NOT(cachedExpr) public CachedAtom(CGExpr cond, List<CGCachedExpr> caches) { this.cachedExpr = new CGCachedExpr(cond, this, caches); this.negated = false; }