AbstractEvaluator

abstract class AbstractEvaluator<E : ExecutionContext, T : Term> : TermVisitor<T>, Any

Fields

Name Description
protected loadedFunctions: /** Shorthand to access context loaded functions */

Shorthand to access context loaded functions

protected request: Request<E>
protected index: Int?

Constructors

<init>

constructor(request: Request<E>, index: Int?)

Parameters

Name Description
request: Request<E>
index: Int?

Methods

defaultValue

open fun defaultValue(term: Term): T

Parameters

Name Description
term: Term

ReturnValue

Name Description
T

visitTerm

open fun visitTerm(term: Term): T

Parameters

Name Description
term: Term

ReturnValue

Name Description
T

visitAtom

open fun visitAtom(term: Atom): T

Parameters

Name Description
term: Atom

ReturnValue

Name Description
T

visitIndicator

open fun visitIndicator(term: Indicator): T

Parameters

Name Description
term: Indicator

ReturnValue

Name Description
T

visitStruct

open fun visitStruct(term: Struct): T

Parameters

Name Description
term: Struct

ReturnValue

Name Description
T

unevaluable

open fun unevaluable(struct: Struct): Term

Parameters

Name Description
struct: Struct

ReturnValue

Name Description
Term

staticCheck

protected open fun Term.staticCheck()

Template method to implement static checks, i.e. those checks that can be made before evaluating sub-expressions

This is a stub implementation, that does nothing

Receiver

Name Description
Term

ReturnValue

Name Description
Unit

dynamicCheck

protected open fun Term.dynamicCheck(enclosingTerm: Struct)

Template method to implement dynamic checks, i.e. those checks that must be made after sub-expression evaluation, on its result

This is a stub implementation, that does nothing

Receiver

Name Description
Term

Parameters

Name Description
enclosingTerm: Struct

ReturnValue

Name Description
Unit