public ISet <Variable> CollectAllVariables(ITerm aTerm) { ISet <Variable> variables = new HashedSet <Variable>(); aTerm.Accept(this, variables); return(variables); }
/// <summary> /// Grounds the term. /// </summary> /// <param name="term">Term.</param> /// <param name="substitution">Variables substitution.</param> /// <returns>Grounded term.</returns> public ITerm GroundTerm(ITerm term, ISubstitution substitution) { Substitution = substitution; ReferenceState = null; return(term.Accept(this)); }
/// <summary> /// Grounds the term. This version does "deep" grounding, in the sense that even object function terms are /// grounded into constant terms (the value of the object function term is gotten from the given reference state). /// </summary> /// <param name="term">Term.</param> /// <param name="substitution">Variables substitution.</param> /// <param name="referenceState">Reference state.</param> /// <returns>Grounded term.</returns> public ITerm GroundTermDeep(ITerm term, ISubstitution substitution, IState referenceState) { Substitution = substitution; ReferenceState = referenceState; return(term.Accept(this)); }
public ITerm Subst(IDictionary <Variable, ITerm> theta, ITerm aTerm) { return((ITerm)aTerm.Accept(this, theta)); }