-
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
Wrong model printing for arrays #555
Comments
This comment was marked as outdated.
This comment was marked as outdated.
Rather, a model would be any assignment where:
|
The model is not wrong. It's printing is wrong. Since
A default value with const, plus a set of bindings with stores. |
Halbaroth
changed the title
Wrong model generated for arrays
Wrong model printing for arrays
Apr 2, 2023
bclement-ocp
added a commit
to bclement-ocp/alt-ergo
that referenced
this issue
Jun 16, 2023
This patch adds the support for printing arrays in the models output. Rather than printing default values, we print smtlib abstract values (@xxx) for the unknown elements, because we don't have a default value available easily otherwise. The example model in OCamlPro#555 now displays as: ```smtlib2 ( (define-fun x () Int 0) (define-fun y () Int 0) (define-fun a1 () (Array Int Int) (store (as @A1 (Array Int Int)) 0 0)) ) ``` This also removes the "Functions" / "Constants" / "Arrays" sections because they were now wrong (some arrays were in constants, other in arrays) and hence somewhat confusing. Instead, the "values" section is added then printing with `--model-type constraints`. Uses of Printer.print_fmt have also been replaced with Format.fprintf because they were causing weird looking outputs with some combinations of options. Only the final value is printer with `print_fmt`, which should do the appropriate (actually, I don't think it is needed here, but better safe than sorry) cleanup dance only once. Fixes OCamlPro#555
bclement-ocp
added a commit
to bclement-ocp/alt-ergo
that referenced
this issue
Jun 27, 2023
This patch adds the support for printing arrays in the models output. Rather than printing default values, we print smtlib abstract values (@xxx) for the unknown elements, because we don't have a default value available easily otherwise. The example model in OCamlPro#555 now displays as: ```smtlib2 ( (define-fun x () Int 0) (define-fun y () Int 0) (define-fun a1 () (Array Int Int) (store (as @A1 (Array Int Int)) 0 0)) ) ``` This also removes the "Functions" / "Constants" / "Arrays" sections because they were now wrong (some arrays were in constants, other in arrays) and hence somewhat confusing. Instead, the "values" section is added then printing with `--model-type constraints`. Uses of Printer.print_fmt have also been replaced with Format.fprintf because they were causing weird looking outputs with some combinations of options. Only the final value is printer with `print_fmt`, which should do the appropriate (actually, I don't think it is needed here, but better safe than sorry) cleanup dance only once. Fixes OCamlPro#555
bclement-ocp
added a commit
to bclement-ocp/alt-ergo
that referenced
this issue
Jun 27, 2023
This patch adds the support for printing arrays in the models output. Rather than printing default values, we print smtlib abstract values (@xxx) for the unknown elements, because we don't have a default value available easily otherwise. The example model in OCamlPro#555 now displays as: ```smtlib2 ( (define-fun x () Int 0) (define-fun y () Int 0) (define-fun a1 () (Array Int Int) (store (as @A1 (Array Int Int)) 0 0)) ) ``` This also removes the "Functions" / "Constants" / "Arrays" sections because they were now wrong (some arrays were in constants, other in arrays) and hence somewhat confusing. Instead, the "values" section is added then printing with `--model-type constraints`. Uses of Printer.print_fmt have also been replaced with Format.fprintf because they were causing weird looking outputs with some combinations of options. Only the final value is printer with `print_fmt`, which should do the appropriate (actually, I don't think it is needed here, but better safe than sorry) cleanup dance only once. Fixes OCamlPro#555
bclement-ocp
added a commit
to bclement-ocp/alt-ergo
that referenced
this issue
Jun 29, 2023
This patch adds the support for printing arrays in the models output. Rather than printing default values, we print smtlib abstract values (@xxx) for the unknown elements, because we don't have a default value available easily otherwise. The example model in OCamlPro#555 now displays as: ```smtlib2 ( (define-fun x () Int 0) (define-fun y () Int 0) (define-fun a1 () (Array Int Int) (store (as @A1 (Array Int Int)) 0 0)) ) ``` This also removes the "Functions" / "Constants" / "Arrays" sections because they were now wrong (some arrays were in constants, other in arrays) and hence somewhat confusing. Instead, the "values" section is added then printing with `--model-type constraints`. Uses of Printer.print_fmt have also been replaced with Format.fprintf because they were causing weird looking outputs with some combinations of options. Only the final value is printer with `print_fmt`, which should do the appropriate (actually, I don't think it is needed here, but better safe than sorry) cleanup dance only once. Fixes OCamlPro#555
bclement-ocp
added a commit
that referenced
this issue
Jun 29, 2023
This patch adds the support for printing arrays in the models output. Rather than printing default values, we print smtlib abstract values (@xxx) for the unknown elements, because we don't have a default value available easily otherwise. The example model in #555 now displays as: ```smtlib2 ( (define-fun x () Int 0) (define-fun y () Int 0) (define-fun a1 () (Array Int Int) (store (as @A1 (Array Int Int)) 0 0)) ) ``` This also removes the "Functions" / "Constants" / "Arrays" sections because they were now wrong (some arrays were in constants, other in arrays) and hence somewhat confusing. Instead, the "values" section is added then printing with `--model-type constraints`. Uses of Printer.print_fmt have also been replaced with Format.fprintf because they were causing weird looking outputs with some combinations of options. Only the final value is printer with `print_fmt`, which should do the appropriate (actually, I don't think it is needed here, but better safe than sorry) cleanup dance only once. Fixes #555
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Alt-Ergo (next - 963e40c) doesn't print correctly the model for the following input file:
The actual model:
The text was updated successfully, but these errors were encountered: