Multi-graded Featherweight Java

02/15/2023
by   Riccardo Bianchini, et al.
0

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 language itself.

READ FULL TEXT

page 7

page 15

page 16

page 27

page 28

page 29

page 30

research
05/18/2022

Global Type Inference for Featherweight Generic Java

Java's type system mostly relies on type checking augmented with local t...
research
12/20/2019

QuB: A Resource Aware Functional Programming Language

Managing resources—file handles, database connections, etc.—is a hard pr...
research
01/05/2018

Verifying and Synthesizing Constant-Resource Implementations with Types

We propose a novel type system for verifying that programs correctly imp...
research
11/13/2017

Linking Types for Multi-Language Software: Have Your Cake and Eat It Too

Software developers compose systems from components written in many diff...
research
11/16/2018

DifFuzz: Differential Fuzzing for Side-Channel Analysis

Side-channel attacks allow an adversary to uncover secret program data b...
research
03/23/2022

OJXPerf: Featherlight Object Replica Detection for Java Programs

Memory bloat is an important source of inefficiency in complex productio...
research
11/08/2020

A graded dependent type system with a usage-aware semantics (extended version)

Graded Type Theory provides a mechanism to track and reason about resour...

Please sign up or login with your details

Forgot password? Click here to reset