TestSubstitutionsImpl
Concrete implementation of TestSubstitutions, instantiated via TestSubstitutions.prototype.
Properties
A long test max duration, four times mediumDuration; used for queries involving deeper search or recursion.
A medium test max duration, twice shortDuration; used for queries involving a handful of resolution steps.
A short test max duration, used for queries expected to resolve almost immediately.
Functions
Runs interestingVariablesAreProperlyTracked's scenario with it.unibo.tuprolog.solve.flags.TrackVariables off, and checks that the query's own variables (A, B, C) are still observed by the inspector at every call site regardless — only the intermediate variable D (introduced by callsWithVariablesAndInspectorTheory's own rule bodies) is affected by the flag.
Solves p(A, B, C) against TestingClauseTheories.callsWithVariablesAndInspectorTheory's theory with it.unibo.tuprolog.solve.flags.TrackVariables on; the intermediate variable D (bound only inside the theory's own rule bodies, not directly by the query) is observed by the inspector at its fourth call site, alongside the query's own A/B/C/E — it is not discarded even though it is not one of the query's variables.
Solves a(X) against TestingClauseTheories.callsWithVariablesTheory (a(A) :- b(A), d(Z). and similar rules introducing intermediate variables Z/W); succeeds with X bound to 1, and the resulting substitution contains only X — the intermediate variables introduced along the way are obliterated from the final substitution once they are no longer needed.