Affiliation:
1. Dept. of Comp. & Info. Sci., University of Pennsylvania
2. Bell Laboratories, Lucent Technologies
Abstract
Several recent studies have introduced lightweight versions of Java: reduced languages in which complex features like threads and reflection are dropped to enable rigorous arguments about key properties such as type safety. We carry this process a step further, omitting almost all features of the full language (including interfaces and even assignment) to obtain a small calculus, Featherweight Java, for which rigorous proofs are not only possible but easy.
Featherweight Java bears a similar relation to full Java as the lambda-calculus does to languages such as ML and Haskell. It offers a similar computational “feel,” providing classes, methods, fields, inheritance, and dynamic typecasts, with a semantics closely following Java's. A proof of type safety for Featherweight Java thus illustrates many of the interesting features of a safety proof for the full language, while remaining pleasingly compact. The syntax, type rules, and operational semantics of Featherweight Java fit on one page, making it easier to understand the consequences of extensions and variations.
As an illustration of its utility in this regard, we extend Featherweight Java with
generic classes
in the style of GJ (Bracha, Odersky, Stoutamire, and Wadler) and sketch a proof of type safety. The extended system formalizes for the first time some of the key features of GJ.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
97 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. A Java-like calculus with heterogeneous coeffects;Theoretical Computer Science;2023-09
2. Variability modules;Journal of Systems and Software;2023-01
3. Generic go to go: dictionary-passing, monomorphisation, and hybrid;Proceedings of the ACM on Programming Languages;2022-10-31
4. Coeffects for sharing and mutation;Proceedings of the ACM on Programming Languages;2022-10-31
5. Variability modules for Java-like languages;Proceedings of the 25th ACM International Systems and Software Product Line Conference - Volume A;2021-09-06