Multi-graded Featherweight Java
Riccardo Bianchini, Francesco Dagnino, Paola Giannini, Elena, Zucca

TL;DR
This paper extends Featherweight Java with a resource-aware type system that models resource usage, proves its soundness, and allows heterogeneous grades and their specification within Java.
Contribution
It introduces a parametric resource-aware type system for Featherweight Java with heterogeneous grades and in-language grade specifications.
Findings
Proves soundness of the resource-aware type system.
Allows heterogeneous resource grades via homomorphisms.
Enables specifying grade algebras within Java classes.
Abstract
Resource-aware type systems statically approximate not only the expected result type of a program, but also the way external resources are used, e.g., how many times the value of a variable is needed. We extend the type system of Featherweight Java to be resource-aware, parametrically on an arbitrary grade algebra modeling a specific usage of resources. We prove that this type system is sound with respect to a resource-aware version of reduction, that is, a well-typed program has a reduction sequence which does not get stuck due to resource consumption. Moreover, we show that the available grades can be heterogeneous, that is, obtained by combining grades of different kinds, via a minimal collection of homomorphisms from one kind to another. Finally, we show how grade algebras and homomorphisms can be specified as Java classes, so that grade annotations in types can be written in the…
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.
