public override IAF substitute(SubstitutionEC 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 SubstitutionEC tryCombine(SubstitutionEC c) { Debug.Assert(universe == c.universe); var t = new Dictionary <LVar, IT>(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 SubstitutionEC(universe, isGoal, t)); }
public GL gSubstitute(SubstitutionEC s) { return(this); }
public override IL substitute(SubstitutionEC s) { return(this); }
public override IL substitute(SubstitutionEC s) { return(s.universe.makeIL(faf.substitute(s), polarity, s.isGoal)); }
public override IT substitute(SubstitutionEC s) { return(s.variables.Contains(variable) ? s[variable] : this); }
public override IT substitute(SubstitutionEC s) { return(substitute(s.universe, from it in ftt select it.substitute(s), s.isGoal)); }
public abstract IL substitute(SubstitutionEC s);