-
Notifications
You must be signed in to change notification settings - Fork 35
unsoundness on non-linear arithmethics #248
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
Comments
We can reproduce using the |
Were you able to find anything? This is a quite urgent issue for us, as it directly impacts the soundness of SPARK. |
@Gbury and @OCamlPro-Coquera managed to locate the origin of the issue. We'll see what is the best fix |
Thank you for the update. |
Scaling of intervals automatically rounds integer intervals. However, some functions dealing with polynomes normalize and extract the constant part of polynome, then scale the normal part before adding back the constant part to compute the polynom interval. This means that for integer polynoms, the given interval is rounded twice, which can wrongly shrink intervals more than correct, resulting in an unsound interval.
I opened a PR ( #249 ) with a fix for the problem. It will be merged as soon as it is reviewed. |
The PR (#249) has been reviewed, bench and merge into next. |
We can confirm that this fixed the bug for us. |
Scaling of intervals automatically rounds integer intervals. However, some functions dealing with polynomes normalize and extract the constant part of polynome, then scale the normal part before adding back the constant part to compute the polynom interval. This means that for integer polynoms, the given interval is rounded twice, which can wrongly shrink intervals more than correct, resulting in an unsound interval.
Scaling of intervals automatically rounds integer intervals. However, some functions dealing with polynomes normalize and extract the constant part of polynome, then scale the normal part before adding back the constant part to compute the polynom interval. This means that for integer polynoms, the given interval is rounded twice, which can wrongly shrink intervals more than correct, resulting in an unsound interval.
Scaling of intervals automatically rounds integer intervals. However, some functions dealing with polynomes normalize and extract the constant part of polynome, then scale the normal part before adding back the constant part to compute the polynom interval. This means that for integer polynoms, the given interval is rounded twice, which can wrongly shrink intervals more than correct, resulting in an unsound interval.
To get fix for soundness issue OCamlPro#248 Change-Id: I853a3d577919dc360e4839474d8b4daa1a5106fd
Hello Alt-ergo team,
We believe we have found an unsoundness on this small file:
Our comments:
VC_1
proves with option-max-split 5
, without it alt-ergo suffers from an internal crashVC_1
and uncommentVC_2
, it proves too, which is bad sinceVC_2
is(not VC_1)
whenbit_index
is17179869183
cdiv_cases
cannot be unsound since it gives a value to an otherwise undefined symbolDiv_1
can be proved fromcdiv_cases
if we commentVC1
andVC2
and change the axiom to be a goal, so it cannot introduce an unsoundness either.The text was updated successfully, but these errors were encountered: