A Type System for Tom
Claude Kirchner, Pierre-Etienne Moreau, Cl\'audia Tavares

TL;DR
This paper introduces a sound and complete type system with subtyping for the Tom language, an extension of Java with pattern matching, enabling effective type checking and inference for extended language features.
Contribution
It presents a novel type system with subtyping for Tom, compatible with Java, including algorithms for type checking and inference that handle pattern matching extensions.
Findings
Type system is sound and complete.
Algorithms successfully perform type checking and inference.
Type inference handles pattern matching variables.
Abstract
Extending a given language with new dedicated features is a general and quite used approach to make the programming language more adapted to problems. Being closer to the application, this leads to less programming flaws and easier maintenance. But of course one would still like to perform program analysis on these kinds of extended languages, in particular type checking and inference. In this case one has to make the typing of the extended features compatible with the ones in the starting language. The Tom programming language is a typical example of such a situation as it consists of an extension of Java that adds pattern matching, more particularly associative pattern matching, and reduction strategies. This paper presents a type system with subtyping for Tom, that is compatible with Java's type system, and that performs both type checking and type inference. We propose an…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
