Interface EvaluableFunction
- All Superinterfaces:
Evaluable<Term>, fr.inria.rules.dlgpemodel.api.elems.IFunctionalTerm, fr.inria.rules.dlgpemodel.api.sentences.IPrintable, fr.inria.rules.dlgpemodel.api.elems.ITerm, Standardizable, Substitutable<Term>, Term, TermCompound, TermSequenceCompound
- All Known Implementing Classes:
EvaluableFunctionImpl
public interface EvaluableFunction
extends Term, Evaluable<Term>, TermSequenceCompound, fr.inria.rules.dlgpemodel.api.elems.IFunctionalTerm
An evaluable function is a Term that can be evaluated into another (non-functional) term
- Author:
- Florent Tornil
-
Field Summary
Fields inherited from interface fr.inria.rules.dlgpemodel.api.elems.IFunctionalTerm
EXPONENTIAL, INTEGRAAL_INVOKER_IRI, INTEGRAAL_INVOKER_PREFIX, INVERSE, OPPOSITE, PRODUCT, SUMFields inherited from interface fr.inria.rules.dlgpemodel.api.sentences.IPrintable
WRITER -
Method Summary
Modifier and TypeMethodDescriptiondefault LogicalFunctionalTermConverts this evaluable function into its logical functional-term counterpart.eval(Substitution s) (1) applies the substitution to the term (2) evaluate the function associated with the termEvaluates nested functions that become ground after substitution.Returns the function name used by this evaluable term.Returns the invoker used to evaluate this function.default Optional<Substitution> homomorphism(TermSequenceCompound target, Substitution toExtend) Allows computing the homomorphism from this TermSequenceCompound to a target one if it existsdefault booleanCheck if we can evaluate the object with the given substitutiondefault booleanisGround()Indicates whether this term contains no variables.Applies a substitution to this function arguments without evaluating this function.default StringtoStandardForm(Boolean shortForm) Returns the standardized textual form.Methods inherited from interface Evaluable
getMandatoryParametersMethods inherited from interface fr.inria.rules.dlgpemodel.api.elems.IFunctionalTerm
getTermSequenceMethods inherited from interface fr.inria.rules.dlgpemodel.api.sentences.IPrintable
toDLGPEMethods inherited from interface Standardizable
toStandardFormMethods inherited from interface Term
applySubstitution, applySubstitution, isConstant, isEvaluableFunction, isFrozen, isFunctionalTerm, isLiteral, isVariable, labelMethods inherited from interface TermCompound
getAllNestedTerms, getConstants, getLiterals, getNestedTerms, getVariablesMethods inherited from interface TermSequenceCompound
getTerm, getTerms, getTermSequence, homomorphism
-
Method Details
-
getFunctionName
String getFunctionName()Returns the function name used by this evaluable term.- Specified by:
getFunctionNamein interfacefr.inria.rules.dlgpemodel.api.elems.IFunctionalTerm- Returns:
- a string representing the function name
-
eval
(1) applies the substitution to the term (2) evaluate the function associated with the termPrecondition : a functional term is evaluable IFF all of its arguments -- after applying the substitution -- are literals
-
isEvaluableWith
Description copied from interface:EvaluableCheck if we can evaluate the object with the given substitution- Specified by:
isEvaluableWithin interfaceEvaluable<Term>- Parameters:
s- substitution- Returns:
- true IFF the term after applying the substitution contains only literals
-
evaluateNestedFunctions
Evaluates nested functions that become ground after substitution.- Parameters:
s- substitution- Returns:
- a new evaluable function where some variables have been replaced by other terms, as defined by the substitution, and where all evaluable nested functions that are already evaluable have been evaluated
-
setFunctionParameters
Applies a substitution to this function arguments without evaluating this function.- Parameters:
s- substitution- Returns:
- a new function where some variables have been replaced by other terms, as defined by the substitution s
-
asLogicalFunctionalTerm
Converts this evaluable function into its logical functional-term counterpart.- Returns:
- the evaluable function represented as a logical functional term
-
homomorphism
Description copied from interface:TermSequenceCompoundAllows computing the homomorphism from this TermSequenceCompound to a target one if it exists- Specified by:
homomorphismin interfaceTermSequenceCompound- Parameters:
target- the TermSequenceCompound on which we want to maptoExtend- a substitution that the homomorphism must extend- Returns:
- an optional containing a substitution representing the homomorphism if it exists, otherwise empty
-
isGround
-
toStandardForm
Description copied from interface:StandardizableReturns the standardized textual form.- Specified by:
toStandardFormin interfaceStandardizable- Parameters:
shortForm- indicates whether the generated form should take into account the prefix system- Returns:
- the standardized form
-
getInvoker
Invoker getInvoker()Returns the invoker used to evaluate this function.- Returns:
- the invoker backing this evaluable function
-