Пример #1
0
        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)));
            }
        }
Пример #2
0
        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));
        }
Пример #3
0
 public GL gSubstitute(SubstitutionEC s)
 {
     return(this);
 }
Пример #4
0
 public override IL substitute(SubstitutionEC s)
 {
     return(this);
 }
Пример #5
0
 public override IL substitute(SubstitutionEC s)
 {
     return(s.universe.makeIL(faf.substitute(s), polarity, s.isGoal));
 }
Пример #6
0
 public override IT substitute(SubstitutionEC s)
 {
     return(s.variables.Contains(variable) ? s[variable] : this);
 }
Пример #7
0
 public override IT substitute(SubstitutionEC s)
 {
     return(substitute(s.universe, from it in ftt select it.substitute(s), s.isGoal));
 }
Пример #8
0
 public abstract IL substitute(SubstitutionEC s);