You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ifnot (Param.handle_atomic && ask.f MustBeAtomic) then
926
-
sideg (V.unprotected x) v; (* Delay publishing unprotected write in the atomic section. *)
927
-
if!earlyglobs &¬ (ThreadFlag.is_currently_multi ask) then(* earlyglobs workaround for 13/60 *)
928
-
sideg (V.protected x) v (* Also side to protected because with earlyglobs enter_multithreaded does not side everything to protected *)
929
-
(* Unlock after invariant will still side effect refined value (if protected) from CPA, because cannot distinguish from non-invariant write since W is implicit. *)
930
-
);
931
+
let (p, w) = st.priv in
932
+
let w' =
933
+
ifnot invariant then (
934
+
ifnot (Param.handle_atomic && ask.f MustBeAtomic) then
935
+
sideg (V.unprotected x) v; (* Delay publishing unprotected write in the atomic section. *)
936
+
if!earlyglobs &¬ (ThreadFlag.is_currently_multi ask) then(* earlyglobs workaround for 13/60 *)
937
+
sideg (V.protected x) v; (* Also side to protected because with earlyglobs enter_multithreaded does not side everything to protected *)
938
+
(* Unlock after invariant will still side effect refined value (if protected) from CPA, because cannot distinguish from non-invariant write since W is implicit. *)
939
+
W.add x w
940
+
)
941
+
else
942
+
w
943
+
in
931
944
ifParam.handle_atomic && ask.f MustBeAtomicthen
932
-
{st with cpa =CPA.add x v st.cpa; priv =P.add x st.priv} (* Keep write local as if it were protected by the atomic section. *)
945
+
{st with cpa =CPA.add x v st.cpa; priv =(P.add x p, w')} (* Keep write local as if it were protected by the atomic section. *)
933
946
elseif is_unprotected ask x then
934
947
st
935
948
else
936
-
{st with cpa =CPA.add x v st.cpa; priv =P.add x st.priv}
949
+
{st with cpa =CPA.add x v st.cpa; priv =(P.add x p, w')}
0 commit comments