arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1906.03937cs.PL
收藏

Java泛型:一种顺序理论方法(详细大纲)

Java Generics: An Order-Theoretic Approach (Detailed Outline)

Moez A. AbdelGawad

摘要:

泛型已经被添加到Java中,以增加其类型系统的表达能力。然而,Java中的泛型包括一些特性--例如Java通配符、$F$有界泛型和Java擦除--到目前为止,这些特性很难分析和推理,这反映了Java和其他类似的名义类型面向对象编程(OOP)语言中泛型的数学建模是一个挑战。因此,基于泛型模型的主流名义类型OOP语言的类型系统过于复杂,阻碍了这些类型系统的发展。在本文中,我们提出了一种新的方法来建模Java泛型,使用的概念和工具,从秩序理论的详细轮廓,我们在开发这种方法的进展报告。从根本上说,我们使用的名义子类化关系(作为偏序)与一些标准的和新的序理论的工具来构建通用的名义子类型关系(作为偏序)和通用类型参数之间的包含关系(第三偏序)。我们进一步分析了这三个排序关系之间的关系-这是在主流的通用OO型系统的核心-使用序理论工具,因此,我们探索扩展的OO型系统建议这样的分析。在我们的方法中,我们还利用了一些概念和工具,从范畴理论。我们相信一个组合的顺序理论和范畴理论的方法来建模泛型的关键是克服大部分的逆境时,发现分析通用OO类型系统的功能。

英文摘要:

Generics have been added to Java so as to increase the expressiveness of its type system. Generics in Java, however, include some features---such as Java wildcards, $F$-bounded generics, and Java erasure---that have been hard to analyze and reason about so far, reflecting the fact that the mathematical modeling of generics in Java and other similar nominally-typed object-oriented programming (OOP) languages is a challenge. As a result, the type systems of mainstream nominally-typed OOP languages, which are built based on current models of generics, are overly complex, which hinders the progress of these type systems. In this paper we present a detailed outline of a new approach to modeling Java generics that uses concepts and tools from order theory, and we report on our progress in developing this approach. Fundamentally, we use the nominal subclassing relation (as a partial order) together with some standard and novel order-theoretic tools to construct the generic nominal subtyping relation (as a partial order) and the containment relation between generic type arguments (a third partial order). We further analyze the relation between these three ordering relations---which lie at the heart of mainstream generic OO type systems---using order theoretic tools, and accordingly we explore extensions of OO type systems suggested by such analysis. In our approach we also make use of some concepts and tools from category theory. We believe a combined order-theoretic and category-theoretic approach to modeling generics holds the keys to overcoming much of the adversity found when analyzing features of generic OO type systems.

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

↑