Skip to content

Commit 001855b

Browse files
Merge pull request #736 from goblint/rm_osek
Drop OSEK support
2 parents 10c80ba + f58d862 commit 001855b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+47
-4913
lines changed

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ doclist.odocl
2222
autom4te.cache
2323
mytests
2424
result/*
25-
tests/regression/14-osek/osek_goblint.h
26-
tests/regression/16-relinv/osek_goblint.h
27-
tests/regression/16-relinv/flags.json
2825
tests/regression/*/goblint_temp
2926
linux-headers
3027

@@ -82,3 +79,4 @@ dune-workspace
8279

8380
# gobview
8481
run/
82+
gobview_out/*

regtest.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ if [[ $OSTYPE == 'darwin'* ]]; then
1515
fi
1616
params="`$grep -oP "PARAM: \K.*" $file`"
1717
cmd="./goblint --enable dbg.debug --enable dbg.regression --html $params ${@:3} $file" # -v
18-
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
1918
echo "$cmd"
2019
eval $cmd
2120
echo "See result/index.xml"

scripts/old/osek/parse_oil.rb

Lines changed: 0 additions & 28 deletions
This file was deleted.

scripts/old/osek/parse_trampoline.rb

Lines changed: 0 additions & 14 deletions
This file was deleted.

scripts/regression2sv-benchmarks.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,6 @@ def process_files():
9999
elif "kernel" in top_comment:
100100
print("kernel")
101101
continue
102-
elif "osek" in top_comment:
103-
print("osek")
104-
continue
105102
elif "allfuns" in top_comment:
106103
print("allfuns")
107104
continue

scripts/update_suite.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ def collect_warnings
151151
ranking = ["other", "warn", "race", "norace", "deadlock", "nodeadlock", "success", "fail", "unknown", "term", "noterm"]
152152
thiswarn = case obj
153153
when /\(conf\. \d+\)/ then "race"
154-
when /lockset:/ then "race" # osek races have their own legacy-like output
155154
when /Deadlock/ then "deadlock"
156155
when /lock (before|after):/ then "deadlock"
157156
when /Assertion .* will fail/ then "fail"

src/analyses/base.ml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,9 +1123,9 @@ struct
11231123
* precise information about arrays. *)
11241124
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 =
11251125
let update_variable x t y z =
1126-
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;
1126+
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;
11271127
let r = update_variable x t y z in (* refers to defintion that is outside of set *)
1128-
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;
1128+
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;
11291129
r
11301130
in
11311131
let firstvar = if M.tracing then match AD.to_var_may lval with [] -> "" | x :: _ -> x.vname else "" in
@@ -1163,19 +1163,19 @@ struct
11631163
else
11641164
new_value
11651165
in
1166-
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;
1166+
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;
11671167
if isFunctionType x.vtype then begin
1168-
if M.tracing then M.tracel "setosek" ~var:firstvar "update_one_addr: returning: '%a' is a function type \n" d_type x.vtype;
1168+
if M.tracing then M.tracel "set" ~var:firstvar "update_one_addr: returning: '%a' is a function type \n" d_type x.vtype;
11691169
st
11701170
end else
11711171
if get_bool "exp.globs_are_top" then begin
1172-
if M.tracing then M.tracel "setosek" ~var:firstvar "update_one_addr: BAD? exp.globs_are_top is set \n";
1172+
if M.tracing then M.tracel "set" ~var:firstvar "update_one_addr: BAD? exp.globs_are_top is set \n";
11731173
{ st with cpa = CPA.add x `Top st.cpa }
11741174
end else
11751175
(* Check if we need to side-effect this one. We no longer generate
11761176
* side-effects here, but the code still distinguishes these cases. *)
11771177
if (!GU.earlyglobs || ThreadFlag.is_multi a) && is_global a x then begin
1178-
if M.tracing then M.tracel "setosek" ~var:x.vname "update_one_addr: update a global var '%s' ...\n" x.vname;
1178+
if M.tracing then M.tracel "set" ~var:x.vname "update_one_addr: update a global var '%s' ...\n" x.vname;
11791179
let priv_getg = priv_getg gs in
11801180
(* Optimization to avoid evaluating integer values when setting them.
11811181
The case when invariant = true requires the old_value to be sound for the meet.
@@ -1187,10 +1187,10 @@ struct
11871187
in
11881188
let new_value = update_offset old_value in
11891189
let r = Priv.write_global ~invariant a priv_getg (priv_sideg (Option.get ctx).sideg) st x new_value in
1190-
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;
1190+
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;
11911191
r
11921192
end else begin
1193-
if M.tracing then M.tracel "setosek" ~var:x.vname "update_one_addr: update a local var '%s' ...\n" x.vname;
1193+
if M.tracing then M.tracel "set" ~var:x.vname "update_one_addr: update a local var '%s' ...\n" x.vname;
11941194
(* Normal update of the local state *)
11951195
let new_value = update_offset (CPA.find x st.cpa) in
11961196
(* what effect does changing this local variable have on arrays -
@@ -1266,16 +1266,16 @@ struct
12661266
(* We start from the current state and an empty list of global deltas,
12671267
* and we assign to all the the different possible places: *)
12681268
let nst = AD.fold update_one lval st in
1269-
(* if M.tracing then M.tracel "setosek" ~var:firstvar "new state1 %a\n" CPA.pretty nst; *)
1269+
(* if M.tracing then M.tracel "set" ~var:firstvar "new state1 %a\n" CPA.pretty nst; *)
12701270
(* If the address was definite, then we just return it. If the address
12711271
* was ambiguous, we have to join it with the initial state. *)
12721272
let nst = if AD.cardinal lval > 1 then { nst with cpa = CPA.join st.cpa nst.cpa } else nst in
1273-
(* if M.tracing then M.tracel "setosek" ~var:firstvar "new state2 %a\n" CPA.pretty nst; *)
1273+
(* if M.tracing then M.tracel "set" ~var:firstvar "new state2 %a\n" CPA.pretty nst; *)
12741274
nst
12751275
with
12761276
(* If any of the addresses are unknown, we ignore it!?! *)
12771277
| SetDomain.Unsupported x ->
1278-
(* if M.tracing then M.tracel "setosek" ~var:firstvar "set got an exception '%s'\n" x; *)
1278+
(* if M.tracing then M.tracel "set" ~var:firstvar "set got an exception '%s'\n" x; *)
12791279
M.warn "Assignment to unknown address"; st
12801280

12811281
let set_many ?ctx a (gs:glob_fun) (st: store) lval_value_list: store =
@@ -1459,7 +1459,7 @@ struct
14591459
if M.tracing then M.traceu "invariant" "New value is %a\n" VD.pretty new_val;
14601460
(* make that address meet the invariant, i.e exclusion sets will be joined *)
14611461
if is_some_bot new_val then (
1462-
if M.tracing then M.tracel "branchosek" "C The branch %B is dead!\n" tv;
1462+
if M.tracing then M.tracel "branch" "C The branch %B is dead!\n" tv;
14631463
raise Analyses.Deadcode
14641464
)
14651465
else if VD.is_bot new_val
@@ -1821,7 +1821,6 @@ struct
18211821
| _ -> res
18221822
in
18231823
if M.tracing then M.traceli "branch" ~subsys:["invariant"] "Evaluating branch for expression %a with value %a\n" d_exp exp VD.pretty valu;
1824-
if M.tracing then M.tracel "branchosek" "Evaluating branch for expression %a with value %a\n" d_exp exp VD.pretty valu;
18251824
(* First we want to see, if we can determine a dead branch: *)
18261825
match valu with
18271826
(* For a boolean value: *)
@@ -1832,7 +1831,7 @@ struct
18321831
let v = fromJust (ID.to_bool value) in
18331832
(* Eliminate the dead branch and just propagate to the true branch *)
18341833
if v = tv then refine () else begin
1835-
if M.tracing then M.tracel "branchosek" "A The branch %B is dead!\n" tv;
1834+
if M.tracing then M.tracel "branch" "A The branch %B is dead!\n" tv;
18361835
raise Deadcode
18371836
end
18381837
(* for some reason refine () can refine these, but not raise Deadcode in struct *)
@@ -1842,7 +1841,6 @@ struct
18421841
raise Deadcode
18431842
| `Bot ->
18441843
if M.tracing then M.traceu "branch" "The branch %B is dead!\n" tv;
1845-
if M.tracing then M.tracel "branchosek" "B The branch %B is dead!\n" tv;
18461844
raise Deadcode
18471845
(* Otherwise we try to impose an invariant: *)
18481846
| _ ->
@@ -1860,8 +1858,7 @@ struct
18601858
let return ctx exp fundec: store =
18611859
let st: store = ctx.local in
18621860
match fundec.svar.vname with
1863-
| "__goblint_dummy_init"
1864-
| "StartupHook" ->
1861+
| "__goblint_dummy_init" ->
18651862
if M.tracing then M.trace "init" "dummy init: %a\n" D.pretty st;
18661863
publish_all ctx `Init;
18671864
(* otherfun uses __goblint_dummy_init, where we can properly side effect global initialization *)

0 commit comments

Comments
 (0)