统一线性分析与依赖分析
Unifying Linearity and Dependency Analyses
AI总结:
本文通过扩展现有分级上下文类型系统使分级模态兼具余单子与单子性质,提出了统一的线性依赖演算LDC,在任意纯类型系统中用同一机制实现了线性与依赖分析。
摘要:
线性分析和依赖分析是计算机科学中几个应用的关键,尤其是在资源管理和信息流控制方面。将这些分析联系起来的是,它们都需要对至少两个具有受限相互交互的不同世界进行建模。尽管线性分析和依赖分析解决相似的问题,但这些分析是通过采用不同的方法来进行的。对于线性分析,类型系统采用来自Girard线性逻辑的余单子指数模态。对于依赖分析,类型系统采用来自Moggi计算元语言的单子模态。由于这种方法上的差异,这两种分析的统一虽然在理论和实践上都是可取的,但并非易事。幸运的是,随着分级上下文类型系统的最新进展,人们已经认识到可以通过同一视角来查看线性分析和依赖分析。然而,现有的分级上下文类型系统未能实现线性分析和依赖分析的统一。现有分级上下文类型系统的问题在于,尽管它们的线性分析是通用的,但它们的依赖分析是有限的,主要是因为它们采用的分级模态是余单子的而不是单子的。在本文中,我们通过系统地扩展现有的分级上下文类型系统来解决这一限制,使得分级模态既是余单子的又是单子的。这种扩展使我们能够将线性分析与通用的依赖分析统一起来。我们提出了一个统一的线性依赖演算(Linear Dependency Calculus,LDC),它在任意的纯类型系统中使用相同的机制来分析线性和依赖性。我们通过将各个分析的标准演算纳入其中,证明了LDC是一个通用的线性和依赖演算。
英文摘要:
Linearity and dependency analyses are key to several applications in computer science, especially, in resource management and information flow control. What connects these analyses is that both of them need to model at least two different worlds with constrained mutual interaction. Though linearity and dependency analyses address similar problems, the analyses are carried out by employing different methods. For linearity analysis, type systems employ the comonadic exponential modality from Girard's linear logic. For dependency analysis, type systems employ the monadic modality from Moggi's computational metalanguage. Owing to this methodical difference, a unification of the two analyses, though theoretically and practically desirable, is not straightforward. Fortunately, with recent advances in graded-context type systems, it has been realized that linearity and dependency analyses can be viewed through the same lens. However, existing graded-context type systems fall short of a unification of linearity and dependency analyses. The problem with existing graded-context type systems is that though their linearity analysis is general, their dependency analysis is limited, primarily because the graded modality they employ is comonadic and not monadic. In this paper, we address this limitation by systematically extending existing graded-context type systems so that the graded modality is both comonadic and monadic. This extension enables us to unify linearity analysis with a general dependency analysis. We present a unified Linear Dependency Calculus, LDC, which analyses linearity and dependency using the same mechanism in an arbitrary Pure Type System. We show that LDC is a general linear and dependency calculus by subsuming into it the standard calculi for the individual analyses.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。