PofoliaShared via Pofolia

ACM Transactions on Autonomous and Adaptive Systems· 2026Q2

Petri Nets-based Methods on Automatically Detecting for Concurrency Bugs in Rust Programs

Kaiwen Zhang, Guanjun Liu

Short summary

A novel Petri net-based method automatically detects concurrency bugs in Rust programs by modeling synchronization primitives and resource lifecycles, achieving 35.7% fewer false positives and 28.3% fewer false negatives than LockBud.

AI-generated from the title and abstract; the full text is not read.

Key points

  • Presents a Petri net-based method for detecting Rust concurrency bugs using compiler-derived MIR.
  • Models Rust synchronization primitives and ownership-relevant resource lifecycles within Petri nets.
  • Achieves 35.7% reduction in false positives and 28.3% reduction in false negatives compared to LockBud.
  • Offers faster performance than dynamic analysis tool Miri on several benchmark cases.

AI-generated from the title and abstract; the full text is not read.

Abstract

Rust's memory safety guarantees, notably ownership and lifetime systems, have driven its widespread adoption. Concurrency bugs still occur in Rust programs, and existing detection approaches exhibit significant limitations: static analyzers suffer from context insensitivity and high false positives, while dynamic methods incur prohibitive runtime costs due to exponential path exploration. This paper presents a Petri net-based method for detecting Rust concurrency bugs from Rust's compiler-derived Mid-level Intermediate Representation (MIR), restricted to the concurrency-relevant operations needed by the target bug classes. The method rests on three pillars: (1) A syntax-directed program-to-Petri-net transformation tailored for target bug classes; (2) Witness-preserving state compression via context-aware slicing; (3) Bug detection through efficient Petri net reachability analysis. The core innovation is its control-flow-driven modeling of Rust synchronization primitives and ownership-relevant resource lifecycles within the Petri net structure, with concurrency-relevant operations represented as token movements. Integrated pointer analysis automates alias identification during transformation. Experiments on Rust concurrency benchmarks show that the proposed analysis improves over LockBud in precision and over Miri in path coverage or runtime on the evaluated cases. Compared to LockBud, our approach reduces false positives by 35.7% and false negatives by 28.3% through flow-sensitive alias-aware resource binding. Compared with Miri, which is a dynamic analysis tool, our reachability-based method avoids repeated schedule execution and is substantially faster on several benchmark cases.

The authors' abstract, as published at the source. ACM Transactions on Autonomous and Adaptive Systems, 2026 · DOI ↗

TakeawaysPremium
Ask the paperFree account

Continue with a free account

Ask the paper: 3 free questions a day about this paper; save it, get its citation, new summaries every day for your field. Takeaways are Premium.

Continue free on the web

Sign in with Google or Apple; no card needed. You come back to this paper.

On your phone:

Field: Software

SoftwareComputer Science