verified-network-toolchain / petr4

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

P4cub S-expressions #376

Closed zachary-kent closed 1 year ago

zachary-kent commented 1 year ago

Implements s-expression serialization for P4cub similar to how ppx_sexp_conv would--let me know if you have any comments about the grammar. In the future, it might be useful to add a parser for deserialization. If we did this, we could use qcheck to generate random tests asserting serialization and deserialization is an involution.