-
Notifications
You must be signed in to change notification settings - Fork 17
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
Smtlib Printer #211
Open
Gbury
wants to merge
37
commits into
master
Choose a base branch
from
print
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Smtlib Printer #211
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Apr 29, 2024
Open
This function:
which is at the top of every Alt-Ergo file generated by Why3 does not seem to translate with $ dolmen match_bool.ae -o psmt2
(set-logic QF_UF)
(declare-fun match_bool (par (Error Uncaught exception:
Failure("cannot find binding for id")
Raised at Stdlib.failwith in file "stdlib.ml", line 29, characters 17-33
Called from Dolmen_smtlib2_poly__Print.Make.ty_var in file "src/languages/smtlib2/poly/print.ml", line 299, characters 15-36
Called from Stdlib__Format.output_acc in file "format.ml", line 1307, characters 32-48
Called from Stdlib__Format.output_acc in file "format.ml", line 1295, characters 4-20
Called from Stdlib__Format.output_acc in file "format.ml", line 1307, characters 32-48
Called from Stdlib__Format.output_acc in file "format.ml", line 1308, characters 32-48
Called from Stdlib__Format.output_acc in file "format.ml", line 1307, characters 32-48
Called from Stdlib__Format.output_acc in file "format.ml", line 1295, characters 4-20
Called from Stdlib__Format.output_acc in file "format.ml", line 1308, characters 32-48
Called from Stdlib__Format.output_acc in file "format.ml", line 1305, characters 32-48
Called from Stdlib__Format.output_acc in file "format.ml", line 1295, characters 4-20
Called from Stdlib__Format.kfprintf.(fun) in file "format.ml", line 1356, characters 16-34
Called from Stdlib__Format.output_acc in file "format.ml", line 1295, characters 4-20
Called from Stdlib__Format.kfprintf.(fun) in file "format.ml", line 1356, characters 16-34
Called from Dolmen_loop__Export.Smtlib2.pp_stmt in file "src/loop/export.ml", line 244, characters 4-40
Called from Stdlib__List.fold_left in file "list.ml", line 121, characters 24-34
Called from Stdlib__List.fold_left in file "list.ml", line 121, characters 24-34
Called from Dolmen_loop__Export.Make.export in file "src/loop/export.ml", line 605, characters 16-44
Called from Dolmen_loop__Pipeline.Make.eval_op in file "src/loop/pipeline.ml", line 87, characters 8-17 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Finally it is here !
This PR adds a printer for smtlib2.6 to
dolmen
. The goal of the printer is to take arbitrary typed expressions, and print them in a way that respects the smtlib syntax.The fact that it is designed to take arbitrary expressions explain part of why it is complex: great care must be taken to make sure that identifiers respect the syntax convention (i.e. which characters are allowed), are not shadowed, etc... Additionally, in typical dolmen fashion, the printers are functorized so that they can be more easily re-used by other projects who'd wish to print their own typed terms in smtlib format.
For quick tests:
will parse and type the contents of
input_file.smt2
and then print them inoutput_file.smt2
. Alternatively, one can also doto have the output printed on the standard output.
Note: this is still a work in progress (not all builtins are yet printed, and some features related to avoiding shadowing are not yet implemented), and slightly experimental (no large scale testing has been done yet).