withTheories
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.