petr4

Petr4: Formal Semantics for the P4 Programming Language
README

The Petr4 project is developing the formal semantics of the P4
Language
, backed by an independent referene
implementation.

Getting Started

Installing Petr4

The Petr4 reference implementation is implemented in OCaml. To install
from source, perform the following steps.

  1. Install OPAM

  2. Install external dependencies:

    sudo apt-get install m4 libgmp-dev
    
  3. Check the installed version of OCaml:

    ocamlc -v
    

    If the version is less than 4.06.0, upgrade:

    opam switch 4.06.0
    
  4. Use OPAM to build and install Petr4. This will take a while the first time
    because it installs OPAM dependencies.

    opam pin add petr4 .
    

Running Petr4

Currently petr4 is merely a P4 front-end. By default, it will parse
a source program to an abstract syntax tree and print it out, either
as P4 or encoded into JSON.

Run petr4 -help to see the list of currently-supported options.

Contributing

Petr4 is an open-source project. We encourage contributions!
Please file issues on
Github

Credits

See the list of contributors.

License

Petr4 is released under the Apache2 License.

Install
Sources
0.1.1.tar.gz
md5=1c4332e8493311069a9dff8b11a5c7b2
sha512=d5329c1bf84c2ee608a92fb9d950dbb89dbd724b4387831a3b39296ac46870cbc42f747248144c8d93f2a855339bbc2876c11952d74200c404880c1656ca8bd8
Dependencies
Reverse Dependencies