@@ -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'\n to\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'\n to\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'\n to\n %a\n results 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'\n to\n %a\n results 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') \n state:%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') \n state:%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' \n state:%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' \n state:%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