verified-network-toolchain / petr4

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

Adding P4's abstract syntax to formalization doc #363

Closed pataei closed 1 year ago

pataei commented 1 year ago

@hackedy and @jnfoster can you please review the formalization of P4's abstract syntax (section 4)?

Keep in mind that there are some small differences between our formalization and P4 spec. I enumerate them here (by "we" refers to Petr4's implementation and the document formalization, "P4" refers to P4 spec):

  1. We don't include annotations.
  2. We don't have match-kind and bit in our data types, however, we have match-kind in the type of expressions.
  3. We don't have the unary +.

In general, P4 spec tries to do some of the type checking through its grammar and we have a more general grammar.

pataei commented 1 year ago

@jnfoster @hackedy section 5.1 (type well-formedness) is ready to review.

Changes applied in the commit 4a14625:

Issue the following:

pataei commented 1 year ago

Todos after this merge for the next one:

hackedy commented 1 year ago

🎊 🎊 πŸͺ‚