-
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
Stack overflow #964
Comments
Thanks for the report. I can confirm the issue on both the development branch and Alt-Ergo 2.5.2. It looks like we are trying to substitute a term with another term that contains it, which is not going to work. I will investigate. |
Great: this is a case where there are two separate AC symbols, and it turns out that we don't do things properly. We were just talking with @Gbury the other day and noticed that what Alt-Ergo implements is not actually what is described in the paper that's suppose to describe it, and that we should investigate this as it could be problematic… so this proves that, I guess. The issue is as follows:
Minimal reproducer:
(Side note: |
Alt-Ergo uses an abstraction mechanism for the arguments of AC symbols to ensure termination of the induced rewrite ordering without resorting to a recursive path ordering. This is described in section 6 of [this paper][1], except that the implementation doesn't do exactly what is described there -- in particular, it only abstracts nested AC symbols, which is an issue when an argument is not an AC symbol but a semantic value that contains another AC symbol. This patch changes the `abstract2` function in `ac.ml`, where this abstraction mechanism is implemented, to also introduce abstracted constants for non-constant terms. Fixes OCamlPro#964 [1]: https://arxiv.org/abs/1207.3262
Alt-Ergo uses an abstraction mechanism for the arguments of AC symbols to ensure termination of the induced rewrite ordering without resorting to a recursive path ordering. This is described in section 6 of [this paper][1], except that the implementation doesn't do exactly what is described there -- in particular, it only abstracts nested AC symbols, which is an issue when an argument is not an AC symbol but a semantic value that contains another AC symbol. This patch changes the `abstract2` function in `ac.ml`, where this abstraction mechanism is implemented, to also introduce abstracted constants for non-constant terms. Fixes OCamlPro#964 [1]: https://arxiv.org/abs/1207.3262
This patch implements a variation of the abstraction mechanism described in the AC(X) paper. This should hopefully ensure that we can't create substitution cycles due to improper term ordering. Note that the issue is related to comparing distinct AC symbols: when the AC symbols are identical, the AC theory uses a multiset ordering on its argument, which prevent substitution cycles. But when the AC symbols are different, only the symbols are compared, not the arguments, and so we must rely on the abstraction mechanism to prevent cycles. This is a do-over of OCamlPro#974 that should be closer in spirit to the implementation of the paper and without the associated regressions. Fixes OCamlPro#964
This patch implements a variation of the abstraction mechanism described in the AC(X) paper. This should hopefully ensure that we can't create substitution cycles due to improper term ordering. Note that the issue is related to comparing distinct AC symbols: when the AC symbols are identical, the AC theory uses a multiset ordering on its argument, which prevent substitution cycles. But when the AC symbols are different, only the symbols are compared, not the arguments, and so we must rely on the abstraction mechanism to prevent cycles. This is a do-over of OCamlPro#974 that should be closer in spirit to the implementation of the paper and without the associated regressions. Fixes OCamlPro#964
This patch implements a variation of the abstraction mechanism described in the AC(X) paper. This should hopefully ensure that we can't create substitution cycles due to improper term ordering. Note that the issue is related to comparing distinct AC symbols: when the AC symbols are identical, the AC theory uses a multiset ordering on its argument, which prevent substitution cycles. But when the AC symbols are different, only the symbols are compared, not the arguments, and so we must rely on the abstraction mechanism to prevent cycles. This is a do-over of OCamlPro#974 that should be closer in spirit to the implementation of the paper and without the associated regressions. Fixes OCamlPro#964
This patch implements a variation of the abstraction mechanism described in the AC(X) paper. This should hopefully ensure that we can't create substitution cycles due to improper term ordering. Note that the issue is related to comparing distinct AC symbols: when the AC symbols are identical, the AC theory uses a multiset ordering on its argument, which prevent substitution cycles. But when the AC symbols are different, only the symbols are compared, not the arguments, and so we must rely on the abstraction mechanism to prevent cycles. This is a do-over of OCamlPro#974 that should be closer in spirit to the implementation of the paper and without the associated regressions. Fixes OCamlPro#964
This patch implements a variation of the abstraction mechanism described in the AC(X) paper. This should hopefully ensure that we can't create substitution cycles due to improper term ordering. Note that the issue is related to comparing distinct AC symbols: when the AC symbols are identical, the AC theory uses a multiset ordering on its argument, which prevent substitution cycles. But when the AC symbols are different, only the symbols are compared, not the arguments, and so we must rely on the abstraction mechanism to prevent cycles. This is a do-over of #974 that should be closer in spirit to the implementation of the paper and without the associated regressions. Fixes #964
The following file produces a stack overflow. Note that I don't know if it is provable or not, this is a reduced example.
bug.txt
The text was updated successfully, but these errors were encountered: