@@ -157,7 +157,7 @@ let hasFunction pred =
157157 Goblint_backtrace. wrap_val ~mark: (Cilfacade. FunVarinfo var) @@ fun () ->
158158 if LibraryFunctions. is_special var then
159159 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)
161161 else
162162 false
163163 in
@@ -169,7 +169,7 @@ let hasFunction pred =
169169 match unrollType var.vtype with
170170 | TFun (_ , args , _ , _ ) ->
171171 let args = BatOption. map_default (List. map (fun (x ,_ ,_ ) -> MyCFG. unknown_exp)) [] args in
172- pred ( desc.special args)
172+ pred desc args
173173 | _ -> false
174174 else
175175 false
@@ -191,9 +191,10 @@ let enableAnalyses anas =
191191
192192let notNeccessaryThreadAnalyses = [" race" ; " deadlock" ; " maylocks" ; " symb_locks" ; " thread" ; " threadid" ; " threadJoins" ; " threadreturn" ; " mhp" ; " region" ; " pthreadMutexType" ]
193193let reduceThreadAnalyses () =
194- let isThreadCreate = function
194+ let isThreadCreate (desc : LibraryDesc.t ) args =
195+ match desc.special args with
195196 | LibraryDesc. ThreadCreate _ -> true
196- | _ -> false
197+ | _ -> LibraryDesc.Accesses. find_kind desc.accs Spawn args <> []
197198 in
198199 let hasThreadCreate = hasFunction isThreadCreate in
199200 if not @@ hasThreadCreate then (
@@ -446,7 +447,8 @@ let wideningOption factors file =
446447 }
447448
448449let activateTmpSpecialAnalysis () =
449- let isMathFun = function
450+ let isMathFun (desc : LibraryDesc.t ) args =
451+ match desc.special args with
450452 | LibraryDesc. Math _ -> true
451453 | _ -> false
452454 in
0 commit comments