Encapsulates a set of extern method implementations. More...
Public Types | |
| using | ImplList = std::list<std::tuple<cstring, std::vector<cstring>, MethodImpl>> |
| using | MethodImpl |
Public Member Functions | |
| ExternMethodImpls (const ImplList &implList) | |
| bool | exec (const IR::MethodCallExpression *call, const IR::Expression *receiver, IR::ID &name, const IR::Vector< IR::Argument > *args, const ExecutionState &state, SmallStepEvaluator::Result &result) const |
Encapsulates a set of extern method implementations.
| using P4Tools::P4Testgen::ExternMethodImpls::ImplList = std::list<std::tuple<cstring, std::vector<cstring>, MethodImpl>> |
Represents a list of extern method implementations. The components of each element in this list are as follows:
The type of an extern-method implementation. See exec for an explanation of the arguments.
| bool P4Tools::P4Testgen::ExternMethodImpls::exec | ( | const IR::MethodCallExpression * | call, |
| const IR::Expression * | receiver, | ||
| IR::ID & | name, | ||
| const IR::Vector< IR::Argument > * | args, | ||
| const ExecutionState & | state, | ||
| SmallStepEvaluator::Result & | result ) const |
Evaluates a call to an extern method. Upon return, the given result will be augmented with the successor states resulting from evaluating the call.
| call | the original method call expression, can be used for stepInto calls. |
| receiver | a symbolic value representing the object on which the method is being called. |
| name | the name of the method being called. |
| args | the list of arguments being passed to method. |
| state | the state in which the call is being made, with the call at the top of the current continuation body. |
A BUG occurs if the receiver is not an extern or if the call is ambiguous.