Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Z module directly #1329

Merged
merged 53 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
1cbbd25
Use Z module instead of IntOps.BigIntOps in base
karoliineh Jan 15, 2024
5946b03
Use Z module instead of IntOps.BigIntOps in baseInvariant
karoliineh Jan 15, 2024
2df6d66
Use Z module instead of IntOps.BigIntOps in arrayDomain
karoliineh Jan 15, 2024
643bd41
Use Z module instead of IntOps.BigIntOps in valueDomain
karoliineh Jan 15, 2024
f16cfca
Remove BI module and use Z instead of IntOps.BigIntOps in baseDomain
karoliineh Jan 15, 2024
27b267d
Use Z instead of IntOps.BigIntOps in function types in vectorMatrix
karoliineh Jan 15, 2024
ad09388
Remove BI module and use Z instead of IntOps.BigIntOps in intDomainPr…
karoliineh Jan 15, 2024
9cf5086
Use Z instead of IntOps.BigIntOps in expressionEvaluation
karoliineh Jan 15, 2024
b6ed515
Use Z instead of IntOps.BigIntOps in transform
karoliineh Jan 15, 2024
0edd272
Use Z instead of IntOps.BigIntOps in sharedFunctions.apron
karoliineh Jan 15, 2024
7ad9d1a
Use Z instead of IntOps.BigIntOps in offset
karoliineh Jan 15, 2024
028fe9c
Use Z instead of IntOps.BigIntOps in affineEqualityDomain.apron
karoliineh Jan 15, 2024
5da716a
Remove unused BI = IntOps.BigIntOps module from apronDomain.apron
karoliineh Jan 15, 2024
c6c7cdf
Replace all BI. calls with Z. in intDomain
karoliineh Jan 15, 2024
e0cf71a
Remove I = BI module and replace I. calls with Z.
karoliineh Jan 15, 2024
e9afb07
Remove BI module and inline IntOps.BigIntOps where needed
karoliineh Jan 15, 2024
02a1f08
Use Z instead IntOps.BigIntOps for Ints_t in Congurence
karoliineh Jan 15, 2024
f6e991c
Remove Ints_t from Congurence and use Z directly
karoliineh Jan 15, 2024
d627cdc
Address semgrep findings
karoliineh Jan 15, 2024
4f8e956
Fix spacing in module definitions
karoliineh Jan 15, 2024
944b531
Include Z instead of IntOps.BigIntOps in BigInt
karoliineh Jan 15, 2024
35d8cd7
Define bitnot as Z.lognot in BigIntOpsBase
karoliineh Jan 15, 2024
d929216
Revert "Include Z instead of IntOps.BigIntOps in BigInt"
karoliineh Jan 15, 2024
4e95cff
Remove unused FlattenedBI module
karoliineh Jan 15, 2024
89b13d4
Replace BigInt.zero with Z.zero
karoliineh Jan 15, 2024
c2c4d7e
Replace BigInt.one with Z.one
karoliineh Jan 15, 2024
57d9201
Replace BigInt.equal with Z.equal
karoliineh Jan 15, 2024
12045ea
Replace BigInt.add with Z.add
karoliineh Jan 15, 2024
ace1963
Replace BigInt.sub with Z.sub
karoliineh Jan 15, 2024
b8c9b4b
Replace BigInt.neg with Z.neg
karoliineh Jan 15, 2024
dfe104f
Replace BigInt.of_int with Z.of_int
karoliineh Jan 15, 2024
8b181cf
Replace BigInt.rem with Z.rem
karoliineh Jan 15, 2024
1d18891
Replace BigInt.compare with Z.compare
karoliineh Jan 15, 2024
1b13207
Replace BigInt.shift_left with Z.shift_left
karoliineh Jan 15, 2024
b5e883b
Replace BigInt.shift_right with Z.shift_right
karoliineh Jan 15, 2024
68dc189
Replace BigInt.shift_right with Z.shift_right
karoliineh Jan 15, 2024
70871ef
Revert "Replace BigInt.shift_right with Z.shift_right"
karoliineh Jan 15, 2024
aad0a09
Replace IntOps.BigIntOps with Z where possible in intDomain.mli
karoliineh Jan 16, 2024
444290d
Simplify BigInt and replace with Z where possible
karoliineh Jan 16, 2024
f8ea135
Inline Z.pred and Z.succ
karoliineh Jan 22, 2024
7f80113
Revert part of "Remove unused FlattenedBI module": keep the test
karoliineh Jan 22, 2024
5c773ed
Remove unused functions from BigInt
karoliineh Jan 22, 2024
a8d74cd
Include Printable to IntOpsDecorator and make IntOps printable
karoliineh Jan 22, 2024
bc267c8
Remove IntDomain.BigInt
karoliineh Jan 22, 2024
0e1b389
Implement GobZ.pretty and use it where possible
karoliineh Jan 23, 2024
0417cf7
Simplify same
karoliineh Jan 23, 2024
3991fbd
Remove redundant List.hd call
karoliineh Jan 23, 2024
190dd1f
Rename log.* functions to c_log.*
karoliineh Jan 26, 2024
bdd61d1
Rename bit.* functions to log.*
karoliineh Jan 26, 2024
78e9bf2
Merge branch 'master' into z-module
karoliineh Jan 26, 2024
018166e
rename log* -> c_log*
karoliineh Jan 29, 2024
3d99978
Rename valid_log* -> valid_c_log* in tests
karoliineh Jan 29, 2024
67320d4
Update and add comments about log* functions
karoliineh Jan 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/analyses/base.ml
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ struct

