[sledge] Make simplification subexp check more precise
[sledge] Make simplification subexp check more precise

Summary:
Exp simplification must not generate fresh subexpressions in its
output that do not appear in its input, lest congruence closure gets
confused. Previously this check only considered immediate
subexpressions, which is overly restrictive.

Reviewed By: ngorogiannis

Differential Revision: D14251653

fbshipit-source-id: f8d5d9756

facebook/infer,jvillard/infer,facebook/infer,facebook/infer,facebook/infer,jvillard/infer,jvillard/infer,jvillard/infer,jvillard/infer,jvillard/infer,facebook/infer,facebook/infer,jvillard/infer,facebook/infer