Exemplo n.º 1
0
        /// <summary>
        /// The walk operator searches for a variable's value in the substitution
        /// </summary>
        private static object Walk(object u, Substitution s)
        {
            // When a non-variable term is walked, the term itself is returned
            var uvar = u as LogicVariable;

            if (uvar == null || !s.ContainsKey(uvar))
            {
                return(u);
            }
            return(Walk(s[uvar], s));
        }