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 TypeMethodDescriptiondefault TermapplySubstitution(Substitution substitution) Applies a substitution without evaluating nested functions.applySubstitution(Substitution substitution, boolean evaluate) Applies a substitution to this term.default booleanIndicates whether this term is a constant.default booleanIndicates whether this term denotes an evaluable function.default booleanIndicates whether this term is frozen by the supplied substitution.default booleanIndicates whether this term is a logical functional term.default booleanisGround()Indicates whether this term contains no variables.default booleanIndicates whether this term is a literal.default booleanIndicates whether this term is a variable.label()Returns the textual representation of this term.Methods inherited from interface fr.inria.rules.dlgpemodel.api.sentences.IPrintable
toDLGPEMethods 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
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:
truewhen this term is an evaluable function
-
applySubstitution
Applies a substitution without evaluating nested functions.- Specified by:
applySubstitutionin interfaceSubstitutable<Term>- Parameters:
substitution- the substitution to apply- Returns:
- the substituted term
-
applySubstitution
Applies a substitution to this term.- Specified by:
applySubstitutionin interfaceSubstitutable<Term>- Parameters:
substitution- the substitution to applyevaluate- whether nested evaluable functions should be evaluated- Returns:
- the substituted term
-