cleanUp

abstract override fun cleanUp(hideWildcardVariables: Boolean): Solution.No

Returns a Solution equivalent to this one, but with every variable not occurring in query (nor bound, in substitution, to a variable occurring in query) removed from substitution. Useful to drop resolution-internal variables before presenting a solution to a user.

When hideWildcardVariables is true, wildcard variables (per it.unibo.tuprolog.core.Var.isWildcard, e.g. _P) occurring in query are treated as if they didn't occur there either, so their bindings are removed from substitution too -- matching the ShowWildCardVariablesInSolutions flag's off setting.

No default value: a default on an @JsName-annotated overridden interface method here triggers a Kotlin/JS default-argument-dispatch bug (an omitted-argument call recurses into itself instead of the real implementation) -- every caller passes this explicitly.