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

SuperP4: Handling cases where variables are of the same name as built in functions #174

Open
kaarthikalagappan opened this issue May 3, 2022 · 0 comments

Comments

@kaarthikalagappan
Copy link
Contributor

There can exist a case where a built in header function's values can be controlled by a manually defined variable of same name. Right now ignoring the variable declaration (not adding it to the symbol table, so only the default function of the same name exists). Need to check the correlation between the defined variable and the default function of the same name.

Latest commit in branch: 0fde6f5

Example (issue1717.p4 in p4c test suite):

header H {
    bit<32> isValid;
}

header H1 {
    bit<16> f;
    bit<8> minSizeInBytes;
    bit<8> minSizeInBits;
    T f1;
    E e;
}

isValid() is a built in function of headers, similar for minSizeInBytes and minSizeInBits

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

No branches or pull requests

1 participant