Lazy Linearity for a Core Functional Language
Rodrigo Mesquita, Bernardo Toninho
摘要
Traditionally, in linearly typed languages, consuming a linear resource is synonymous with its syntactic occurrence in the program. However, under the lens of non-strict evaluation, linearity can be further understood semantically, where a syntactic occurrence of a resource does not necessarily entail using that resource when the program is executed. While this distinction has been largely unexplored, it turns out to be inescapable in Haskell’s optimising compiler, which heavily rewrites the source program in ways that break syntactic linearity but preserve the program’s semantics. We introduce Linear Core, a novel system which accepts the lazy semantics of linearity statically and is suitable for lazy languages such as the Core intermediate language of the Glasgow Haskell Compiler. We prove that Linear Core is sound, guaranteeing linear resource usage, and that multiple optimising transformations preserve linearity in Linear Core while failing to do so in Core. We have implemented Linear Core as a compiler plugin to validate the system against linearity-heavy libraries, including linear-base .
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
它引用的顶会 Paper3
- A graded dependent type system with a usage-aware semanticsPritam Choudhury, Harley Eades III, Richard A. Eisenberg, Stephanie WeirichPOPL 2021 · 被引用 33 次
- Linear Dependent Type Theory for Quantum Programming Languages: Extended AbstractPeng Fu, Kohei Kishida, Peter SelingerLICS 2020 · 被引用 23 次
- Linear types for large-scale systems verificationJialin Li, Andrea Lattuada, Yi Zhou, Jonathan Cameron 等OOPSLA 2022 · 被引用 10 次
相关 Paper
- Liquidate your assets: reasoning about resource usage in liquid HaskellMartin A. T. Handley, Niki Vazou, Graham HuttonPOPL 2020 · 被引用 38 次
- Typing StrictnessDaniel Sainati, Joseph W. Cutler, Benjamin C. Pierce, Stephanie WeirichPOPL 2026
- Effects and Coeffects in Call-by-Push-ValueCassia Torczon, Emmanuel Suárez Acevedo, Shubh Agrawal, Joey Velez-Ginorio 等OOPSLA 2024 · 被引用 5 次
- Class-Dictionary Specialization with Rank-2 Polymorphic FunctionsYong Qi Foo, Michael D. AdamsOOPSLA 2026
- PureCake: A Verified Compiler for a Lazy Functional LanguageHrutvik Kanabar, Samuel Vivien, Oskar Abrahamsson, Magnus O. Myreen 等PLDI 2023 · 被引用 7 次
