Skip to content
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

Extend generic printer API with auxiliary information #455

Merged
merged 2 commits into from
Jan 25, 2024

Conversation

jschneider-bensch
Copy link
Collaborator

This PR allows passing in auxiliary information on creation of a print object. This is useful if a generic-printer-based backend requires some information to be collected before doing a certain print pass on the AST, e.g. in the ProVerif backend I want to first scan the AST for function definitions so that I can recognize them during printing at the call-site.

I can imagine other uses as well, e.g. we might not need to insert a full preamble of pre-defined models every time, but only those that are really necessary to model the contents of the AST. Being able to go through the AST once, collecting this information and making it available on later print passes that construct the preamble is a simple solution here as well.

Copy link
Collaborator

@W95Psp W95Psp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, that looks good to me, thank you! :)

@W95Psp W95Psp enabled auto-merge January 25, 2024 07:40
@W95Psp W95Psp added this pull request to the merge queue Jan 25, 2024
Merged via the queue into main with commit dc4a9db Jan 25, 2024
10 checks passed
@W95Psp W95Psp deleted the jonas/generic-printer-aux branch January 25, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants