arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2605.12893cs.PLcs.CCcs.LO
收藏

LFPL:重新审视与机械化

LFPL: Revisited and Mechanized

Carnegie Mellon University(卡内基梅隆大学)

Nathaniel Glover, Jan Hoffmann

AI总结:

本文重新审视并机械化了LFPL语言及其元理论,提供自包含且易懂的现代描述,简化了已知最强的正确性与完备性结果。

摘要:

Hofmann (1999) 引入了功能编程语言 LFPL,用于用一个仿射类型系统来表征在多项式时间内可计算的函数。LFPL 支持自然的编程风格,包括嵌套递归,并启发了自动成本分析、线性依赖类型理论和功能编程语言中高效内存管理的开发。尽管其重要性,目前尚不存在一个自包含的描述,更不用说完整的机械化了。本文提供了一个现代的 LFPL 及其元理论的描述和机械化,旨在自包含且易于访问,同时简化了已知最强的正确性和完备性结果。正确性证明使用扩展了 LFPL 的语言 LFPL+,该语言增加了额外的语言特性。证明是新颖的,采用 Aehlig 和 Schwichtenberg (2002) 的技术来构造显式多项式,以界定 LFPL+ 表达式相对于大步成本语义的成本。完备性证明显示 LFPL 程序可以模拟多项式时间图灵机,同时仅依赖于受限形式的线性函数和列表。它与 Hofmann (2002) 的原始证明结构相同,但通过使用第一类函数和列表实现的栈状数据结构大大简化了核心论证。机械化包括完整的正确性和完备性证明,并作为最近开发的证明助手 Istari 中首个机械化的元理论案例研究之一。

英文摘要:

Hofmann (1999) introduced the functional programming language LFPL to characterize the functions computable in polynomial time using an affine type system. LFPL enables a natural programming style, including nested recursion, and has inspired the development of type systems for automatic cost analysis, linear dependent type theories, and efficient memory management in functional programming languages. Despite its prominence, there does not exist a self-contained presentation, let alone a full mechanization, of LFPL and its core metatheory. This article presents a modern account and mechanization of LFPL and its metatheory with the goal of being self-contained and accessible while streamlining the strongest-known soundness and completeness results. The soundness proof works with the language LFPL+, which extends LFPL with additional language features. The proof is novel, adapting a technique by Aehlig and Schwichtenberg (2002) to construct explicit polynomials that bound the cost of an LFPL+ expression with respect to a big-step cost semantics. The completeness proof shows that LFPL programs can simulate polynomial-time Turing machines while only relying on restricted forms of linear functions and lists. It has the same structure as the original proof by Hofmann (2002) but greatly simplifies the core argument with a novel stack-like data structure that is implemented with first-class functions and lists. The mechanization includes the full soundness and completeness proofs, and serves as one of the first case studies of mechanized metatheory in the recently developed proof assistant Istari.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