F*: A general-purpose proof-oriented programming language
F* is a sophisticated, proof-oriented programming language, backed by Microsoft Research and Inria, that integrates dependent types with automated theorem proving for high-assurance software. It's gaining traction in critical applications like cryptography and systems, demonstrated by its use in Mozilla Firefox, the Linux kernel, and Windows Hyper-V. HN readers appreciate its potential for building demonstrably correct and secure software, addressing complex verification challenges.
The Lowdown
F* (pronounced F star) is a powerful, general-purpose programming language designed for building highly assured software through formal verification. It uniquely combines the expressive power of dependent types with sophisticated proof automation techniques, leveraging SMT solving and interactive theorem proving to ensure program correctness. Developed by Microsoft Research, Inria, and an active community, F* is open-source and capable of compiling to various targets, including OCaml, F#, C, and WebAssembly.
- Core Functionality: F* supports both purely functional and effectful programming paradigms, emphasizing proof-oriented development.
- Verification Mechanisms: It integrates dependent types with SMT (Satisfiability Modulo Theories) solving and tactic-based interactive theorem proving for automated and manual proof construction.
- Compilation & Interoperability: Programs compile to OCaml by default, with fragments also extractable to F#, C, WebAssembly via KaRaMeL, or assembly via the Vale toolchain. The language itself is bootstrapped from OCaml.
- Real-world Applications: F* is extensively used in projects like Project Everest for secure communication software. Notable successes include HACL* (cryptographic primitives used in Firefox, Linux kernel), EverParse (parser generator for Windows Hyper-V, Azure), and StarMalloc (a verified memory allocator).
- Active Research Area: The language is a vibrant subject of academic research, spanning programming language design, semantics, security, systems, parsing, and even AI-assisted programming, with a vast bibliography of published papers.
- Community & Learning: Resources include an online book ("Proof-oriented Programming In F*"), tutorials for Low* (a C-compilable subset), course materials, and community forums on GitHub Discussions and Zulip.
Overall, F* represents a cutting-edge approach to software development, offering tools to construct provably correct and secure systems. Its adoption in critical infrastructure and its role as a foundation for extensive research highlight its significance in advancing the state of formal verification.