it.unibo.tuprolog.solve.primitive

package it.unibo.tuprolog.solve.primitive

Classes

Name Description
abstract class ArithmeticRelation<E : ExecutionContext> : Predicative<E>

Base class for implementing arithmetic relation between Numeric terms

abstract class BinaryRelation<E : ExecutionContext> : PrimitiveWrapper<E>

Base class to implement primitives that relate two Terms and provide a single response

abstract class PredicateWithoutArguments<E : ExecutionContext> : PrimitiveWrapper<E>

A base class to implement predicates with zero argument

class Primitive

A typealias for a primitive function that accepts a Solve.Request and returns a Sequence of Solve.Responses

abstract class PrimitiveWrapper<C : ExecutionContext> : AbstractWrapper<Primitive>

Wrapper class for Primitive implementation

sealed class Solve: Any

A base class for Solve requests and responses

abstract class TernaryRelation<E : ExecutionContext> : PrimitiveWrapper<E>

Base class to implement primitives that relate tree Terms

abstract class TypeEnsurer<E : ExecutionContext> : Predicative<E>
abstract class TypeTester<E : ExecutionContext> : Predicative<E>
abstract class UnaryPredicate<E : ExecutionContext> : PrimitiveWrapper<E>

A base class to implement predicates with one argument

class ZeroaryPredicate<E>

Typealiases

Name Description
typealias Primitive = Function1

A typealias for a primitive function that accepts a Solve.Request and returns a Sequence of Solve.Responses

typealias ZeroaryPredicate = PredicateWithoutArguments

Methods

primitiveOf

fun primitiveOf(supportedSignature: Signature, uncheckedPrimitive: Primitive): Primitive

Creates a new Primitive, behaving exactly as given uncheckedPrimitive, but accepting only provided supportedSignature as Solve.Request signature, throwing IllegalArgumentException otherwise

Parameters

Name Description
supportedSignature: Signature
uncheckedPrimitive: Primitive

ReturnValue

Name Description
Primitive