Soundness of constant folding