Inference of @Pure annotations