From Resource Flow to Executable Tests: Petri-Net-Guided LLM Test Generation for Concurrent Stateful Rust APIs
Merged summary
TL;DR - This paper proposes using Petri nets to constrain LLM generation of executable tests for concurrent, stateful Rust APIs. It aims to combine formal scenario design with low-cost code synthesis while preserving API legality and meaningful concurrency.
- Models resources, lifecycle states, and causal dependencies as colored tokens and transitions.
- Generates deep-state, near-legal, and partially ordered concurrent test scenarios.
- Uses a local-faithfulness contract and structural repair loop to retain modeled intent in synthesized Rust code.
- Separates synthesis failures from possible API behavior violations through a layered semantic oracle.
Sources (1)
From Resource Flow to Executable Tests: Petri-Net-Guided LLM Test Generation for Concurrent Stateful Rust APIs
TL;DR - This paper proposes using Petri nets to constrain LLM generation of executable tests for concurrent, stateful Rust APIs. It aims to combine formal scenario design with low-cost code synthesis while preserving API legality and meaningful concurrency.
- Models resources, lifecycle states, and causal dependencies as colored tokens and transitions.
- Generates deep-state, near-legal, and partially ordered concurrent test scenarios.
- Uses a local-faithfulness contract and structural repair loop to retain modeled intent in synthesized Rust code.
- Separates synthesis failures from possible API behavior violations through a layered semantic oracle.