Checkpoint
This commit is contained in:
parent
438af6c053
commit
6eca9dfcb7
25 changed files with 309 additions and 113 deletions
|
@ -1,16 +1,17 @@
|
|||
package prolog.components.terms
|
||||
|
||||
import prolog.components.Program
|
||||
import prolog.components.Provable
|
||||
|
||||
/**
|
||||
* Question stated to the Prolog engine.
|
||||
* Ask the Prolog engine.
|
||||
*
|
||||
* A goal is either an [atom][prolog.components.terms.Atom] or a [compound term][prolog.components.terms.CompoundTerm].
|
||||
* 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 : Head() {
|
||||
fun prove(): Boolean {
|
||||
return Program.query(this)
|
||||
}
|
||||
abstract class Goal : Term, Provable {
|
||||
abstract val functor: Functor
|
||||
|
||||
override fun prove(): Boolean = Program.query(this)
|
||||
}
|
||||
|
|
Reference in a new issue