Java子类型操作数
Towards a Java Subtyping Operad
摘要:
Java中的子类型关系表现出自相似性。Java子类型中的自相似性是有趣和复杂的,这是由于泛型类型的存在,因此,泛型类型存在三种子类型规则:协变子类型,逆变子类型和不变子类型。支持有界类型变量也增加了Java和其他泛型名义类型OO语言(如C#和Scala)中子类型关系的复杂性。在本文中,我们将探讨定义一个operad模型的子类型关系在Java和类似的通用名义型面向对象程序设计语言的建设。操作,从范畴理论,经常被用来模拟自相似现象。我们希望,Java子类型操作将有助于理解泛型名义类型OO语言的类型系统。
英文摘要:
The subtyping relation in Java exhibits self-similarity. The self-similarity in Java subtyping is interesting and intricate due to the existence of wildcard types and, accordingly, the existence of three subtyping rules for generic types: covariant subtyping, contravariant subtyping and invariant subtyping. Supporting bounded type variables also adds to the complexity of the subtyping relation in Java and in other generic nominally-typed OO languages such as C# and Scala. In this paper we explore defining an operad to model the construction of the subtyping relation in Java and in similar generic nominally-typed OO programming languages. Operads, from category theory, are frequently used to model self-similar phenomena. The Java subtyping operad, we hope, will shed more light on understanding the type systems of generic nominally-typed OO languages.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。