Example #1
0
 public IPCExpression ReplaceVariables(SubstitutionSet s)
 {
     if (s.IsBound(this))
     {
         return(s.GetBinding(this).ReplaceVariables(s));
     }
     else
     {
         return(this);
     }
 }
Example #2
0
        public SubstitutionSet Unify(IUnifiable p,
                                     SubstitutionSet s)
        {
            if (this == p)
            {
                return(s);
            }

            if (s.IsBound(this))
            {
                return(s.GetBinding(this).Unify(p, s));
            }

            SubstitutionSet sNew = new SubstitutionSet(s);

            sNew.Add(p, this);

            return(sNew);
        }