Skip to main content
QUICK REVIEW

[Paper Review] Towards deductive verification of MPI programs against session types

Eduardo R. B. Marques, Francisco Martins|Dec 10, 2013
Distributed systems and fault toleranceComputer Science15 references9 citations
TL;DR

This paper presents a framework for deductive verification of MPI programs using session types, translating protocol specifications into VCC-verified C annotations. It enables formal verification of communication correctness—especially deadlock freedom—by integrating session type contracts into C code via a software verifier, achieving low manual annotation overhead (under 5% of code size) in non-trivial MPI examples.

ABSTRACT

The Message Passing Interface (MPI) is the de facto standard message-passing infrastructure for developing parallel applications. Two decades after the first version of the library specification, MPI-based applications are nowadays routinely deployed on super and cluster computers. These applications, written in C or Fortran, exhibit intricate message passing behaviours, making it hard to statically verify important properties such as the absence of deadlocks. Our work builds on session types, a theory for describing protocols that provides for correct-by-construction guarantees in this regard. We annotate MPI primitives and C code with session type contracts, written in the language of a software verifier for C. Annotated code is then checked for correctness with the software verifier. We present preliminary results and discuss the challenges that lie ahead for verifying realistic MPI program compliance against session types.

Motivation & Objective

  • To address the challenge of verifying complex MPI programs for communication correctness, especially deadlock freedom.
  • To provide a constructive, formal method for ensuring that MPI programs follow predefined communication protocols.
  • To reduce reliance on model checking or dynamic analysis by enabling deductive verification with static verification tools.
  • To integrate session types with MPI's collective operations and non-blocking calls through a verified C interface.
  • To minimize manual annotation effort by enabling automatic generation of certain annotations, particularly for loops and choices.

Proposed method

  • Define a communication type language that extends session types with collective operations, choices, and dependent function types to model MPI-specific behaviors.
  • Translate global session type protocols into VCC-compatible terms, representing communication contracts as data types and axioms.
  • Annotate MPI C code with VCC requires/ensures predicates and function contracts to enforce protocol compliance.
  • Use the VCC verifier to check that each function's communication behavior adheres to its specified session type.
  • Develop an Eclipse plugin to automate type checking and VCC term generation for communication types.
  • Extend the framework to support non-blocking MPI operations and improve type expressiveness with first-class dependent types and for-each constructs.

Experimental results

Research questions

  • RQ1Can session types be effectively extended to model MPI's collective operations and non-blocking communication patterns?
  • RQ2To what extent can communication protocol annotations be automatically generated in C+MPI programs?
  • RQ3How does the manual annotation overhead of this verification approach compare to existing model-checking or dynamic analysis techniques?
  • RQ4Can the communication type system express dependencies between communication steps based on prior message values?
  • RQ5How scalable is the verification process for realistic MPI applications with complex control flow and communication patterns?

Key findings

  • The framework successfully verified four non-trivial MPI programs (260–430 lines of code) with minimal manual annotation, consistently under 5% of total code size.
  • The average number of manual annotations per 100 lines of C code was below 5, with function-level pre- and post-conditions requiring the majority of hand-written annotations.
  • VCC completed verification in reasonable time on a dual-core machine, with no significant performance difference between 1- and 2-core virtualized environments.
  • The authors identified that loop and choice annotations could be automatically generated, reducing programmer burden.
  • The current communication type language is limited in expressiveness—especially in the placement of dependent function types, which are restricted to the top level.
  • The team is developing an Eclipse plugin to automate type formation checking and VCC term generation, and plans to extend the language to support for-each constructs and value-dependent communication.

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.