-
Notifications
You must be signed in to change notification settings - Fork 17
Make P4-Constraints Typechecker Idempotent #167
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
base: master
Are you sure you want to change the base?
Changes from all commits
8876cd1
4d2d1e8
5f44e3d
67714ba
1774fdb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIUC, changing i.e. I think that the test is currently passing because the function returns I got the test to fail (In this case return
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This really depends on whether nested type casts should be allowed. If it should not be allowed, then we can add an additional check after getting the inner expression to raise any corresponding errors: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be misunderstanding this, but in the case of casting
bit<W>(kFixedUnsigned) toexact<W> | ternary<W> | lpm<W> | range<W> | optional<W>, do we need to check that the bit widths match?e.g. in
StrictlyAboveInCastabilityOrder:Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's a great point. I now added additional
TypeBitwidthchecks during case 2 return