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

Consider all spawning functions in autotuner #1604

Merged
merged 2 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 7 additions & 5 deletions src/autoTune.ml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ let hasFunction pred =
Goblint_backtrace.wrap_val ~mark:(Cilfacade.FunVarinfo var) @@ fun () ->
if LibraryFunctions.is_special var then
let desc = LibraryFunctions.find var in
GobOption.exists (fun args -> pred (desc.special args)) (functionArgs var)
GobOption.exists (fun args -> pred desc args) (functionArgs var)
else
false
in
Expand All @@ -169,7 +169,7 @@ let hasFunction pred =
match unrollType var.vtype with
| TFun (_, args, _, _) ->
let args = BatOption.map_default (List.map (fun (x,_,_) -> MyCFG.unknown_exp)) [] args in
pred (desc.special args)
pred desc args
| _ -> false
else
false
Expand All @@ -191,9 +191,10 @@ let enableAnalyses anas =

let notNeccessaryThreadAnalyses = ["race"; "deadlock"; "maylocks"; "symb_locks"; "thread"; "threadid"; "threadJoins"; "threadreturn"; "mhp"; "region"; "pthreadMutexType"]
let reduceThreadAnalyses () =
let isThreadCreate = function
let isThreadCreate (desc: LibraryDesc.t) args =
match desc.special args with
| LibraryDesc.ThreadCreate _ -> true
| _ -> false
| _ -> LibraryDesc.Accesses.find_kind desc.accs Spawn args <> []
in
let hasThreadCreate = hasFunction isThreadCreate in
if not @@ hasThreadCreate then (
Expand Down Expand Up @@ -446,7 +447,8 @@ let wideningOption factors file =
}

let activateTmpSpecialAnalysis () =
let isMathFun = function
let isMathFun (desc: LibraryDesc.t) args =
match desc.special args with
| LibraryDesc.Math _ -> true
| _ -> false
in
Expand Down
7 changes: 4 additions & 3 deletions src/util/autoSoundConfig.ml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ let enableSpecAnalyses spec analyses =
Logs.info "Specification: %s -> enabling soundness analyses \"%s\"" (Svcomp.Specification.to_string [spec]) (String.concat ", " analyses);
enableAnalyses analyses

let enableOptions options =
let enableOpt option =
let enableOptions options =
let enableOpt option =
Logs.info "Setting \"%s\" to true" option;
set_bool option true
in
Expand Down Expand Up @@ -60,7 +60,8 @@ let enableAnalysesForSpecification () =
let longjmpAnalyses = ["activeLongjmp"; "activeSetjmp"; "taintPartialContexts"; "modifiedSinceSetjmp"; "poisonVariables"; "expsplit"; "vla"]

let activateLongjmpAnalysesWhenRequired () =
let isLongjmp = function
let isLongjmp (desc: LibraryDesc.t) args =
match desc.special args with
| LibraryDesc.Longjmp _ -> true
| _ -> false
in
Expand Down
Loading