Single clause queries

This commit is contained in:
Tibo De Peuter 2025-04-05 18:07:31 +02:00
parent da21d890fb
commit 438af6c053
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
10 changed files with 16 additions and 32 deletions

View file

@ -1,18 +0,0 @@
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)
}
}