🛰️ Daily AI Frontier
‹ back to 2026-07-26

From Resource Flow to Executable Tests: Petri-Net-Guided LLM Test Generation for Concurrent Stateful Rust APIs

arXiv cs.SE AI Software Testing Kaiwen Zhang, Guanjun Liu 2026-07-23

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.

view merged work →