Companion

object Companion

Functions

cached
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
matches
Link copied to clipboard
infix fun Term.matches(other: Term): Boolean
Computes whether the two terms match, using default unification strategy
mergeWith
Link copied to clipboard
infix fun Substitution.mergeWith(other: Substitution): Substitution
mguWith
Link copied to clipboard
infix fun Term.mguWith(other: Term): Substitution
Computes the Most General Unifier, using default unification strategy
naive
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: Substitution): 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
strict
Link copied to clipboard
fun strict(): Unificator
Creates naive unification strategy, that checks Terms identity through their Term.equals methods
fun strict(context: Substitution): Unificator
Creates naive unification strategy, with the given context, that checks Terms identity through their Term.equals methods
unifyWith
Link copied to clipboard
infix fun Term.unifyWith(other: Term): Term?
Computes the unified term, using default unification strategy

Properties

default
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
DEFAULT_CACHE_CAPACITY
Link copied to clipboard
const val DEFAULT_CACHE_CAPACITY: Int = 32