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

Visitor For Authorization Logic AST #345

Closed
aferr opened this issue Feb 9, 2022 · 4 comments
Closed

Visitor For Authorization Logic AST #345

aferr opened this issue Feb 9, 2022 · 4 comments

Comments

@aferr
Copy link
Collaborator

aferr commented Feb 9, 2022

Create a conventional visitor pattern for the authorization logic AST which is here

@aferr
Copy link
Collaborator Author

aferr commented Feb 10, 2022

@bgogul meant to CC you that this exists

@bgogul
Copy link
Collaborator

bgogul commented Mar 15, 2022

@harsha-mandadi FYI.

@aferr
Copy link
Collaborator Author

aferr commented Apr 25, 2022

This issue is meant to track the implementation of a visitor that runs on the (already constructed objects) ast.h. (This is not meant to track implementing a visitor for constructing the objects in ast.h). A visitor would simplify some of the code that runs on the AST. The visitor pattern really shines for compiler passes where the order of the traversal does not matter much, or only a small part of the AST is relevant. For example, this is helpful for something like: "implement a function that gets the set of predicates with type number that are subexpressions of AstAssertion". (For parts of the compiler where we need to spell out the order of the AST traversal the visitor might not help as much).

There are some good uses for this in the authorization logic implementation now such as the functionality for populating type environments here: (

// TODO(#416): these functions should be refactored into a visitor. These are probably
).

These issues are related:

@aferr
Copy link
Collaborator Author

aferr commented Aug 25, 2022

This was fixed in #643

@aferr aferr closed this as completed Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants