-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Java: invariant masked by overflow condition (no exceptions) ? #290
Comments
I cannot compile the files you provided, because they use libraries you have not provided. In particular, I ran these commands:
The result is a torrent of compilation errors such as
I could guess at what command you ran, and guess at what jar files you used, but I might end up doing something differently than you did. Can you please provide the missing files and the missing commands? |
By the way, this is just a guess, but maybe this issue is actually a feature request for a mode in which integer overflow is ignored. Daikon does all computation in |
Ping: could you please provide the missing files and the missing commands? |
Here's a simplified test case. Covers both longs and ints and has exact same code where we trigger and don't trigger overflow and see the differences in invariants discovered. Latest output
|
java version "1.8.0_131" Java(TM) SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
Darwin Dylans-MBP.localdomain 19.6.0 Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64
Compile per your preference...
java -cp target/classes:target/test-classes:$DAIKONDIR/daikon.jar daikon.Chicory --daikon --ppt-select-pattern=org\.joda\.time\.field\.FieldUtils org.junit.runner.JUnitCore org.joda.time.field.TestFieldUtils
What you expected to happen:
testSafeAdd Invariant should equal testSafeAdd2 (particularly
return - orig(val1) - orig(val2) == 0
as we see no indication this invariant was violated even in the overflow conditions...
Source attached SOURCE.zip
Thank you!
The text was updated successfully, but these errors were encountered: