class ArithmeticEvaluator<E : ExecutionContext> : AbstractEvaluator<E, Numeric>
Constructors
<init>
constructor(request: Request<E>, index: Int?)
Evaluates an expression as a Numeric term. Throws a TypeError in case a non-evaluable sub-term is met. Throws a TypeError in case the evaluation produces a non-numeric term.
Parameters
Name | Description |
---|---|
request: Request<E>
|
the request of the primitive in which the evaluation should happen |
index: Int?
|
the index of the argument being evalued in the aforementioned primitive |
Methods
staticCheck
protected fun Term.staticCheck()
This method implements all the check required by the Prolog Standard for expressions to be considered valid (statically)
Receiver
Name | Description |
---|---|
Term
|
ReturnValue
Name | Description |
---|---|
Unit
|
dynamicCheck
protected fun Term.dynamicCheck(enclosingTerm: Struct)
This method implements all the check required by the Prolog Standard for expressions to be considered valid (dynamically)
Receiver
Name | Description |
---|---|
Term
|
Parameters
Name | Description |
---|---|
enclosingTerm: Struct
|
ReturnValue
Name | Description |
---|---|
Unit
|
CompanionObject
ArithmeticEvaluator
class ArithmeticEvaluator<E : ExecutionContext> : AbstractEvaluator<E, Numeric>
Evaluates an expression as a Numeric term. Throws a TypeError in case a non-evaluable sub-term is met. Throws a TypeError in case the evaluation produces a non-numeric term.
Fields
Name | Description |
---|---|
val allowedArithmeticSignatures: /** All allowed arithmetic signatures in Prolog expressions */
|
All allowed arithmetic signatures in Prolog expressions |
Evaluates an expression as a Numeric term. Throws a TypeError in case a non-evaluable sub-term is met. Throws a TypeError in case the evaluation produces a non-numeric term.