Inference of Abstraction for a Unified Account of Symbolic Reasoning from Data