Taclet option for checking overflows (in Java code) does not work #3352
Labels
Calculus
Documentation
Improvements or additions to documentation
🐞 Bug
P:HIGH
Prover Core
✋ Soundness
Description
In the current version of KeY, the integer semantics with explicit overflow checks as introduced by #3027 are broken on at least 3 levels:
intRules:arithmeticSemanticsCheckingOF
are exactly identical to those withintRules:arithmeticSemanticsIgnoringOF
. In the rule files of key, introduction of the additional branches is guarded byintRules:checkedOverflow
, which of course does not exist. Using an undeclared taclet option in any rule file should really throw an error in the GUI!inRange(...)
is always rewritten to true!Furthermore, there is no documentation of the final solution (description of what has been implemented in #3014 and #3027). The implemented solution deviates from the description in the wiki (https://github.com/KeYProject/key/wiki/Spec-math-modes). We really should have a user-level documentation in key-docs.
I am a bit shocked that such a major point of KeY was apparently not even tested manually and survived for half a year. We really should have unit tests here, e.g. a small proof obligation (in a key file) for each of the options that is only provable if the correct semantics are used.
Reproducible
always
Steps to reproduce
The proof is closed instantly, while it should have an additional (unprovable) branch containing the overflow check for
+
. This is not the case due to point 1 in the above list.Again, the proof is closed. Now it contains the additional branch for overflow checking. However, this branch is closed, which should not be the case, since the specification uses (unbounded) bigints, while the code potentially has an overflow.
The text was updated successfully, but these errors were encountered: