Interface Evaluable<R>

Type Parameters:
R - Type returned by the evaluation
All Known Subinterfaces:
ComputedAtom, EvaluableFunction
All Known Implementing Classes:
ComputedAtomImpl, EvaluableFunctionImpl

public interface Evaluable<R>
Represents an object that can be evaluated with a substitution (like computed predicate or functional term)
Author:
Guillaume Perution-Kihli
  • Method Summary

    Modifier and Type
    Method
    Description
    eval(Substitution substitution)
    Evaluate the evaluable with a substitution The object must be evaluable with the substitution in parameter, otherwise the method will throw an exception
    Get the variables that must be sent to something to evaluate the object
    boolean
    Check if we can evaluate the object with the given substitution
  • Method Details

    • eval

      R eval(Substitution substitution) throws EvaluationException
      Evaluate the evaluable with a substitution The object must be evaluable with the substitution in parameter, otherwise the method will throw an exception
      Parameters:
      substitution - the substitution that associates the values to the parameters of the evaluation
      Returns:
      The result of the evaluation
      Throws:
      EvaluationException - if you can't use the substitution to evaluate the object
    • getMandatoryParameters

      Set<Variable> getMandatoryParameters()
      Get the variables that must be sent to something to evaluate the object
      Returns:
      a set of variables containing the variables that must be substituted
    • isEvaluableWith

      boolean isEvaluableWith(Substitution substitution)
      Check if we can evaluate the object with the given substitution
      Parameters:
      substitution - the substitution that associates the values to the parameters of the evaluation
      Returns:
      true iff we can evaluate this object with the given substitution