logicProgramming
fun <R> logicProgramming(unificator: Unificator = LogicProgrammingScope.defaultUnificator, function: LogicProgrammingScope.() -> R): R
Entry point of :dsl-theory's Prolog DSL: like :dsl-unify's it.unibo.tuprolog.dsl.unify.logicProgramming, but the receiver is a LogicProgrammingScope — so it.unibo.tuprolog.theory.Theory/it.unibo.tuprolog.theory.MutableTheory-building sugar (LogicProgrammingScopeWithTheories.theory, LogicProgrammingScopeWithTheories.mutableTheory) is available inside function alongside the rest of the DSL — using unificator (an empty-context it.unibo.tuprolog.unify.Unificator.strict strategy by default) both for unification and (via an IndexedTheoryFactory built on it) for the theories it builds:
val theory = logicProgramming { theory({ factOf(structOf("a")) }) }Content copied to clipboard