package prolog.components.terms import prolog.components.Program import prolog.components.Provable /** * Ask the Prolog engine. * * A goal is either an [Atom] or a [CompoundTerm]. * A goal either [succeeds][prolog.builtins.True], in which case the variables in the compound terms have a binding, * or it fails if Prolog fails to prove it. */ abstract class Goal : Term, Provable { abstract val functor: Functor override fun prove(): Boolean = Program.query(this) }