P4C
The P4 Compiler
 
Loading...
Searching...
No Matches
P4Tools::P4Testgen::VariableSubstitution Class Reference
Inheritance diagram for P4Tools::P4Testgen::VariableSubstitution:

Public Member Functions

 VariableSubstitution (const IR::PathExpression *var, const IR::Node *expr)
 
const IR::Node * postorder (IR::PathExpression *pathExpr) override
 

Detailed Description

This isn't a full-fledged capture-avoiding substitution, but should be good enough for our needs. In particular, since the variables being substituted are freshly/uniquely generated, we shouldn't have to worry about variable capture, and our continuations are created in a way that we shouldn't have to worry about accidentally replacing lvalues.