[Paper Review] Meta-F*: Metaprogramming and Tactics in an Effectful Program Verifier.
Meta-F* introduces a metaprogramming framework for F*, enabling effectful proof scripting and user-defined tactics that integrate with F*'s weakest precondition calculus and SMT solving. By combining metaprogramming with SMT automation, it significantly improves proof stability and automation for complex logics like separation logic and non-linear arithmetic, making previously intractable verification tasks practical.
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.
Motivation & Objective
- To address the limitations of SMT solvers in handling complex logics such as higher-order logic and separation logic in effectful program verification.
- To improve proof automation and stability in F* for verification tasks involving non-linear arithmetic, especially in cryptographic primitives.
- To enable developers to write user-defined tactics and decision procedures as first-class effectful programs within F*.
- To integrate metaprogramming seamlessly with F*'s weakest precondition calculus and SMT-based verification pipeline.
- To make advanced verification techniques practical by combining metaprogrammed decision procedures with SMT solving.
Proposed method
- Meta-F* extends F* with a metaprogramming framework that allows writing effectful programs to manipulate and generate proofs.
- Metaprograms are written in F* itself, leveraging its rich type system, libraries, and IDE support for better development experience.
- The framework integrates with F*'s weakest precondition calculus to pre-process or solve verification conditions before delegating to SMT solvers.
- It enables the construction of custom decision procedures for complex theories like non-linear arithmetic and separation logic.
- Metaprograms can be extracted to efficient native code, ensuring performance in proof automation.
- The system supports user-defined tactics that can be composed and reused, enhancing modularity and maintainability of proof scripts.
Experimental results
Research questions
- RQ1Can metaprogramming in F* be effectively used to extend proof automation beyond the reach of SMT solvers alone?
- RQ2How does integrating user-defined tactics with SMT solving improve proof stability and performance in complex verification tasks?
- RQ3To what extent can metaprogrammed decision procedures for non-linear arithmetic and separation logic reduce reliance on manual proof construction?
- RQ4Can effectful metaprograms be seamlessly integrated into F*'s verification pipeline without sacrificing performance or correctness?
- RQ5How does Meta-F* compare to existing approaches in terms of expressiveness and automation for advanced program verification?
Key findings
- Meta-F* enables the implementation of custom decision procedures for non-linear arithmetic, significantly improving automation in verifying cryptographic primitives.
- The integration of metaprogramming with F*'s weakest precondition calculus allows pre-processing of verification conditions, reducing the burden on SMT solvers.
- Proof stability and automation are enhanced through user-defined tactics that can be composed and reused across verification tasks.
- Meta-F* makes separation logic verification practical by allowing developers to encode complex reasoning patterns as reusable metaprograms.
- The framework supports efficient extraction of metaprograms to native code, ensuring performance in proof automation without sacrificing expressiveness.
- Evaluation shows that combining metaprogrammed reasoning with SMT solving enables verification of programs previously considered infeasible due to logic complexity.
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.