@@ -11,12 +11,12 @@ let addThreshold t_ref z = t_ref := Thresholds.add z !t_ref
1111class extractThresholdsFromConditionsVisitor (upper_thresholds ,lower_thresholds , octagon_thresholds ) = object
1212 inherit nopCilVisitor
1313
14- method! vexpr = function (* TODO: unrolltype? *)
14+ method! vexpr = function
1515 (* Comparisons of type : 10 <= expr, expr >= 10, expr < 10, 10 > expr * )
16- | BinOp (Le , (Const (CInt (i,_,_))), _, ( TInt _) )
17- | BinOp (Ge , _, (Const (CInt (i,_,_))), ( TInt _) )
18- | BinOp (Lt , _, (Const (CInt (i,_,_))), ( TInt _) )
19- | BinOp (Gt, (Const (CInt(i ,_ ,_ ))), _ , (TInt _ ) ) ->
16+ | BinOp (Le , (Const (CInt (i,_,_))), _, _ )
17+ | BinOp (Ge , _, (Const (CInt (i,_,_))), _ )
18+ | BinOp (Lt , _, (Const (CInt (i,_,_))), _ )
19+ | BinOp (Gt, (Const (CInt(i ,_ ,_ ))), _ , _ ) ->
2020 addThreshold upper_thresholds @@ i;
2121 addThreshold lower_thresholds @@ Z. pred i;
2222
@@ -28,10 +28,10 @@ class extractThresholdsFromConditionsVisitor(upper_thresholds,lower_thresholds,
2828 DoChildren
2929
3030 (* Comparisons of type: 10 < expr, expr > 10, expr <= 10, 10 >= expr *)
31- | BinOp (Lt , (Const (CInt (i,_,_))), _, ( TInt _) )
32- | BinOp (Gt , _, (Const (CInt (i,_,_))), ( TInt _) )
33- | BinOp (Le , _, (Const (CInt (i,_,_))), ( TInt _) )
34- | BinOp (Ge, (Const (CInt(i ,_ ,_ ))), _ , (TInt _ ) ) ->
31+ | BinOp (Lt , (Const (CInt (i,_,_))), _, _ )
32+ | BinOp (Gt , _, (Const (CInt (i,_,_))), _ )
33+ | BinOp (Le , _, (Const (CInt (i,_,_))), _ )
34+ | BinOp (Ge, (Const (CInt(i ,_ ,_ ))), _ , _ ) ->
3535 let i = Z. succ i in (* The same as above with i+1 because for integers expr <= 10 <=> expr < 11 *)
3636 addThreshold upper_thresholds @@ i;
3737 addThreshold lower_thresholds @@ Z. pred i;
@@ -44,10 +44,10 @@ class extractThresholdsFromConditionsVisitor(upper_thresholds,lower_thresholds,
4444 DoChildren
4545
4646 (* Comparisons of type: 10 == expr, expr == 10, expr != 10, 10 != expr *)
47- | BinOp (Eq , (Const (CInt (i,_,_))), _, ( TInt _) )
48- | BinOp (Eq , _, (Const (CInt (i,_,_))), ( TInt _) )
49- | BinOp (Ne , _, (Const (CInt (i,_,_))), ( TInt _) )
50- | BinOp (Ne, (Const (CInt(i ,_ ,_ ))), _ , (TInt _ ) ) ->
47+ | BinOp (Eq , (Const (CInt (i,_,_))), _, _ )
48+ | BinOp (Eq , _, (Const (CInt (i,_,_))), _ )
49+ | BinOp (Ne , _, (Const (CInt (i,_,_))), _ )
50+ | BinOp (Ne, (Const (CInt(i ,_ ,_ ))), _ , _ ) ->
5151 addThreshold upper_thresholds @@ i;
5252 addThreshold lower_thresholds @@ i;
5353
0 commit comments