Open eklaDFF opened 3 days ago
@cyrille-artho Look into this also, as #459 may take more time
JPF (jpf-core
) does not implement the full memory model in detail. We therefore do not have to implement the subtle differences that can arise between compareAndSet
and compareAndSetRelease
. The latter can simply call the former.
For details, see, e.g., https://chatgpt.com/share/65641ce7-6af3-4123-bca6-b0e8cc05ee25 https://link.springer.com/chapter/10.1007/978-3-642-28756-5_16
When you implement this, please add a comment that clarifies that JPF does not generate all possible outcomes here.
Here is the implementation :
boolean weakCompareAndSetRelease(Object aqs, int expect, int update){
return compareAndSet(aqs,expect,update); // JPF here do not clarify about generating all possible outcomes
}
boolean weakCompareAndSetRelease(Object owner, long expect, long update){
return compareAndSet(owner, expect, update); // JPF here do not clarify about generating all possible outcomes
}
boolean weakCompareAndSetRelease(Object aqs, Object expect, Object update){
return compareAndSet(aqs, expect, update); // JPF here do not clarify about generating all possible outcomes
}
And now the test passes.
gov.nasa.jpf.test.java.concurrent.ConcurrentSkipListMapTest
Test fails on Java-17. Throws error as :