@@ -157,7 +157,7 @@ let hasFunction pred =
157
157
Goblint_backtrace. wrap_val ~mark: (Cilfacade. FunVarinfo var) @@ fun () ->
158
158
if LibraryFunctions. is_special var then
159
159
let desc = LibraryFunctions. find var in
160
- GobOption. exists (fun args -> pred ( desc.special args) ) (functionArgs var)
160
+ GobOption. exists (fun args -> pred desc args) (functionArgs var)
161
161
else
162
162
false
163
163
in
@@ -169,7 +169,7 @@ let hasFunction pred =
169
169
match unrollType var.vtype with
170
170
| TFun (_ , args , _ , _ ) ->
171
171
let args = BatOption. map_default (List. map (fun (x ,_ ,_ ) -> MyCFG. unknown_exp)) [] args in
172
- pred ( desc.special args)
172
+ pred desc args
173
173
| _ -> false
174
174
else
175
175
false
@@ -191,9 +191,10 @@ let enableAnalyses anas =
191
191
192
192
let notNeccessaryThreadAnalyses = [" race" ; " deadlock" ; " maylocks" ; " symb_locks" ; " thread" ; " threadid" ; " threadJoins" ; " threadreturn" ; " mhp" ; " region" ; " pthreadMutexType" ]
193
193
let reduceThreadAnalyses () =
194
- let isThreadCreate = function
194
+ let isThreadCreate (desc : LibraryDesc.t ) args =
195
+ match desc.special args with
195
196
| LibraryDesc. ThreadCreate _ -> true
196
- | _ -> false
197
+ | _ -> LibraryDesc.Accesses. find_kind desc.accs Spawn args <> []
197
198
in
198
199
let hasThreadCreate = hasFunction isThreadCreate in
199
200
if not @@ hasThreadCreate then (
@@ -446,7 +447,8 @@ let wideningOption factors file =
446
447
}
447
448
448
449
let activateTmpSpecialAnalysis () =
449
- let isMathFun = function
450
+ let isMathFun (desc : LibraryDesc.t ) args =
451
+ match desc.special args with
450
452
| LibraryDesc. Math _ -> true
451
453
| _ -> false
452
454
in
0 commit comments