-
Notifications
You must be signed in to change notification settings - Fork 33
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
Assertion failure in "src/lib/reasoners/intervalCalculus.ml", line 1175, when using the CDCL solver #474
Comments
the test case in the issue is hidden by #731 but the underlying cause is probably still valid. |
The assertion failure looks to be related to confusion in More precisely, there is an inequality (
and the normalized polynomial is tracked:
But It is not entirely clear to me what the fix should be. I don't think we should have polynomials with non-normalized terms lying around (and the code in |
$ alt-ergo --sat-solver CDCL --enable-assertions c_262_0_ae_bis.ae
[Error]-ur_0'*'ur_0'*'ur_0+ur_0+109/50 <= 0 NOT normalized
It is equal to -!?___let2((ur_0 * ur_0))'*'ur_0+ur_0+109/50
Fatal error: exception File "src/lib/reasoners/intervalCalculus.ml", line 1336, characters 10-16: Assertion failed |
Here is a simplified version that still exhibits the underlying cause (with
It also fails with the default CDCL-Tableaux solver: $ alt-ergo --enable-assertions --sat-solver CDCL c_262_0_ae_min.ae
[Error]f((2),(1),(0)) <= 0 NOT normalized
It is equal to f(f_2_1,(0))
Fatal error: exception File "src/lib/reasoners/intervalCalculus.ml", line 1327, characters 10-16: Assertion failed The crux of the issue seems to be that after rewriting This looks to be related to the treatment of AC symbols — at least I didn't manage to reproduce the problem with a non-AC symbol —, even though I still do not understand exactly why. The only thing that comes to mind is that with an AC symbol, |
I think I now understand the source of the issue, and that was not it. Without AC symbols, the arithmetic engine (intervalCalculus) only ever sees aliens that are term representatives (in the sense of "the output of This means that when the union-find updates the "touched" set during an union with a mapping This is important, because the arithmetic engine only tracks bounds information for the normal forms — so it doesn't have any information on In the presence of AC symbols, we can end up with normal forms that are not term representatives (such as This can be verified by adding the lines
immediately after Still need to figure out the right fix. Adding the entry At least I am fairly confident this is the root cause of the issue, and that it can only cause loss of precision (and crashes, as we have seen) — but probably not unsoundness. |
In CC(X), the leaves are always terms that were present in the original problem: we do not introduce new uninterpreted terms. In AC(X), this is no longer true: we might introduce new AC leaves dynamically that are not themselves term representatives (i.e. they don't have an entry in the `repr` map) through "deep" rewriting into the AC leaf. When we have a class representative `rr` for a semantic value `r`, and a new class representative `nrr` is found, the relations see an equality (with `Subst` origin) `r = nrr`. Normally, since `rr` is a term representative, we have `rr --> rr` as a mapping, and so the relation will see `rr = nrr` and can use this to update its internal state. With these "dynamic" representative, when they later get override by a new representative, the relations will *not* see an `rr = nrr` equality, which makes its internal state get out of sync and can cause bugs. This patch makes it so that, when we encounter one of these "dynamic" representatives, we artificially add the `rr = nrr` equality (by adding `rr --> nrr` as a pivot, which will in turn cause the equality to show up). Since this case should only be possible with AC rewriting, the `rr = nrr` equality is only added in `up_uf_rs`, i.e. if there are AC rewrite rules. Fixes OCamlPro#474
c_262_0_ae_bis.ae.txt
Running Alt-Ergo (built from the "next" branch) on the attached file with the command:
Causes the following error:
And when the other solvers are used (by replacing CDCL with Tableaux or Tableaux-CDCL or CDCL-Tableaux) then Alt-Ergo responds with "Valid".
Some additional interesting points:
(ruqv0 * ruqv0) * (if true then ruqv0 else ur_3)
in the line 14 with(ruqv0 * ruqv0) * ruqv0
or(ruqv0 * ruqv0)
, then AE takes too long to answer (more than 3 minutes) when the CDCL solver is used. And answers with "Valid" in the other cases.ruqv0
then the answer is "Valid" in every case.ur_3
then AE says:"I Don't Know" when the CDCL solver is used, and "Valid" in the other cases.The text was updated successfully, but these errors were encountered: