Meta-F*: Metaprogramming and Tactics in an Effectful Program Verifier

03/17/2018
by   Guido Martínez, et al.
0

Verification tools for effectful programming languages often rely on automated theorem provers such as SMT solvers to discharge their proof obligations, usually with very limited facilities for user interaction. When the need arises for logics (e.g., higher order or separation logic) or theories (e.g., non-linear arithmetic) that are hard for SMT solvers to efficiently automate, this style of program verification becomes problematic. Building on ideas from the interactive theorem proving community we introduce Meta-F*, a metaprogramming framework for the F* effectful language and SMT-based program verification tool. Meta-F* allows developers to write effectful metaprograms suitable for proof scripting, user-defined proof automation, and verified program construction and transformation. Metaprograms are effectful programs in F* itself, making good use of F*'s libraries, IDE support, and extraction to efficient native code. Meta-F*, moreover, is well-integrated with F*'s weakest precondition calculus and can solve or pre-process parts of the verification condition while leaving the rest for the SMT solver. We evaluate Meta-F* on a variety of examples, demonstrating that tactics, and metaprogramming in general, improve proof stability and automation in F*. Using metaprogrammed decision procedures for richer logics in combination with SMT solving makes it practical to apply F* in settings that were previously out of reach, such as separation logic, or that suffered from poor automation, such as the non-linear arithmetic proofs needed for verifying cryptographic primitives.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/17/2018

Meta-F*: Proof Automation with SMT, Tactics, and Metaprograms

Scripting proofs with tactics has been a tradition in interactive theore...
research
10/14/2020

Concise Outlines for a Complex Logic: A Proof Outline Checker for TaDA (Full Paper)

Modern separation logics allow one to prove rich properties of intricate...
research
04/21/2020

The Imandra Automated Reasoning System (system description)

We describe Imandra, a modern computational logic theorem prover designe...
research
05/10/2021

Identifying Overly Restrictive Matching Patterns in SMT-based Program Verifiers

Universal quantifiers occur frequently in proof obligations produced by ...
research
02/02/2021

Zero-cost meta-programmed stateful functors in F*

Writing code is hard; proving it correct is even harder. As the scale of...
research
03/30/2022

Lay-it-out: Interactive Design of Layout-Sensitive Grammars

Layout-sensitive grammars have been adopted in many modern programming l...
research
01/08/2018

Deciding and Interpolating Algebraic Data Types by Reduction (Technical Report)

Recursive algebraic data types (term algebras, ADTs) are one of the most...

Please sign up or login with your details

Forgot password? Click here to reset