Skip to content
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
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ doclist.odocl
autom4te.cache
mytests
result/*
tests/regression/14-osek/osek_goblint.h
tests/regression/16-relinv/osek_goblint.h
tests/regression/16-relinv/flags.json
tests/regression/*/goblint_temp
linux-headers

Expand Down Expand Up @@ -82,3 +79,4 @@ dune-workspace

# gobview
run/
gobview_out/*
1 change: 0 additions & 1 deletion regtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ if [[ $OSTYPE == 'darwin'* ]]; then
fi
params="`$grep -oP "PARAM: \K.*" $file`"
cmd="./goblint --enable dbg.debug --enable dbg.regression --html $params ${@:3} $file" # -v
cmd=`echo "$cmd" | sed "s:ana.osek.oil :ana.osek.oil $(dirname $file)/:"` # regression tests are run inside the test's directory which is why we either also need to cd there or instead prepend the path to the test directory for file parameters like these .oil files
echo "$cmd"
eval $cmd
echo "See result/index.xml"
28 changes: 0 additions & 28 deletions scripts/old/osek/parse_oil.rb

This file was deleted.

14 changes: 0 additions & 14 deletions scripts/old/osek/parse_trampoline.rb

This file was deleted.

3 changes: 0 additions & 3 deletions scripts/regression2sv-benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ def process_files():
elif "kernel" in top_comment:
print("kernel")
continue
elif "osek" in top_comment:
print("osek")
continue
elif "allfuns" in top_comment:
print("allfuns")
continue
Expand Down
1 change: 0 additions & 1 deletion scripts/update_suite.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ def collect_warnings
ranking = ["other", "warn", "race", "norace", "deadlock", "nodeadlock", "success", "fail", "unknown", "term", "noterm"]
thiswarn = case obj
when /\(conf\. \d+\)/ then "race"
when /lockset:/ then "race" # osek races have their own legacy-like output
when /Deadlock/ then "deadlock"
when /lock (before|after):/ then "deadlock"
when /Assertion .* will fail/ then "fail"
Expand Down
31 changes: 14 additions & 17 deletions src/analyses/base.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1123,9 +1123,9 @@ struct
* precise information about arrays. *)
let set (a: Q.ask) ?(ctx=None) ?(invariant=false) ?lval_raw ?rval_raw ?t_override (gs:glob_fun) (st: store) (lval: AD.t) (lval_type: Cil.typ) (value: value) : store =
let update_variable x t y z =
if M.tracing then M.tracel "setosek" ~var:x.vname "update_variable: start '%s' '%a'\nto\n%a\n\n" x.vname VD.pretty y CPA.pretty z;
if M.tracing then M.tracel "set" ~var:x.vname "update_variable: start '%s' '%a'\nto\n%a\n\n" x.vname VD.pretty y CPA.pretty z;
let r = update_variable x t y z in (* refers to defintion that is outside of set *)
if M.tracing then M.tracel "setosek" ~var:x.vname "update_variable: start '%s' '%a'\nto\n%a\nresults in\n%a\n" x.vname VD.pretty y CPA.pretty z CPA.pretty r;
if M.tracing then M.tracel "set" ~var:x.vname "update_variable: start '%s' '%a'\nto\n%a\nresults in\n%a\n" x.vname VD.pretty y CPA.pretty z CPA.pretty r;
r
in
let firstvar = if M.tracing then match AD.to_var_may lval with [] -> "" | x :: _ -> x.vname else "" in
Expand Down Expand Up @@ -1163,19 +1163,19 @@ struct
else
new_value
in
if M.tracing then M.tracel "setosek" ~var:firstvar "update_one_addr: start with '%a' (type '%a') \nstate:%a\n\n" AD.pretty (AD.from_var_offset (x,offs)) d_type x.vtype D.pretty st;
if M.tracing then M.tracel "set" ~var:firstvar "update_one_addr: start with '%a' (type '%a') \nstate:%a\n\n" AD.pretty (AD.from_var_offset (x,offs)) d_type x.vtype D.pretty st;
if isFunctionType x.vtype then begin
if M.tracing then M.tracel "setosek" ~var:firstvar "update_one_addr: returning: '%a' is a function type \n" d_type x.vtype;
if M.tracing then M.tracel "set" ~var:firstvar "update_one_addr: returning: '%a' is a function type \n" d_type x.vtype;
st
end else
if get_bool "exp.globs_are_top" then begin
if M.tracing then M.tracel "setosek" ~var:firstvar "update_one_addr: BAD? exp.globs_are_top is set \n";
if M.tracing then M.tracel "set" ~var:firstvar "update_one_addr: BAD? exp.globs_are_top is set \n";
{ st with cpa = CPA.add x `Top st.cpa }
end else
(* Check if we need to side-effect this one. We no longer generate
* side-effects here, but the code still distinguishes these cases. *)
if (!GU.earlyglobs || ThreadFlag.is_multi a) && is_global a x then begin
if M.tracing then M.tracel "setosek" ~var:x.vname "update_one_addr: update a global var '%s' ...\n" x.vname;
if M.tracing then M.tracel "set" ~var:x.vname "update_one_addr: update a global var '%s' ...\n" x.vname;
let priv_getg = priv_getg gs in
(* Optimization to avoid evaluating integer values when setting them.
The case when invariant = true requires the old_value to be sound for the meet.
Expand All @@ -1187,10 +1187,10 @@ struct
in
let new_value = update_offset old_value in
let r = Priv.write_global ~invariant a priv_getg (priv_sideg (Option.get ctx).sideg) st x new_value in
if M.tracing then M.tracel "setosek" ~var:x.vname "update_one_addr: updated a global var '%s' \nstate:%a\n\n" x.vname D.pretty r;
if M.tracing then M.tracel "set" ~var:x.vname "update_one_addr: updated a global var '%s' \nstate:%a\n\n" x.vname D.pretty r;
r
end else begin
if M.tracing then M.tracel "setosek" ~var:x.vname "update_one_addr: update a local var '%s' ...\n" x.vname;
if M.tracing then M.tracel "set" ~var:x.vname "update_one_addr: update a local var '%s' ...\n" x.vname;
(* Normal update of the local state *)
let new_value = update_offset (CPA.find x st.cpa) in
(* what effect does changing this local variable have on arrays -
Expand Down Expand Up @@ -1266,16 +1266,16 @@ struct
(* We start from the current state and an empty list of global deltas,
* and we assign to all the the different possible places: *)
let nst = AD.fold update_one lval st in
(* if M.tracing then M.tracel "setosek" ~var:firstvar "new state1 %a\n" CPA.pretty nst; *)
(* if M.tracing then M.tracel "set" ~var:firstvar "new state1 %a\n" CPA.pretty nst; *)
(* If the address was definite, then we just return it. If the address
* was ambiguous, we have to join it with the initial state. *)
let nst = if AD.cardinal lval > 1 then { nst with cpa = CPA.join st.cpa nst.cpa } else nst in
(* if M.tracing then M.tracel "setosek" ~var:firstvar "new state2 %a\n" CPA.pretty nst; *)
(* if M.tracing then M.tracel "set" ~var:firstvar "new state2 %a\n" CPA.pretty nst; *)
nst
with
(* If any of the addresses are unknown, we ignore it!?! *)
| SetDomain.Unsupported x ->
(* if M.tracing then M.tracel "setosek" ~var:firstvar "set got an exception '%s'\n" x; *)
(* if M.tracing then M.tracel "set" ~var:firstvar "set got an exception '%s'\n" x; *)
M.warn "Assignment to unknown address"; st

let set_many ?ctx a (gs:glob_fun) (st: store) lval_value_list: store =
Expand Down Expand Up @@ -1459,7 +1459,7 @@ struct
if M.tracing then M.traceu "invariant" "New value is %a\n" VD.pretty new_val;
(* make that address meet the invariant, i.e exclusion sets will be joined *)
if is_some_bot new_val then (
if M.tracing then M.tracel "branchosek" "C The branch %B is dead!\n" tv;
if M.tracing then M.tracel "branch" "C The branch %B is dead!\n" tv;
raise Analyses.Deadcode
)
else if VD.is_bot new_val
Expand Down Expand Up @@ -1821,7 +1821,6 @@ struct
| _ -> res
in
if M.tracing then M.traceli "branch" ~subsys:["invariant"] "Evaluating branch for expression %a with value %a\n" d_exp exp VD.pretty valu;
if M.tracing then M.tracel "branchosek" "Evaluating branch for expression %a with value %a\n" d_exp exp VD.pretty valu;
(* First we want to see, if we can determine a dead branch: *)
match valu with
(* For a boolean value: *)
Expand All @@ -1832,7 +1831,7 @@ struct
let v = fromJust (ID.to_bool value) in
(* Eliminate the dead branch and just propagate to the true branch *)
if v = tv then refine () else begin
if M.tracing then M.tracel "branchosek" "A The branch %B is dead!\n" tv;
if M.tracing then M.tracel "branch" "A The branch %B is dead!\n" tv;
raise Deadcode
end
(* for some reason refine () can refine these, but not raise Deadcode in struct *)
Expand All @@ -1842,7 +1841,6 @@ struct
raise Deadcode
| `Bot ->
if M.tracing then M.traceu "branch" "The branch %B is dead!\n" tv;
if M.tracing then M.tracel "branchosek" "B The branch %B is dead!\n" tv;
raise Deadcode
(* Otherwise we try to impose an invariant: *)
| _ ->
Expand All @@ -1860,8 +1858,7 @@ struct
let return ctx exp fundec: store =
let st: store = ctx.local in
match fundec.svar.vname with
| "__goblint_dummy_init"
| "StartupHook" ->
| "__goblint_dummy_init" ->
if M.tracing then M.trace "init" "dummy init: %a\n" D.pretty st;
publish_all ctx `Init;
(* otherfun uses __goblint_dummy_init, where we can properly side effect global initialization *)
Expand Down
Loading