Single clause queries
This commit is contained in:
parent
da21d890fb
commit
438af6c053
10 changed files with 16 additions and 32 deletions
|
@ -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)
|
||||
}
|
||||
}
|
Reference in a new issue