/// <summary> /// Visits and evaluates predicate expression. /// </summary> /// <param name="expression">Predicate expression.</param> /// <returns>True if the specified expression evaluates as true, false otherwise.</returns> public bool Visit(PredicateExpression expression) { // if the predicate is a rigid relation, then check whether it has the correct value if (RigidRelations.IsPredicateRigidRelation(expression.PredicateAtom)) { IAtom predicateAtom = GroundingManager.GroundAtom(expression.PredicateAtom, Substitution); return(RigidRelations.Contains(predicateAtom)); } return(true); }
/// <summary> /// Checks whether the specified predicate is a rigid relation of the planning problem. /// </summary> /// <param name="predicateAtom">Predicate atom.</param> /// <returns>True if the predicate is of rigid relation, false otherwise.</returns> public bool IsPredicateRigidRelation(IAtom predicateAtom) { return(RigidRelations.IsPredicateRigidRelation(predicateAtom)); }