File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -855,6 +855,12 @@ struct
855855 inv_exp (Float ftv) exp st
856856
857857 let invariant man st exp tv =
858+ (* TODO: this cast should be supported generally somewhere above *)
859+ let exp =
860+ match exp with
861+ | CastE (TInt (IBool, _ ), exp ) -> exp
862+ | exp -> exp
863+ in
858864 (* The computations that happen here are not computations that happen in the programs *)
859865 (* Any overflow during the forward evaluation will already have been flagged here *)
860866 GobRef. wrap AnalysisState. executing_speculative_computations true
Original file line number Diff line number Diff line change @@ -511,6 +511,12 @@ struct
511511
512512 (* * Assert any expression. *)
513513 let assert_inv ask d e negate no_ov =
514+ (* TODO: this cast should be supported generally somewhere above? *)
515+ let e =
516+ match e with
517+ | CastE (TInt (IBool, _ ), e ) -> e
518+ | e -> e
519+ in
514520 let e' =
515521 if exp_is_constraint e then
516522 e
You can’t perform that action at this time.
0 commit comments