ensuringArgumentIsRef
Ensures the argument at index is a Ref -- resolving it first if it is a $Alias dealiasing expression -- returning this request for chaining, as the other ensuringArgumentIs* helpers in it.unibo.tuprolog.solve.primitive.PrimitiveWrapper do.
Throws
with expected type it.unibo.tuprolog.solve.exception.error.TypeError.Expected.REFERENCE if it is neither.
if it is a dealiasing expression whose alias is not registered.