A Java-like calculus with heterogeneous coeffects - Bianchini, Riccardo; Dagnino, Francesco; Giannini, Paola; Zucca, Elena (Theoretical computer science, 2023)
We propose a Java-like calculus where declared variables can be annotated by coeffects specifying constraints on their use, e.g., affinity or privacy levels. Such coeffects are heterogeneous, in the sense that different kinds of coeffects can be used in the same program; combining coeffects of different kinds leads to the trivial coeffect. We prove subject reduction, which includes preservation of coeffects, and show several examples. In a Java-like language, coeffects can be expressed in the language itself, as expressions of user-defined classes.