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

Add a p4-constraints and @refers_to parser to P4Tools. #3568

Merged
merged 33 commits into from
Nov 10, 2022
Merged

Add a p4-constraints and @refers_to parser to P4Tools. #3568

merged 33 commits into from
Nov 10, 2022

Conversation

OleksandrLetychevskyiIntel
Copy link
Contributor

@OleksandrLetychevskyiIntel OleksandrLetychevskyiIntel commented Oct 12, 2022

This is the implementation of p4-constraints for P4Tools , it allows you to convert the expression in string format from the body of the @entry_restriction or @refers_to annotation into an IR expression and compose the restrictions for the tool from them.
These restrictions are added as preconditions to the P4Tools BMv2 execution.

[no-jira]
@fruffy fruffy changed the title Converting constraints from a string to IR expressions Add a p4-constraints parser to P4Tools. Oct 19, 2022
@fruffy fruffy changed the title Add a p4-constraints parser to P4Tools. Add a p4-constraints and @refers_to parser to P4Tools. Oct 19, 2022
@fruffy
Copy link
Collaborator

fruffy commented Oct 20, 2022

I will run this code tomorrow to see whether it is complete. Can you refresh it?

@fruffy
Copy link
Collaborator

fruffy commented Oct 24, 2022

I tried to clean up some of the code but there is lots of work left. This code has a lot of problems. I attached a patch, please apply it.

p4_asserts_parser.patch.txt

@fruffy
Copy link
Collaborator

fruffy commented Oct 27, 2022

I went through the code again, there are still items left to do. I made some comments.

Here is a new patch that should be applied.

p4_asserts_parser.patch.txt

@fruffy
Copy link
Collaborator

fruffy commented Oct 28, 2022

Another patch.
p4_asserts_parser.patch.txt

@fruffy
Copy link
Collaborator

fruffy commented Nov 3, 2022

Another patch set to apply.
p4_asserts_parser.patch.txt

[no-jira]
@fruffy
Copy link
Collaborator

fruffy commented Nov 8, 2022

Can you update this to the latest changes in master? We should run the gtests to check before merging.

@fruffy fruffy merged commit c59597f into p4lang:main Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants