Checkpoint

This commit is contained in:
Tibo De Peuter 2025-04-05 17:36:37 +02:00
parent 39c3af4ba5
commit da21d890fb
39 changed files with 1166 additions and 48 deletions

View file

@ -0,0 +1,18 @@
package prolog.components
import prolog.components.terms.Term
/**
* Question stated to the Prolog engine.
*
* A goal is either an [atom][prolog.components.terms.Atom] or a [compound term][prolog.components.terms.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.
*/
interface Goal: Term {
val functor: Functor
fun prove(): Boolean {
return Program.query(this)
}
}