Skip to content
Snippets Groups Projects
Commit a568fe56 authored by Basile Desloges's avatar Basile Desloges
Browse files

[eacsl:analyses] Complete `Typing.type_term` to support remaining bitwise operations

parent 63f85c06
No related branches found
No related tags found
No related merge requests found
...@@ -382,7 +382,8 @@ let rec type_term ~use_gmp_opt ?(arith_operand=false) ?ctx t = ...@@ -382,7 +382,8 @@ let rec type_term ~use_gmp_opt ?(arith_operand=false) ?ctx t =
| LNot -> c_int, ctx_res (* converted into [t == 0] in case of GMP *) | LNot -> c_int, ctx_res (* converted into [t == 0] in case of GMP *)
| Neg | BNot -> dup ctx_res) | Neg | BNot -> dup ctx_res)
| TBinOp ((PlusA | MinusA | Mult | Div | Mod | Shiftlt | Shiftrt), t1, t2) | TBinOp ((PlusA | MinusA | Mult | Div | Mod | Shiftlt | Shiftrt | BAnd
| BOr | BXor), t1, t2)
-> ->
let i = Interval.infer t in let i = Interval.infer t in
let i1 = Interval.infer t1 in let i1 = Interval.infer t1 in
...@@ -429,10 +430,6 @@ let rec type_term ~use_gmp_opt ?(arith_operand=false) ?ctx t = ...@@ -429,10 +430,6 @@ let rec type_term ~use_gmp_opt ?(arith_operand=false) ?ctx t =
ignore (type_term ~use_gmp_opt:true ~ctx:c_int t2); ignore (type_term ~use_gmp_opt:true ~ctx:c_int t2);
dup ty dup ty
| TBinOp (BAnd, _, _) -> Error.not_yet "bitwise and"
| TBinOp (BXor, _, _) -> Error.not_yet "bitwise xor"
| TBinOp (BOr, _, _) -> Error.not_yet "bitwise or"
| TCastE(_, t') -> | TCastE(_, t') ->
(* compute the smallest interval from the whole term [t] *) (* compute the smallest interval from the whole term [t] *)
let i = Interval.infer t in let i = Interval.infer t in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment