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

by   Guido Martínez, et al.

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.


page 1

page 2

page 3

page 4


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

Scripting proofs with tactics has been a tradition in interactive theore...

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...

The Imandra Automated Reasoning System (system description)

We describe Imandra, a modern computational logic theorem prover designe...

Identifying Overly Restrictive Matching Patterns in SMT-based Program Verifiers

Universal quantifiers occur frequently in proof obligations produced by ...

Zero-cost meta-programmed stateful functors in F*

Writing code is hard; proving it correct is even harder. As the scale of...

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

Layout-sensitive grammars have been adopted in many modern programming l...

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