refactor: Herstructurering

This commit is contained in:
Tibo De Peuter 2025-04-06 19:16:50 +02:00
parent 1acd1cfb67
commit e3c84e1761
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
33 changed files with 290 additions and 178 deletions

View file

@ -0,0 +1,18 @@
package prolog.ast.terms
import prolog.Program
import prolog.ast.logic.Provable
import prolog.logic.Substituted
/**
* 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(subs: Substituted): Sequence<Substituted> = Program.solve(this, subs)
}