Lune

POPL2021顶会

Corpse reviver: sound and efficient gradual typing via contract verification

Cameron Moy, Phuc C. Nguyen, Sam Tobin-Hochstadt, David Van Horn

摘要

Gradually-typed programming languages permit the incremental addition of static types to untyped programs. To remain sound, languages insert run-time checks at the boundaries between typed and untyped code. Unfortunately, performance studies have shown that the overhead of these checks can be disastrously high, calling into question the viability of sound gradual typing. In this paper, we show that by building on existing work on soft contract verification, we can reduce or eliminate this overhead.

Our key insight is that while untyped code cannot be trusted by a gradual type system, there is no need to consider only the worst case when optimizing a gradually-typed program. Instead, we statically analyze the untyped portions of a gradually-typed program to prove that almost all of the dynamic checks implied by gradual type boundaries cannot fail, and can be eliminated at compile time. Our analysis is modular, and can be applied to any portion of a program.

We evaluate this approach on a dozen existing gradually-typed programs previously shown to have prohibitive performance overhead-with a median overhead of 3.5× and up to 73.6× in the worst case-and eliminate all overhead in most cases, suffering only 1.6× overhead in the worst case.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 4 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • How Profilers Can Help Navigate Type Migration 引用了 Transitioning from structural to nominal code with efficient gradual typing
  • Deep and shallow types for gradual languages 引用了 Transitioning from structural to nominal code with efficient gradual typing
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper4

  1. Transitioning from structural to nominal code with efficient gradual typingFabian Muehlboeck, Ross TateOOPSLA 2021 · 8 次引用
  2. Deep and shallow types for gradual languagesBen GreenmanPLDI 2022 · 7 次引用
  3. Highly illogical, Kirk: spotting type mismatches in the large despite broken contracts, unsound types, and too many lintersJoshua Hoeflich, Robert Bruce Findler, Manuel SerranoOOPSLA 2022 · 5 次引用
  4. How Profilers Can Help Navigate Type MigrationBen Greenman, Matthias Felleisen, Christos DimoulasOOPSLA 2023 · 1 次引用

相关 Paper

  1. Abstracting gradual typing moving forward: precise and space-efficientFelipe Bañados Schwerter, Alison M. Clark, Khurram A. Jafery, Ronald GarciaPOPL 2021 · 13 次引用
  2. Gradually Typed Languages Should Be Vigilant!Olek Gierczak, Lucy Menon, Christos Dimoulas, Amal AhmedOOPSLA 2024 · 1 次引用
  3. Typed and Confused: Studying the Unexpected Dangers of Gradual TypingDominic Troppmann, Aurore Fass, Cristian-Alexandru StaicuASE 2024 · 2 次引用
  4. Sound Gradual Verification with Symbolic ExecutionConrad Zimmerman, Jenna DiVincenzo, Jonathan AldrichPOPL 2024 · 7 次引用
  5. Gradual verification of recursive heap data structuresJenna Wise, Johannes Bader, Cameron Wong, Jonathan Aldrich 等OOPSLA 2020 · 12 次引用
黄昏的海面,两侧是细线勾勒的悬崖