Skip to main content
QUICK REVIEW

[Paper Review] A Monadic Framework for Relational Verification (Functional Pearl).

Niklas Grimm, Kenji Maillard|arXiv (Cornell University)|Feb 28, 2017
Security and Verification in ComputingComputer Science1 citations
TL;DR

This paper presents a monadic framework in F* for verifying relational properties of effectful programs by modeling computations as monads and leveraging SMT-based automation, user-defined effects, and monadic reification. It demonstrates that verifying relational properties—such as information flow control, program equivalence, and cryptographic security—requires minimal additional effort compared to unary verification.

ABSTRACT

Relational properties describe multiple runs of one or more programs. They characterize many useful notions of security, program refinement, and equivalence for programs with diverse computational effects, and they have received much attention in the recent literature. Rather than developing separate tools for special classes of effects and relational properties, we advocate using a general purpose proof assistant as a unifying framework for the relational verification of effectful programs. The essence of our approach is to model effectful computations using monads and to prove relational properties on their monadic representations, making the most of existing support for reasoning about pure programs. We apply this method in F* and evaluate it by encoding a variety of relational program analyses, including information flow control, program equivalence and refinement at higher order, correctness of program optimizations and game-based cryptographic security. By relying on SMT-based automation, unary weakest preconditions, user-defined effects, and monadic reification, we show that, compared to unary properties, verifying relational properties requires little additional effort from the F* programmer.

Motivation & Objective

  • To unify the verification of diverse relational properties across programs with computational effects.
  • To reduce the engineering effort of building specialized tools for each class of relational property and effect.
  • To leverage existing support in proof assistants for pure program reasoning to verify effectful, relational programs.
  • To evaluate the framework on a range of practical analyses, including information flow, program equivalence, and cryptographic security.
  • To demonstrate that relational verification can be as lightweight as unary verification when using monadic abstractions and SMT automation.

Proposed method

  • Modeling effectful computations using monads to encapsulate computational effects in a structured way.
  • Representing relational properties as monadic predicates over pairs of computations.
  • Using SMT-based automation to discharge proof obligations arising from relational reasoning.
  • Leveraging user-defined effects in F* to precisely capture and reason about specific computational behaviors.
  • Applying monadic reification to embed relational specifications into the type system for better tool support.
  • Encoding relational analyses (e.g., program equivalence, refinement, security) as monadic proofs in F*.

Experimental results

Research questions

  • RQ1Can a general-purpose proof assistant like F* be effectively used to verify a broad range of relational properties in effectful programs?
  • RQ2To what extent does modeling effects via monads reduce the complexity of verifying relational properties?
  • RQ3How does the integration of SMT-based automation and user-defined effects impact the practicality of relational verification?
  • RQ4Can relational verification be made as lightweight as unary verification using monadic abstractions?
  • RQ5How well does the framework scale across diverse analyses such as information flow, program equivalence, and cryptographic security?

Key findings

  • The monadic framework enables verification of relational properties with effort comparable to unary verification, thanks to SMT automation and monadic abstractions.
  • User-defined effects in F* allow precise modeling of computational behaviors, improving modularity and expressiveness in relational proofs.
  • Monadic reification supports embedding relational specifications directly into the type system, enhancing tooling and verification support.
  • The framework successfully encodes complex analyses, including higher-order program equivalence and game-based cryptographic security.
  • Relational verification using this approach requires little additional effort from the programmer compared to verifying pure, unary properties.
  • The method scales across diverse domains, including information flow control and correctness of program optimizations.

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.