[Paper Review] Meta-F*: Proof Automation with SMT, Tactics, and Metaprograms
Meta-F⋆ introduces a tactics and metaprogramming framework for F⋆ that integrates SMT solving with interactive proof automation, enabling users to write verified metaprograms that simplify or discharge verification conditions not solvable by SMT alone. The system leverages F⋆'s effect system to safely embed metaprograms as first-class values, supporting both interpreted and natively compiled execution for performance, and demonstrates significant gains in proof development efficiency and robustness on realistic case studies.
We introduce Meta-F*, a tactics and metaprogramming framework for the F* program verifier. The main novelty of Meta-F* is allowing the use of tactics and metaprogramming to discharge assertions not solvable by SMT, or to just simplify them into well-behaved SMT fragments. Plus, Meta-F* can be used to generate verified code automatically. Meta-F* is implemented as an F* effect, which, given the powerful effect system of F*, heavily increases code reuse and even enables the lightweight verification of metaprograms. Metaprograms can be either interpreted, or compiled to efficient native code that can be dynamically loaded into the F* type-checker and can interoperate with interpreted code. Evaluation on realistic case studies shows that Meta-F* provides substantial gains in proof development, efficiency, and robustness.
Motivation & Objective
- To address the limitations of SMT-based program verifiers in handling complex verification conditions beyond decidable theories.
- To enable interactive proof authoring within a program verifier by providing explicit access to proof context and structured proof manipulation.
- To reduce boilerplate in proofs by allowing domain-specific automation through tactics and metaprograms.
- To support efficient execution of metaprograms via native compilation while preserving type safety and verifiability.
- To unify SMT-based automation with interactive theorem proving in a single, extensible framework for F⋆.
Proposed method
- Meta-F⋆ is implemented as a first-class F⋆ effect, leveraging the language’s extensible effect system to isolate and type-check metaprograms safely.
- It introduces a two-language approach: a source language with full typing and a target language for untyped, efficient execution, connected via coercion functions.
- Metaprograms are compiled to native code using F⋆’s extraction to OCaml, enabling high-performance execution during type-checking.
- The system supports both interpretation via abstract machines and normalization-by-evaluation, with a performance-optimized path via native execution.
- A novel coercion mechanism enables safe reduction of open terms under polymorphism, allowing efficient evaluation of higher-order metaprograms.
- Proof states are extracted from verification conditions to expose implicit hypotheses, enabling tactic-based manipulation of the logical context.
Experimental results
Research questions
- RQ1How can SMT-based program verifiers be extended with interactive proof automation without sacrificing automation for common cases?
- RQ2What is a type-safe and composable way to embed metaprogramming and tactics within a dependently typed program verifier?
- RQ3Can metaprograms be both verified and efficiently executed in a system that integrates with SMT solving?
- RQ4How can proof context be made explicit and programmatically manipulable in a program verifier with implicit logical contexts?
- RQ5What performance characteristics can be achieved when compiling metaprograms to native code in a type-safe manner?
Key findings
- Meta-F⋆ enables substantial reductions in proof development effort by automating repetitive proof steps through tactics and metaprograms.
- The framework allows the implementation of complex language extensions, such as typeclass resolution, entirely as metaprogramming libraries without modifying the F⋆ type-checker.
- Native compilation of metaprograms achieves significant performance improvements over interpretation, enabling efficient evaluation of open terms under polymorphism.
- The integration of SMT solving with interactive tactics allows verification conditions to be transformed into SMT-solvable fragments, even when they initially lie outside the solver’s decidable theories.
- The use of F⋆’s effect system ensures strong safety guarantees, allowing metaprograms to be verified and composed with regular programs.
- Evaluation on realistic case studies shows that Meta-F⋆ improves proof robustness and maintainability while maintaining high performance.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.