Automated Verification of Parametric Channel-Based Process Communication

Georgian-Vlad Saioc*, Julien Lange*, Anders Møller

*Corresponding author for this work

Research output: Contribution to book/anthology/report/proceedingArticle in proceedingsResearchpeer-review

Abstract

A challenge of writing concurrent message passing programs is ensuring the absence of partial deadlocks, which can cause severe memory leaks in long running systems. Several static analysis techniques have been proposed for automatically detecting partial deadlocks in Go programs. For a large enterprise code base, we found these tools too imprecise to reason about process communication that is parametric, i.e., where the number of channel communication operations or the channel capacities are determined at runtime.
We present a novel approach to automatically verify the absence of partial deadlocks in Go program fragments with such parametric process communication. The key idea is to translate Go fragments to a core language that is sufficiently expressive to represent real-world parametric communication patterns and can be encoded into Dafny programs annotated with postconditions enforcing partial deadlock freedom. In situations where a fragment is partial deadlock free only when the concurrency parameters satisfy certain conditions, a suitable precondition can often be inferred.
Experimental results on a real-world code base containing 583 program fragments that are beyond the reach of existing techniques have shown that the approach can verify the absence of partial deadlocks in 145 cases. For an additional 228 cases, a nontrivial precondition is inferred that the surrounding code must satisfy to ensure partial deadlock freedom.
Original languageEnglish
Title of host publicationProceedings of the ACM on Programming Languages
Number of pages27
Volume8
Publication date8 Oct 2024
Pages2070-2096
Article number344
DOIs
Publication statusPublished - 8 Oct 2024
SeriesProceedings of the ACM on Programming Languages
NumberOOPSLA2
Volume8
ISSN2475-1421

Keywords

  • Go
  • message passing concurrency
  • partial deadlocks
  • static analysis
  • automated verification
  • invariant discovery

Fingerprint

Dive into the research topics of 'Automated Verification of Parametric Channel-Based Process Communication'. Together they form a unique fingerprint.

Cite this