Checkpoint
This commit is contained in:
parent
39c3af4ba5
commit
da21d890fb
39 changed files with 1166 additions and 48 deletions
18
src/prolog/components/Goal.kt
Normal file
18
src/prolog/components/Goal.kt
Normal 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)
|
||||
}
|
||||
}
|
Reference in a new issue