Herd and Litmus accept this program, but ACT doesn't, with the error Threads disagree on global variables sets. This is because ACT is treating the fact that P2 doesn't name x as a discrepancy between the global variables sets, when it shouldn't.
The way this error should work is, instead of requiring equality of the variables sets, we should instead try to get the set union of the variables, and raise an error only if two threads declare the same variable name with a different type.
Consider the following example:
Herd and Litmus accept this program, but ACT doesn't, with the error
Threads disagree on global variables sets
. This is because ACT is treating the fact thatP2
doesn't namex
as a discrepancy between the global variables sets, when it shouldn't.The way this error should work is, instead of requiring equality of the variables sets, we should instead try to get the set union of the variables, and raise an error only if two threads declare the same variable name with a different type.