add expr flag to infer_potential