File tree Expand file tree Collapse file tree 2 files changed +29
-6
lines changed Expand file tree Collapse file tree 2 files changed +29
-6
lines changed Original file line number Diff line number Diff line change @@ -7,17 +7,27 @@ open Analyses
77open SparseVector
88open ListMatrix
99
10- (* To use the original affineEqualityDomain implementation uncomment this and the AD_Array.
11- Then replace AD with AD_Array in the functor application.
12- open ArrayVector
13- open ArrayMatrix *)
10+ open ArrayVector
11+ open ArrayMatrix
1412
1513include RelationAnalysis
1614
15+ (* There are two versions of the affeq domain.
16+ 1. Sparse without side effects
17+ 2. Array with side effects
18+ Default: sparse implementation
19+ The array implementation with side effects of the affeq domain is used when the --enable ana.affeq.side_effects option is set *)
20+ let get_domain: (module RelationDomain. RD ) Lazy. t =
21+ lazy (
22+ if GobConfig. get_bool " ana.affeq.side_effects" then
23+ (module AffineEqualityDomainSideEffects. D2 (ArrayVector ) (ArrayMatrix ))
24+ else
25+ (module AffineEqualityDomain. D2 (SparseVector ) (ListMatrix ))
26+ )
27+
1728let spec_module: (module MCPSpec ) Lazy. t =
1829 lazy (
19- let module AD = AffineEqualityDomain. D2 (SparseVector ) (ListMatrix ) in
20- (* let module AD_Array = AffineEqualityDomainSideEffects.D2 (ArrayVector) (ArrayMatrix) in *)
30+ let module AD = (val Lazy. force get_domain) in
2131 let module Priv = (val RelationPriv. get_priv () ) in
2232 let module Spec =
2333 struct
Original file line number Diff line number Diff line change 11981198 }
11991199 },
12001200 "additionalProperties" : false
1201+ },
1202+ "affeq" : {
1203+ "title" : " ana.affeq" ,
1204+ "type" : " object" ,
1205+ "properties" : {
1206+ "side_effects" : {
1207+ "title" : " ana.affeq.side_effects" ,
1208+ "description" : " Use side effect Affine Equality analysis (array implementation). Default is false (sparse implementation)" ,
1209+ "type" : " boolean" ,
1210+ "default" : false
1211+ }
1212+ },
1213+ "additionalProperties" : false
12011214 }
12021215 },
12031216 "additionalProperties" : false
You can’t perform that action at this time.
0 commit comments