Do you know about a p4lang _interpreter_ somewhere hanging around?

If you do create a P4 interpreter, I would recommend creating a new post on this forum announcing it. That would help make it known to a wider audience.

no i shouldnt nor wouldnt and wont and even wont try to do so…

Sorry I haven’t gone through the whole threads, but based on your requirements in the first few posts, 2 projects came to mind that might be helpful to your use case:

  1. GitHub - oxidecomputer/p4: A P4 compiler
    • This is a P4 compiler written in Rust and compiles P4 to runnable Rust code. One of its goal is to “execute P4 pipeline logic anywhere Rust can execute”.
  2. GitHub - verified-network-toolchain/petr4: Petr4: Formal Semantics for P4
    • As part of this project, there is a web user interface where you can just paste P4 code in and see it run. Below is a figure from the Petr4 paper showing this web interface at work. It seems the link doesn’t work now, but you can easily start a web server locally.

okk… i c the packets but i assemble them for 30-40 year now in 10-15 languages of my preference… and on a white on black 80x25 terminal… sooo…

fast forward the main question, where is the counter that increments per p4 source code line in realtime as the packets floods through the program, while the control plane programs it 0-24 aaand the user have the change to place at least a terminating ; in realtime?!?!?!?!

not to mention a full new if () {asdfasdfsdafsdafdsafjsdafkdsajffsda
ASdfasdfDASFDAS
F
ASDF
DSA
FDAS
F
SDAF
SDA
}

a stuff like thiss, but for the p4 program: display

imho what u tried 2 sell me is a rusty interpreter that compiles to cpu of your choice and not easily fits to my java shitload…

but if u have a rust 2 java transpiler hanging around then im more than happy to reuse the output of thattt…

but be warned, my spaghetty do 4k ebgp peers , each with 1m prefix in out (the default free zone if that rings a bell) and its just a sync{} trick here and there to do that… not that rusty and almost looks like as c or p4 so not too hard to learn and maintain the skillset on a new language or copy-paste it to the physical p4 interpreter, the tofino2 asic itself: h**ps://bitbucket.software.geant.org/projects/RARE/repos/rare/browse… :))))

thx in advance…