This repository has been archived on 2025-09-23. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
2025LogProg-project-GhentPr.../src/prolog/components/terms/Goal.kt
2025-04-06 12:14:18 +02:00

17 lines
482 B
Kotlin

package prolog.components.terms
import prolog.components.Program
import prolog.components.Provable
/**
* Ask the Prolog engine.
*
* 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 : Term, Provable {
abstract val functor: Functor
override fun prove(): Boolean = Program.query(this)
}