Companion

object Companion

Functions

Link copied to clipboard
fun cached(other: Unificator, capacity: Int = DEFAULT_CACHE_CAPACITY): Unificator

Makes another unification strategy cached, by letting memorising the most recent terms unified through it

Link copied to clipboard
infix fun <ERROR CLASS>.matches(other: <ERROR CLASS>): Boolean

Computes whether the two terms match, using default unification strategy

Link copied to clipboard
infix fun <ERROR CLASS>.mergeWith(other: <ERROR CLASS>): <ERROR CLASS>
Link copied to clipboard
infix fun <ERROR CLASS>.mguWith(other: <ERROR CLASS>): <ERROR CLASS>

Computes the Most General Unifier, using default unification strategy

Link copied to clipboard
fun naive(): Unificator

Creates naive, empty unification strategy, that checks Terms identity through their Term.equals methods, except in the case of numbers which are compared by value

fun naive(context: <ERROR CLASS>): Unificator

Creates naive unification strategy, with the given context, that checks Terms identity through their Term.equals methods, except in the case of numbers which are compared by value

Link copied to clipboard
fun strict(): Unificator

Creates naive unification strategy, that checks Terms identity through their Term.equals methods

fun strict(context: <ERROR CLASS>): Unificator

Creates naive unification strategy, with the given context, that checks Terms identity through their Term.equals methods

Link copied to clipboard
infix fun <ERROR CLASS>.unifyWith(other: <ERROR CLASS>): <ERROR CLASS>?

Computes the unified term, using default unification strategy

Properties

Link copied to clipboard
val default: Unificator

The default unification strategy that uses plain equals to determine Terms identity, and exploits an LRU cache whose capacity is DEFAULT_CACHE_CAPACITY

Link copied to clipboard
const val DEFAULT_CACHE_CAPACITY: Int = 32