LogicProgrammingScope
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.
logicProgramming/lp are the idiomatic way to obtain and use one, optionally choosing which Unificator strategy governs it; of and empty exist for callers that need to plug in a custom Termificator, VariablesProvider, Unificator or TheoryFactory (or build a scope without immediately entering it). it.unibo.tuprolog.dsl.LogicProgrammingScope.withTheories and it.unibo.tuprolog.dsl.unify.LogicProgrammingScope.withTheories upgrade an existing :dsl-core/:dsl-unify scope into one of these.
See also
Inheritors
Properties
The TheoryFactory this scope's TheoryFactory implementation (and theory/mutableTheory) forward to.
Functions
Builds a MutableTheory out of clauseFunctions, one per clause. Otherwise identical to theory, down to how each lambda is run and its result converted via toClause; delegates to TheoryFactory.mutableTheoryOf (via theoryFactory).
Overload of TheoryFactory.mutableTheoryOf concatenating clauses and otherClauses into one MutableTheory.
Builds a Theory out of clauseFunctions, one per clause: each lambda runs with a fresh newScope as its receiver, and its result is coerced into a Clause via toClause — so it may return an already-built Clause (from it.unibo.tuprolog.core.Scope.factOf/it.unibo.tuprolog.core.Scope.ruleOf/ it.unibo.tuprolog.core.Scope.directiveOf) or a plain it.unibo.tuprolog.core.Struct, as shown in this interface's example. Delegates to TheoryFactory.theoryOf (via theoryFactory) for the actual construction.
Overload of TheoryFactory.theoryOf concatenating clauses and otherClauses into a single Theory.
Converts this value into a Clause: returned as-is if it.unibo.tuprolog.dsl.BaseLogicProgrammingScope.toTerm already yields a Clause (e.g. a it.unibo.tuprolog.core.Rule, it.unibo.tuprolog.core.Fact or it.unibo.tuprolog.core.Directive), or wrapped into a headless-body Clause via it.unibo.tuprolog.core.Scope.clauseOf if it is a plain it.unibo.tuprolog.core.Struct (mirroring how it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.fact wraps a bare it.unibo.tuprolog.core.Struct via it.unibo.tuprolog.core.Scope.factOf).