AbstractEvaluator
Base TermVisitor for reducing an expression Term to a value of type T, recursively resolving any Struct sub-term whose Signature matches a LogicFunction loaded in request's it.unibo.tuprolog.solve.library.Runtime (loadedFunctions) into that function's Compute.Response.result. A Struct matching no loaded function is handled by unevaluable (by default, an error).
Subclasses customize the exact evaluation semantics via staticCheck (run once per visited term, before recursing into sub-terms) and dynamicCheck (run on each sub-term's already-evaluated result); see ArithmeticEvaluator for a concrete example enforcing ISO arithmetic-expression validity.
Parameters
the request of the primitive in which the evaluation should happen
the index of the argument being evaluated in the aforementioned primitive
Inheritors
Functions
Called when struct matches no LogicFunction in loadedFunctions; by default raises a TypeError (TypeError.Expected.EVALUABLE). Overridden by ExpressionReducer to leave non-evaluable sub-terms untouched instead of failing.