Interface Term

All Superinterfaces:
fr.inria.rules.dlgpemodel.api.sentences.IPrintable, fr.inria.rules.dlgpemodel.api.elems.ITerm, Standardizable, Substitutable<Term>
All Known Subinterfaces:
Constant, EvaluableFunction, Literal<T>, LogicalFunctionalTerm, SpecializableLogicalFunctionalTerm, Variable
All Known Implementing Classes:
AbstractLogicalFunctionalTermImpl, ConstantImpl, EvaluableFunctionImpl, FreshVariableImpl, GroundFunctionalTermImpl, LiteralImpl, SpecializableLogicalFunctionalTermImpl, VariableImpl

public interface Term extends Substitutable<Term>, Standardizable, fr.inria.rules.dlgpemodel.api.elems.ITerm
In analogy to natural language, where a noun phrase refers to an object, a term denotes a mathematical object referring to someone or something. A term is either a Constant, a Variable, a Literal or a LogicalFunctionalTerm
  • Field Summary

    Fields inherited from interface fr.inria.rules.dlgpemodel.api.sentences.IPrintable

    WRITER
  • Method Summary

    Modifier and Type
    Method
    Description
    default Term
    Applies a substitution without evaluating nested functions.
    applySubstitution(Substitution substitution, boolean evaluate)
    Applies a substitution to this term.
    default boolean
    Indicates whether this term is a constant.
    default boolean
    Indicates whether this term denotes an evaluable function.
    default boolean
    Indicates whether this term is frozen by the supplied substitution.
    default boolean
    Indicates whether this term is a logical functional term.
    default boolean
    Indicates whether this term contains no variables.
    default boolean
    Indicates whether this term is a literal.
    default boolean
    Indicates whether this term is a variable.
    Returns the textual representation of this term.

    Methods inherited from interface fr.inria.rules.dlgpemodel.api.sentences.IPrintable

    toDLGPE

    Methods inherited from interface Standardizable

    toStandardForm, toStandardForm
  • Method Details

    • label

      String label()
      Returns the textual representation of this term.
      Returns:
      a string representation of this object
    • isConstant

      default boolean isConstant()
      Indicates whether this term is a constant.
      Returns:
      true iff this object is a Constant
    • isVariable

      default boolean isVariable()
      Indicates whether this term is a variable.
      Returns:
      true iff this object is a Variable
    • isLiteral

      default boolean isLiteral()
      Indicates whether this term is a literal.
      Returns:
      true iff this object is a Literal
    • isFunctionalTerm

      default boolean isFunctionalTerm()
      Indicates whether this term is a logical functional term.
      Returns:
      true iff this object is a LogicalFunctionalTerm
    • isGround

      default boolean isGround()
      Indicates whether this term contains no variables.
      Returns:
      true iff this object and its nested terms do not contain any variable
    • isFrozen

      default boolean isFrozen(Substitution s)
      Indicates whether this term is frozen by the supplied substitution. A term is frozen if it is a constant or literal or if it is affected by the given substitution
      Parameters:
      s - a substitution freezing some variables
      Returns:
      true iff this term is frozen
    • isEvaluableFunction

      default boolean isEvaluableFunction()
      Indicates whether this term denotes an evaluable function.
      Returns:
      true when this term is an evaluable function
    • applySubstitution

      default Term applySubstitution(Substitution substitution)
      Applies a substitution without evaluating nested functions.
      Specified by:
      applySubstitution in interface Substitutable<Term>
      Parameters:
      substitution - the substitution to apply
      Returns:
      the substituted term
    • applySubstitution

      Term applySubstitution(Substitution substitution, boolean evaluate)
      Applies a substitution to this term.
      Specified by:
      applySubstitution in interface Substitutable<Term>
      Parameters:
      substitution - the substitution to apply
      evaluate - whether nested evaluable functions should be evaluated
      Returns:
      the substituted term