Using Petri nets as a formal language for LLM-assisted development
1 points
1 hour ago
| 1 comment
| github.com
| HN
orksliver
1 hour ago
[-]
I've been experimenting with Petri nets as a shared representation between humans and LLMs. The model becomes the artifact—you sketch topology, validate with simulation, extend monotonically. Code is derived.

Why Petri nets? Visual (humans can reason about them), mathematical (ODEs, invariants), executable, and compositional. LLMs can manipulate the structure without losing semantic meaning.

reply
orksliver
58 minutes ago
[-]
What this actually do?:

You define a Petri net, simulate it with ODEs, and the structure becomes a scaffold for LLM-generated code. The net is the spec that both humans and LLMs can reason about.

I use Claude Code with a skill file that enforces: sketch topology → validate with simulation → extend monotonically → never delete, only grow. The discipline works with how LLMs operate.

reply