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

[P4Testgen] Reduce overtainting by short-circuiting some expressions and extern invocations #4030

Merged
merged 1 commit into from
Jun 15, 2023

Conversation

fruffy-bfn
Copy link
Contributor

@fruffy-bfn fruffy-bfn commented Jun 15, 2023

Sometimes we can overtaint because an expression that technically short-circuits is treated as taint. Implement an optimization for this behavior in the taint checker. Also try to eliminate sources of taint in some externs by exiting early (verify and update checksum).

Fixes #3887.

@fruffy fruffy added the p4tools Topics related to the P4Tools back end label Jun 15, 2023
@fruffy fruffy changed the title Reduce overtainting by short-circuiting some expressions and extern invocations [P4Testgen] Reduce overtainting by short-circuiting some expressions and extern invocations Jun 15, 2023
Copy link
Contributor

@jnfoster jnfoster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@fruffy fruffy merged commit df6c77d into p4lang:main Jun 15, 2023
@fruffy-bfn fruffy-bfn deleted the fruffy/reduce_taint branch June 19, 2023 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p4tools Topics related to the P4Tools back end
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Testgen taint analysis overtaints in some cases
3 participants