Skip to main content
QUICK REVIEW

[Paper Review] Checking Refinement of Asynchronous Programs Against Context-Free Specifications

Pascal Baumann, Moses Ganardi|arXiv (Cornell University)|Jan 1, 2023
Formal Methods in VerificationComputer Science2 citations
TL;DR

This paper presents an EXPSPACE-complete algorithm for verifying refinement of asynchronous programs against Dyck language specifications, leveraging a novel downward closure construction over a non-well-quasi-ordering to replace context-free task languages with regular ones, followed by reduction to vector addition systems with states. The approach enables automated verification of reference counting and barrier synchronization patterns in concurrent systems with precise complexity bounds.

ABSTRACT

In the language-theoretic approach to refinement verification, we check that the language of traces of an implementation all belong to the language of a specification. We consider the refinement verification problem for asynchronous programs against specifications given by a Dyck language. We show that this problem is EXPSPACE-complete - the same complexity as that of language emptiness and for refinement verification against a regular specification. Our algorithm uses several technical ingredients. First, we show that checking if the coverability language of a succinctly described vector addition system with states (VASS) is contained in a Dyck language is EXPSPACE-complete. Second, in the more technical part of the proof, we define an ordering on words and show a downward closure construction that allows replacing the (context-free) language of each task in an asynchronous program by a regular language. Unlike downward closure operations usually considered in infinite-state verification, our ordering is not a well-quasi-ordering, and we have to construct the regular language ab initio. Once the tasks can be replaced, we show a reduction to an appropriate VASS and use our first ingredient. In addition to the inherent theoretical interest, refinement verification with Dyck specifications captures common practical resource usage patterns based on reference counting, for which few algorithmic techniques were known.

Motivation & Objective

  • To address the challenge of verifying refinement of asynchronous programs against context-free specifications, particularly Dyck languages modeling reference counting and barrier synchronization.
  • To close the gap in algorithmic techniques for verifying resource usage patterns in concurrent systems that rely on balanced parentheses-like structures.
  • To establish the complexity of refinement checking against Dyck languages, showing it is EXPSPACE-complete—matching the complexity of regular specification inclusion.
  • To develop a new downward closure construction that works over a non-well-quasi-ordering, enabling replacement of context-free task languages with regular ones for verification.

Proposed method

  • Introduce a novel ordering on words that is not a well-quasi-ordering, enabling a custom downward closure construction for context-free languages in asynchronous programs.
  • Construct a regular language representation for each task’s trace language by ab initio construction, rather than relying on standard downward closure operations.
  • Use a succinctly described vector addition system with states (VASS) to model the global behavior of the asynchronous program after regular abstraction of task languages.
  • Reduce the refinement problem to the problem of checking whether the coverability language of a VASS is contained in a Dyck language, which is shown to be EXPSPACE-complete.
  • Leverage tame-pumping and offset/dip tracking via finite-state transducers to simulate derivation trees and preserve structural invariants during abstraction.
  • Design a deterministic, singly succinct finite-state automaton (dsNFA) that guesses skeleton runs of transducers and verifies offset and dip invariants across separators # and ¯#.

Experimental results

Research questions

  • RQ1Is refinement verification of asynchronous programs against Dyck language specifications decidable, and what is its computational complexity?
  • RQ2Can a downward closure construction be developed for context-free languages when the underlying ordering is not a well-quasi-ordering?
  • RQ3Can the trace languages of individual tasks in an asynchronous program be effectively replaced by regular languages while preserving refinement semantics?
  • RQ4Does the complexity of refinement checking increase when moving from regular to Dyck language specifications, given that both are EXPSPACE-complete?
  • RQ5Can the proposed method be applied to practical concurrency patterns such as reference counting and barrier synchronization?

Key findings

  • The problem of checking refinement of asynchronous programs against Dyck language specifications is EXPSPACE-complete, matching the complexity of language emptiness and regular specification inclusion.
  • A novel downward closure construction is developed that works over a non-well-quasi-ordering, enabling effective regular abstraction of context-free task languages.
  • The offset and dip of words in derivation trees are bounded by a polynomial in the size of the grammar, enabling finite-state tracking of structural invariants.
  • The construction of a dsNFA to recognize the regular abstraction of the program’s trace language requires only exponential space in the size of the input grammar, matching the complexity upper bound.
  • The reduction to VASS coverability language inclusion is sound and complete, and the VASS-based inclusion problem is shown to be EXPSPACE-complete.
  • The method enables automated verification of common resource management patterns such as reference counting, which were previously difficult to verify without manual invariants.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.