Package-level declarations
Types
Base class for implementing ISO arithmetic comparison predicates (=:=/2, =\=/2, </2, >/2, =</2, >=/2), i.e. BinaryRelation.Predicatives that first evaluate both arguments as arithmetic expressions (via it.unibo.tuprolog.solve.function.evalAsArithmeticExpression, raising an it.unibo.tuprolog.solve.exception.error.InstantiationError if unbound, or a it.unibo.tuprolog.solve.exception.error.TypeError if not evaluable/numeric) before comparing the resulting Numeric values via computeNumeric.
Base class to implement primitives that relate two Terms and provide a single response, sparing implementers from manually pulling first/second out of Solve.Request.arguments and checking the request's arity (always 2, enforced by PrimitiveWrapper).
A base class to implement predicates with zero arguments (e.g. !/0, nl/0, repeat/0). Follows the same design (and same ladder of nested subclasses -- WithoutSideEffects, NonBacktrackable, Functional, Predicative) as BinaryRelation; see its KDoc for the full rationale. Also available as ZeroaryPredicate.
A typealias for a primitive function that accepts a Solve.Request and returns a Sequence of Solve.Responses
Wrapper class for Primitive implementation
Base class to implement primitives that relate four Terms, sparing implementers from manually pulling first/second/third/fourth out of Solve.Request.arguments. Follows the same design (and same ladder of nested subclasses -- WithoutSideEffects, NonBacktrackable, Functional, Predicative) as BinaryRelation; see its KDoc for the full rationale.
Base class to implement primitives that relate five Terms, sparing implementers from manually pulling first/second/third/fourth/fifth out of Solve.Request.arguments. Follows the same design (and same ladder of nested subclasses -- WithoutSideEffects, NonBacktrackable, Functional, Predicative) as BinaryRelation; see its KDoc for the full rationale.
Base class to implement primitives that relate three Terms, sparing implementers from manually pulling first/second/third out of Solve.Request.arguments. Follows the same design (and same ladder of nested subclasses -- WithoutSideEffects, NonBacktrackable, Functional, Predicative) as BinaryRelation; see its KDoc for the full rationale.
Base class for unary predicates (arity 1) that always succeed if their argument is of the expected type, and throw otherwise, rather than merely testing and failing on mismatch (contrast with TypeTester). ensureType is expected to throw (typically a it.unibo.tuprolog.solve.exception.error.TypeError) on a mismatching term, and return normally otherwise.
Base class for ISO type-checking predicates of arity 1 (e.g. atom/1, var/1, is_list/1): succeeds if testType returns true for the (dereferenced) argument, fails (rather than throwing) otherwise. Contrast with TypeEnsurer, which throws instead of failing.
A base class to implement predicates with one argument, sparing implementers from manually pulling first out of Solve.Request.arguments. Follows the same design (and same ladder of nested subclasses -- WithoutSideEffects, NonBacktrackable, Functional, Predicative) as BinaryRelation; see its KDoc for the full rationale. TypeTester and TypeEnsurer further specialize Predicative for X type-checking predicates (e.g. atom/1, var/1) and type-enforcing ones respectively.
Alias for PredicateWithoutArguments, named after the "zeroary" (arity-0) predicates it helps implement.