Skip to content

Commit

Permalink
Merge branch 'master' into svcomp24-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Nov 24, 2023
2 parents e0a0692 + 3540ae2 commit c2e9465
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/autoTune.ml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ let rec setCongruenceRecursive fd depth neigbourFunction =
FunctionSet.iter
(fun vinfo ->
print_endline (" " ^ vinfo.vname);
setCongruenceRecursive (Cilfacade.find_varinfo_fundec vinfo) (depth -1) neigbourFunction
match Cilfacade.find_varinfo_fundec vinfo with
| fd -> setCongruenceRecursive fd (depth -1) neigbourFunction
| exception Not_found -> () (* Happens for __goblint_bounded *)
)
(FunctionSet.filter (*for extern and builtin functions there is no function definition in CIL*)
(fun x -> not (isExtern x.vstorage || BatString.starts_with x.vname "__builtin"))
Expand Down
14 changes: 14 additions & 0 deletions tests/regression/78-termination/51-modulo.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SKIP TERM PARAM: --enable ana.autotune.enabled --enable ana.sv-comp.functions --enable ana.sv-comp.enabled --set ana.autotune.activated "['congruence']" --set ana.specification "CHECK( init(main()), LTL(F end) )"

// This task previously crashed due to the autotuner
int main() {
int a;
int odd, count = 0;
while(a > 1) {
odd = a % 2;
if(!odd) a = a / 2;
else a = a - 1;
count++;
}
return count;
}

0 comments on commit c2e9465

Please sign in to comment.