Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SC-per-Location Axiom #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 5 additions & 1 deletion alloy/ptx.als
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,12 @@ pred no_thin_air {
acyclic[rf + dep]
}

pred sc_per_location {
acyclic[strong[com] + po_loc]
}

pred ptx_mm {
no_thin_air and atomicity and coherence and causality and seq_cst
no_thin_air and atomicity and coherence and causality and seq_cst and sc_per_location
}


Expand Down
21 changes: 21 additions & 0 deletions tests/SC_per_location.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.global x;
.global f1;
.global f2;

d0.b0.t0 {
st.release.sys [x], 1;
st.release.sys [f1], 1;
}

d0.b1.t0 {
st.release.gpu [x], 2;
ld.acquire.sys r0, [x];
st.release.sys [f2], 1;
}
d0.b2.t0 {
ld.acquire.sys r1, [f2];
ld.acquire.sys r2, [f2];
ld.acquire.sys r3, [x];
}

assert (r0 != 0 || r1 != 1 || r2 != 1 || r3 != 2) as my_test;