let unop_ID = function
| Neg -> ID.neg
| BNot -> ID.bitnot
| LNot -> ID.lognot
| BNot -> ID.lognot
| LNot -> ID.c_lognot

let unop_FD = function
| Neg -> FD.neg
Expand Down Expand Up @@ -212,13 +212,13 @@ struct
evalint: base eval_rv 1 -> (1,[1,1])
evalint: base query_evalint m == 1 -> (0,[1,1]) *)
| Ne -> ID.ne
| BAnd -> ID.bitand
| BOr -> ID.bitor
| BXor -> ID.bitxor
| BAnd -> ID.logand
| BOr -> ID.logor
| BXor -> ID.logxor
| Shiftlt -> ID.shift_left
| Shiftrt -> ID.shift_right
| LAnd -> ID.logand
| LOr -> ID.logor
| LAnd -> ID.c_logand
| LOr -> ID.c_logor
| b -> (fun x y -> (ID.top_of result_ik))

let binop_FD (result_fk: Cil.fkind) = function
Expand Down Expand Up @@ -2436,7 +2436,7 @@ struct
| Isgreaterequal (x,y) -> Int(ID.cast_to IInt (apply_binary FDouble FD.ge x y))
| Isless (x,y) -> Int(ID.cast_to IInt (apply_binary FDouble FD.lt x y))
| Islessequal (x,y) -> Int(ID.cast_to IInt (apply_binary FDouble FD.le x y))
| Islessgreater (x,y) -> Int(ID.logor (ID.cast_to IInt (apply_binary FDouble FD.lt x y)) (ID.cast_to IInt (apply_binary FDouble FD.gt x y)))
| Islessgreater (x,y) -> Int(ID.c_logor (ID.cast_to IInt (apply_binary FDouble FD.lt x y)) (ID.cast_to IInt (apply_binary FDouble FD.gt x y)))
| Isunordered (x,y) -> Int(ID.cast_to IInt (apply_binary FDouble FD.unordered x y))
| Fmax (fd, x ,y) -> Float (apply_binary fd FD.fmax x y)
| Fmin (fd, x ,y) -> Float (apply_binary fd FD.fmin x y)
Expand Down
4 changes: 2 additions & 2 deletions src/analyses/baseInvariant.ml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ struct

let unop_ID = function
| Neg -> ID.neg
| BNot -> ID.bitnot
| LNot -> ID.lognot
| BNot -> ID.lognot
| LNot -> ID.c_lognot

let unop_FD = function
| Neg -> FD.neg
Expand Down
Loading