Affiliation:
1. EPFL, Switzerland
2. Cornell University, USA
Abstract
We present short programs that demonstrate the unsoundness of Java and Scala's current type systems. In particular, these programs provide parametrically polymorphic functions that can turn any type into any type without (down)casting. Fortunately, parametric polymorphism was not integrated into the Java Virtual Machine (JVM), so these examples do not demonstrate any unsoundness of the JVM. Nonetheless, we discuss broader implications of these findings on the field of programming languages.
Funder
National Science Foundation
European Research Council
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
22 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. API-Driven Program Synthesis for Testing Static Typing Implementations;Proceedings of the ACM on Programming Languages;2024-01-05
2. Wildcards need witness protection;Proceedings of the ACM on Programming Languages;2022-10-31
3. A Java typestate checker supporting inheritance;Science of Computer Programming;2022-09
4. One down, 699 to go: or, synthesising compositional desugarings;Proceedings of the ACM on Programming Languages;2021-10-20
5. Relational nullable types with Boolean unification;Proceedings of the ACM on Programming Languages;2021-10-20