verified-network-toolchain / petr4

Petr4: Formal Semantics for P4
Apache License 2.0
74 stars 20 forks source link

invalid types of arguments for methods, parsers, controls, actions, tables #368

Open pataei opened 1 year ago

pataei commented 1 year ago

In control type well-formedness rule: P4 spec states that "The types parser, control, and package cannot be used as types of arguments for methods, parsers, controls, tables, actions. They can be used as types for the arguments passed to constructors." Petr4's implementation doesn't take this into account. We should check this when declaring a method, parser, control, table, or action. p4 spec ref