Package-level declarations
Types
Full term-construction, unification and theory-building scope of :dsl-theory's Prolog DSL: composes :dsl-core's scope mixins (MinimalLogicProgrammingScope, LogicProgrammingScopeWithSubstitutions, LogicProgrammingScopeWithPrologStandardLibrary, LogicProgrammingScopeWithOperators, LogicProgrammingScopeWithVariables) and :dsl-unify's LogicProgrammingScopeWithUnification with LogicProgrammingScopeWithTheories, so an it.unibo.tuprolog.theory.Theory/it.unibo.tuprolog.theory.MutableTheory can be built directly from the DSL (via it.unibo.tuprolog.dsl.theory.LogicProgrammingScopeWithTheories.theory/ it.unibo.tuprolog.dsl.theory.LogicProgrammingScopeWithTheories.mutableTheory), all self-referentially typed so chained calls keep resolving to this same, richer scope.
Default, stateless implementation of LogicProgrammingScope: forwards VariablesProvider, Unificator and TheoryFactory operations to variablesProvider, unificator and theoryFactory respectively (via Kotlin delegation), and every other scope operation up its supertypes' default implementations. Obtained through LogicProgrammingScope.of/LogicProgrammingScope.empty rather than constructed directly in typical usage.
Adds theory/clause-database-building sugar to LogicProgrammingScopeWithUnificator: implements TheoryFactory itself (forwarding to theoryFactory, e.g. via TheoryFactory by theoryFactory as LogicProgrammingScopeImpl does) so a it.unibo.tuprolog.theory.Theory/MutableTheory can be built directly from this scope, and adds theory/mutableTheory overloads accepting one DSL lambda per clause (rather than an already-built Clause) plus theoryOf/mutableTheoryOf overloads that concatenate several Iterable/Sequences of clauses into one:
Functions
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:
Shorthand for logicProgramming.
Deprecated alias of logicProgramming/lp; kept only for backwards compatibility.
Upgrades this :dsl-core scope into a :dsl-theory LogicProgrammingScope adding unification and theory-building support to it, reusing its underlying it.unibo.tuprolog.core.Scope, it.unibo.tuprolog.dsl.Termificator and it.unibo.tuprolog.core.VariablesProvider (so it.unibo.tuprolog.core.Vars and terms already built through this scope remain valid and usable in the returned one) and equipping it with unificator (LogicProgrammingScope.defaultUnificator unless stated otherwise) as its unification strategy and an IndexedTheoryFactory built on unificator as its TheoryFactory. Useful when a plain :dsl-core scope is already at hand (e.g. received as a parameter) and unification/theory-building are only needed from that point on.
Upgrades this :dsl-unify scope into a :dsl-theory LogicProgrammingScope adding theory-building support to it, reusing its underlying it.unibo.tuprolog.core.Scope, it.unibo.tuprolog.dsl.Termificator and it.unibo.tuprolog.core.VariablesProvider, and equipping it with unificator (LogicProgrammingScope.defaultUnificator unless stated otherwise — not necessarily this scope's own it.unibo.tuprolog.unify.UnificationAware.unificator, so pass it explicitly to preserve it) and theoryFactory (an IndexedTheoryFactory over unificator by default). Useful when a :dsl-unify scope is already at hand and theory-building is only needed from that point on.