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

Support for Comparisons on Numbers in C++ Implementation of Auth Logic #637

Closed
aferr opened this issue Aug 8, 2022 · 3 comments
Closed

Comments

@aferr
Copy link
Collaborator

aferr commented Aug 8, 2022

This was implemented for the rust version in #427 so this can follow that PR

@harsha-mandadi
Copy link
Collaborator

harsha-mandadi commented Aug 12, 2022

Andrew, we support comparison on Numbers in C++ but organized in a different way. We convert all the Rvalues to be either flatFacts or Predicates. Some tests for reference:

@aferr
Copy link
Collaborator Author

aferr commented Aug 15, 2022

OK I guess when constructing the ast, rather than making a separate AST node for RValue, you make a BaseFact where the name of the predicate is the operator here.

This might work OK for now, but eventually I think it's better to have a separate AST node for RValues since this way we are throwing away the information that this is a numeric comparison rather than a regular predicate. This might make the universe relation translation code slightly more awkward in one spot namely here, but I think we can work around it.

@aferr
Copy link
Collaborator Author

aferr commented Aug 19, 2022

OK this issue was actually fixed by @harsha-mandadi a while ago. Sorry about that. My mistake.

A separate issue tracks the minor point: #672

@aferr aferr closed this as completed Aug 19, 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

2 participants