コード例 #1
0
 public override void AddMapping(TermVariable from, Term to)
 {
     if (to is TermObject == false)
         throw new Exception("TermObjectSubstitution is optimised for TermObjects");
     int delta = from.GetHashCode() ^ to.GetHashCode();
     _hashcode += delta;
     Substitutions[from] = to.Clone();
 }
コード例 #2
0
 public override Term GetMapping(TermVariable var)
 {
     Term result;
     Substitutions.TryGetValue(var, out result);
     return result;
 }
コード例 #3
0
            private TermVariable GetUnusedVariable()
            {
                TermVariable curVar;
                do
                    curVar = new TermVariable(GameContainer.SymbolTable["?a" + _count++]);
                while (_originalVarsFromRule.Contains(curVar));

                return curVar;
            }