package it.unibo.tuprolog.core
Classes
Name | Description |
---|---|
interface Atom: Struct, Constant, Any
|
Base type for constant, alphanumeric Terms, a.k.a. strings. An Atom is at the same time a String-valued Constant and a 0-argument Struct, whose functor is equal to value. |
interface Block: Recursive, Any
|
|
class BlockIterator: Iterator<Term>, Any
|
|
interface Clause: Struct, Any
|
|
interface Cons: List, Any
|
|
interface Constant: Term, Any
|
|
interface Directive: Clause, Any
|
|
interface Empty: Atom, Any
|
|
interface EmptyBlock: Empty, Block, Any
|
|
interface EmptyList: Empty, List, Any
|
|
interface Fact: Rule, Any
|
|
interface Formatter<T> : Any
|
A type for objects encapsulating some logic to convert any object of type T into a String |
interface Indicator: Struct, Any
|
A predicate indicator is used to denote predicates or functors. It is a ground term of the form Examples: |
interface Integer: Numeric, Any
|
|
interface List: Recursive, Any
|
|
sealed class ListIterator: Iterator<Term>, Any
|
|
interface Numeric: Constant, Any
|
|
interface Real: Numeric, Any
|
|
interface Recursive: Struct, Any
|
|
interface Rule: Clause, Any
|
|
interface Scope: Any
|
|
interface Struct: Term, Any
|
Base type for compound Terms, a.k.a. structures. A Struct is characterised by a functor and a given (non-negative) amount of args, namely arity. Each argument can be a Term of any sort. |
sealed interface Substitution: Map<Var, Term>, Any
|
General type for logic substitutions (i.e. variables assignments). There are two sorts of substitutions:
|
interface Term: Comparable<Term>, Any
|
Base type for all logic terms. Terms are immutable tree-like data structures. |
interface TermComparator<T : Term> : Any
|
|
interface TermConvertible: Any
|
An interface to be implemented by types convertible to Prolog Terms |
interface TermFormatter: Formatter<Term>, TermVisitor<String>, Any
|
A particular sort of Formatters aimed at representing terms |
interface TermVisitor<T> : Any
|
|
object Terms: Any
|
|
interface Truth: Atom, Any
|
|
interface Tuple: Recursive, Any
|
|
class TupleIterator: Iterator<Term>, Any
|
|
interface Var: Term, Any
|
Subpackages
Name | Description |
---|---|
package it.unibo.tuprolog.core.exception
|
|
package it.unibo.tuprolog.core.impl
|
|
package it.unibo.tuprolog.core.operators
|
|
package it.unibo.tuprolog.core.visitors
|
|
package it.unibo.tuprolog.core.parsing
|
Methods
prepareForExecution
fun Clause.prepareForExecution(): Clause
Receiver
Name | Description |
---|---|
Clause
|
ReturnValue
Name | Description |
---|---|
Clause
|
prepareForExecution
fun Clause.prepareForExecution(unifier: Unifier): Clause
Receiver
Name | Description |
---|---|
Clause
|
Parameters
Name | Description |
---|---|
unifier: Unifier
|
ReturnValue
Name | Description |
---|---|
Clause
|
compareStringsLocaleIndependently
expect fun compareStringsLocaleIndependently(string1: String, string2: String): Int
Parameters
Name | Description |
---|---|
string1: String
|
|
string2: String
|
ReturnValue
Name | Description |
---|---|
Int
|
toTerm
fun BigInteger.toTerm(): Integer
Receiver
Name | Description |
---|---|
BigInteger
|
ReturnValue
Name | Description |
---|---|
Integer
|
toTerm
fun Sequence
Receiver
Name | Description |
---|---|
Sequence
|
ReturnValue
Name | Description |
---|---|
List
|
format
fun <T> T.format(formatter: Formatter<T>): String
Receiver
Name | Description |
---|---|
T
|
Parameters
Name | Description |
---|---|
formatter: Formatter<T>
|
ReturnValue
Name | Description |
---|---|
String
|
toTerm
fun Long.toTerm(): Integer
Receiver
Name | Description |
---|---|
Long
|
ReturnValue
Name | Description |
---|---|
Integer
|
toTerm
fun Short.toTerm(): Integer
Receiver
Name | Description |
---|---|
Short
|
ReturnValue
Name | Description |
---|---|
Integer
|
toTerm
fun Byte.toTerm(): Integer
Receiver
Name | Description |
---|---|
Byte
|
ReturnValue
Name | Description |
---|---|
Integer
|
toTerm
fun Number.toTerm(): Numeric
Receiver
Name | Description |
---|---|
Number
|
ReturnValue
Name | Description |
---|---|
Numeric
|
toTerm
fun Iterable<Term>.toTerm(): List
Receiver
Name | Description |
---|---|
Iterable<Term>
|
ReturnValue
Name | Description |
---|---|
List
|
Prepares the receiver Clause for execution, using the provided visitor
For example, the Clause
product(A) :- A, A
is transformed, after preparation for execution, as the Term:product(A) :- call(A), call(A)