package prolog.ast.terms

import prolog.Substitutions
import prolog.ast.arithmetic.Float
import prolog.ast.arithmetic.Integer
import prolog.logic.compare

/**
 * Value in Prolog.
 *
 * A [Term] is either a [Variable], [Atom], [Integer],
 * [Float] or [CompoundTerm].
 * In addition, SWI-Prolog also defines the type TODO string.
 */
interface Term : Comparable<Term> {
    override fun compareTo(other: Term): Int = compare(this, other, emptyMap())
    fun applySubstitution(subs: Substitutions): Term
}
