Clingo treats operations that were assumed to be “invalid” not as
processing errors but as operations returning an empty set.
This changes how formulas have to be evaluated. This commit implements
an explicit function for retrieving the return type of an expression,
that is, both the domain of the result as well as whether it’s an empty,
unit, or general set with multiple values.