public override IL substitute(GroundSubstitutionEC s) { var result = s.universe.makeIL(faf.substitute(s), polarity, s.isGoal); #if DEBUG if (result is GL) { var ga = result as GL; Debug.Assert(s.universe.getGTTGAF(ga.gtt, ga.predicate).gLiteral(result.polarity) == result); } #endif return(result); }
public override IAF substitute(GroundSubstitutionEC s) { var itT = (from it in ftt select it.substitute(s)).ToArray(); if (itT.All(it => it.isGround)) { return(s.universe.makeGAF(predicate, from it in itT select it as GT)); } else { return(s.universe.makeFAF(predicate, s.universe.makeFTT(itT))); } }
internal GroundSubstitutionEC tryCombine(GroundSubstitutionEC c) { Debug.Assert(universe == c.universe); var t = new Dictionary <LVar, GT>(map); foreach (var p in c.map) { if (t.ContainsKey(p.Key) && !t[p.Key].Equals(p.Value)) { return(null); } else { t[p.Key] = p.Value; } } return(new GroundSubstitutionEC(universe, isGoal, t)); }
public GL gSubstitute(GroundSubstitutionEC s) { return(this); }
public override IL substitute(GroundSubstitutionEC s) { Debug.Assert(s.universe.getGTTGAF(gaf.gtt, gaf.predicate).gLiteral(polarity) == this); return(this); }
public override IAF substitute(GroundSubstitutionEC s) { return(this); }
public override IT substitute(GroundSubstitutionEC s) { return(s.variables.Contains(variable) ? s[variable] : this as IT); }
public override IT substitute(GroundSubstitutionEC s) { return(substitute(s.universe, from it in ftt select it.substitute(s), s.isGoal)); }
public abstract IL substitute(GroundSubstitutionEC s);