it.unibo.tuprolog.solve.function

package it.unibo.tuprolog.solve.function

Classes

Name Description
open class ArithmeticEvaluator: ExpressionEvaluator

Prolog Arithmetic Expression evaluator implementation

abstract class BinaryMathFunction: MathFunction

Base class to implement unary math functions

sealed class Compute: Any

A base class for Computation requests and responses

open class ExpressionEvaluator: TermVisitor<Term>, Any

A class implementing a visitor that will evaluate expression terms according to context loaded functions

No additional check is implemented at this level

abstract class FunctionWrapper<C : ExecutionContext> : AbstractWrapper<PrologFunction>

A class wrapping a PrologFunction implementation

abstract class IntegersBinaryMathFunction: BinaryMathFunction

Base class to implement math functions accepting only integers

abstract class MathFunction: FunctionWrapper<ExecutionContext>

Base class to implement arithmetic functions

abstract class NullaryMathFunction: MathFunction

Base class to implement nullary math functions (with no arguments)

class PrologFunction

A typealias for a prolog function that accepts a Compute.Request and returns a Compute.Response

abstract class UnaryMathFunction: MathFunction

Base class to implement unary math functions

Typealiases

Name Description
typealias PrologFunction = Function1

A typealias for a prolog function that accepts a Compute.Request and returns a Compute.Response

Methods

functionOf

fun functionOf(supportedSignature: Signature, uncheckedFunction: PrologFunction): PrologFunction

Creates a new PrologFunction, behaving exactly as given uncheckedFunction, but accepting only provided supportedSignature as Compute.Request signature, throwing IllegalArgumentException otherwise

Parameters

Name Description
supportedSignature: Signature
uncheckedFunction: PrologFunction

ReturnValue

Name Description
PrologFunction