Walks the premise's expression tree, invoking the visitor for each node,
and returns the visitor's result for the root. Returns the result of
visitor.empty() when the premise has no root expression.
Callbacks for each expression node type.
The visitor's result for the root node, or visitor.empty()
if the premise is empty.
Generic formula tree traversal via visitor pattern.