Dependent types and multi-monadic effects in F*

Author:

Swamy Nikhil1,Hriţcu Cătălin2,Keller Chantal3,Rastogi Aseem4,Delignat-Lavaud Antoine5,Forest Simon5,Bhargavan Karthikeyan2,Fournet Cédric3,Strub Pierre-Yves6,Kohlweiss Markulf1,Zinzindohoue Jean-Karim5,Zanella-Béguelin Santiago7

Affiliation:

1. Microsoft Research, USA

2. Inria, France

3. Microsoft Research, USA / Inria, France

4. University of Maryland, USA

5. Inria, France / ENS, France

6. IMDEA Software Institute, Spain

7. Microsoft Research, UK

Abstract

We present a new, completely redesigned, version of F*, a language that works both as a proof assistant as well as a general-purpose, verification-oriented, effectful programming language. In support of these complementary roles, F* is a dependently typed, higher-order, call-by-value language with _primitive_ effects including state, exceptions, divergence and IO. Although primitive, programmers choose the granularity at which to specify effects by equipping each effect with a monadic, predicate transformer semantics. F* uses this to efficiently compute weakest preconditions and discharges the resulting proof obligations using a combination of SMT solving and manual proofs. Isolated from the effects, the core of F* is a language of pure functions used to write specifications and proof terms---its consistency is maintained by a semantic termination check based on a well-founded order. We evaluate our design on more than 55,000 lines of F* we have authored in the last year, focusing on three main case studies. Showcasing its use as a general-purpose programming language, F* is programmed (but not verified) in F*, and bootstraps in both OCaml and F#. Our experience confirms F*'s pay-as-you-go cost model: writing idiomatic ML-like code with no finer specifications imposes no user burden. As a verification-oriented language, our most significant evaluation of F* is in verifying several key modules in an implementation of the TLS-1.2 protocol standard. For the modules we considered, we are able to prove more properties, with fewer annotations using F* than in a prior verified implementation of TLS-1.2. Finally, as a proof assistant, we discuss our use of F* in mechanizing the metatheory of a range of lambda calculi, starting from the simply typed lambda calculus to System F-omega and even micro-F*, a sizeable fragment of F* itself---these proofs make essential use of F*'s flexible combination of SMT automation and constructive proofs, enabling a tactic-free style of programming and proving at a relatively large scale.

Publisher

Association for Computing Machinery (ACM)

Subject

Computer Graphics and Computer-Aided Design,Software

Cited by 166 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Data-Oblivious ML Accelerators Using Hardware Security Extensions;2024 IEEE International Symposium on Hardware Oriented Security and Trust (HOST);2024-05-06

2. Securing Verified IO Programs Against Unverified Code in F*;Proceedings of the ACM on Programming Languages;2024-01-05

3. Mechanizing Refinement Types;Proceedings of the ACM on Programming Languages;2024-01-05

4. Algebraic Effects Meet Hoare Logic in Cubical Agda;Proceedings of the ACM on Programming Languages;2024-01-05

5. Answer Refinement Modification: Refinement Type System for Algebraic Effects and Handlers;Proceedings of the ACM on Programming Languages;2024-01-05

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3