# Towards a Java Subtyping Operad

**Authors:** Moez A. AbdelGawad

arXiv: 1706.00274 · 2018-01-01

## TL;DR

This paper explores modeling Java's complex subtyping relation using operads from category theory to better understand the self-similar structure of type hierarchies in generic object-oriented languages.

## Contribution

It introduces the concept of a Java subtyping operad to formalize and analyze the self-similar structure of Java's subtyping rules, including generics and wildcards.

## Key findings

- Proposes a formal operad model for Java subtyping
- Highlights the role of self-similarity in type relations
- Aims to clarify the complexity of generic type systems

## Abstract

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.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1706.00274/full.md

## Figures

16 figures with captions in the complete paper: https://tomesphere.com/paper/1706.00274/full.md

## References

50 references — full list in the complete paper: https://tomesphere.com/paper/1706.00274/full.md

---
Source: https://tomesphere.com/paper/1706.00274