<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">A Java-like Calculus with User-Defined Coeffects</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Riccardo</forename><surname>Bianchini</surname></persName>
							<email>riccardo.bianchini@edu.unige.it</email>
							<affiliation key="aff0">
								<orgName type="institution">University of Genova</orgName>
								<address>
									<country key="IT">Italy</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Francesco</forename><surname>Dagnino</surname></persName>
							<email>francesco.dagnino@dibris.unige.it</email>
							<affiliation key="aff0">
								<orgName type="institution">University of Genova</orgName>
								<address>
									<country key="IT">Italy</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Paola</forename><surname>Giannini</surname></persName>
							<email>paola.giannini@uniupo.it</email>
							<affiliation key="aff1">
								<orgName type="institution">University of Piemonte Orientale</orgName>
								<address>
									<country key="IT">Italy</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Elena</forename><surname>Zucca</surname></persName>
							<email>elena.zucca@unige.it</email>
							<affiliation key="aff0">
								<orgName type="institution">University of Genova</orgName>
								<address>
									<country key="IT">Italy</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">A Java-like Calculus with User-Defined Coeffects</title>
					</analytic>
					<monogr>
						<idno type="ISSN">1613-0073</idno>
					</monogr>
					<idno type="MD5">C26CDDC412A0660371CD7A1C57314A9C</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-24T07:30+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<textClass>
				<keywords>
					<term>type systems</term>
					<term>operational semantics</term>
					<term>Java-like languages</term>
				</keywords>
			</textClass>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>We propose a Java-like calculus where declared variables can be annotated by coeffects specifying constraints on their use, such as linearity or privacy levels. Annotations are written in the language itself, as expressions of type Coeffect, a predefined class which can be extended by user-defined subclasses, modeling the coeffects desired for a specific application. We formalize the type system and prove subject reduction, which includes preservation of coeffects, and show several examples.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">Introduction</head><p>Type-and-coeffect systems <ref type="bibr" target="#b0">[1,</ref><ref type="bibr" target="#b1">2,</ref><ref type="bibr" target="#b2">3,</ref><ref type="bibr" target="#b3">4,</ref><ref type="bibr" target="#b4">5,</ref><ref type="bibr" target="#b5">6,</ref><ref type="bibr" target="#b6">7,</ref><ref type="bibr" target="#b7">8]</ref> are type systems where the typing judgment takes an enriched form, such as x 1 : c 1 C 1 , . . . , x 𝑛 : c𝑛 C 𝑛 ⊢ e : C , with c 1 , . . . , c 𝑛 coeffects modeling how the corresponding variables are used in e.</p><p>For instance, coeffects of shape c ::= 0 | 1 | 𝜔 trace when a variable is either not used, or used linearly (that is, exactly once), or used in an unrestricted way, respectively, in the expression e. In this way, functions, e.g., 𝜆x :int.5, 𝜆x :int.x , and 𝜆x :int.x + x , which have the same type in the simply-typed lambda calculus, can be distinguished by adding coeffect annotations: 𝜆x :int[0].5, 𝜆x :int <ref type="bibr" target="#b0">[1]</ref>.x , and 𝜆x :int[𝜔].x + x . Other typical examples are exact usage (coeffects are natural numbers), and privacy levels. Coeffects usually form a semiring, specifying sum +, multiplication •, and 0 and 1 constants, satisfying some natural axioms. Moreover, some kind of order relation is often required as well.</p><p>This approach has been exploited to a fully-fledged programming language in Granule <ref type="bibr" target="#b5">[6]</ref>, a functional language equipped with a type-and-coeffect system, hence allowing the programmer to write function declarations as those above. In Granule, different kinds of coeffects can be used at the same time, including naturals for exact usage, security levels, intervals, infinity, and products of coeffects; however, the available coeffects are fixed once and for all.</p><p>In this paper, we investigate the possibility of providing a similar support in Java-like languages, by allowing the programmer to write coeffect annotations in variable declarations.</p><p>Moreover, we rely on the inheritance mechanism of OO languages to allow the programmer to write her/his own coeffects. More in detail, coeffect annotations are expressions of (subclasses of) a predefined class Coeffect, analogously to Java exceptions which are expressions of (subclasses of) Exception.</p><p>In Sect. 2 we define the underlying calculus, and in Sect. 3 the type-and-coeffect system, stating its soundness. In Sect. <ref type="bibr" target="#b3">4</ref> we show some examples. We discuss further work in Sect. 5.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Calculus</head><p>The syntax and operational semantics of the language are shown in Fig. <ref type="figure" target="#fig_0">1</ref>. We write es as metavariable for e 1 , . . . , e 𝑛 , 𝑛 ≥ 0, and analogously for other sequences. We assume sets of variables x , y, z , . . ., including the special variable this, class names C , field names f , and method names m. Besides the standard predefined class Object, root of the inheritance hierarchy, we assume another predefined class Coeffect, whose definition will be given in the next section. A subclass of Coeffect is called a coeffect class. In addition to standard constructs (variable, field access, constructor and method invocation, and block) we include a typecase construct, since in coeffect classes a check of the runtime type will be typically needed to write binary methods, see the examples in Sect. 4. In the calculus, we choose this compact construct, essentially the same used in <ref type="bibr" target="#b8">[9]</ref>, to keep the syntax minimal; it could be encoded in true Java by using conditional, instanceof, and cast.</p><formula xml:id="formula_0">e ::= x | e.f | new C (es) | e.m(es) | {C [v ^] x = e; e ′ } expression | case e of (C 1 [v ^1] x 1 )e 1 (C 2 [v ^2] x 2 )e 2 v ::= new C (vs) value ℰ ::= [ ] | ℰ.f | new C (vs, ℰ, es) | ℰ.m(es) | v .m(vs, ℰ, es) evaluation context | {C [v ^] x = ℰ; e} | case ℰ of (C 1 [v ^1] x 1 )e 1 (C 2 [v ^2] x 2 )e 2 (ctx) e → e ′ ℰ[e] → ℰ[e ′ ] (field-access) new C (v 1 , . . . , v 𝑛 ).f 𝑖 → v 𝑖 fields(C ) = C 1 f 1 ; . . . C 𝑛 f 𝑛 ; 𝑖 ∈ 1..𝑛 (invk) new C (vs).m(v 1 , . . . , v 𝑛 ) → e ′ mbody(C , m) = (x 1 . . . x 𝑛 , e) e ′ = e[new C (vs)/this][v 1 /x 1 ] . . . [v 𝑛 /x 𝑛 ] (block) {C [v ^] x = v ; e} → e[v /x ] (case-1) case new C (vs) of (C 1 [v ^1] x 1 )e 1 (C 2 [v ^2] x 2 )e 2 → e 1 [new C (vs)/x 1 ] C ≤ C 1 (case-2) case new C (vs) of (C 1 [v ^1] x 1 )e 1 (C 2 [v ^2] x 2 )e 2 → e 2 [new C (vs)/x 2 ] C ̸ ≤ C 1 C ≤ C 2</formula><p>A block expression consists of the declaration of a local variable, and the body in which this variable can be used. A variable declaration specifies a type (a class name C ), an initialization expression e, and a coeffect annotation v ^, which is syntactically a value<ref type="foot" target="#foot_0">1</ref> ; however, we use the meta-variable v ^rather than v to suggest that it is expected to be a value of a coeffect class. The syntax of coeffect annotations is inspired by that used in Granule <ref type="bibr" target="#b5">[6]</ref>.</p><p>A typecase expression consists of an initial expression e, and two alternatives, each one specifying a local variable with its type and coeffect annotation, and an expression. Expression e 1 is executed if the result of the initial expression has a subtype of C 1 , with x 1 bound to such result; otherwise, expression e 2 is executed, with x 2 bound to the result, provided that it has a subtype of C 2 . This second check is guaranteed to always succeed by the type system.</p><p>Reduction rules in Fig. <ref type="figure" target="#fig_0">1</ref> are straightforward. To be concise, the class table is abstractly modeled as follows, omitting its (standard) syntax:</p><p>• ≤ is the subtyping relation (the reflexive and transitive closure of the extends relation) • fields(C ) gives, for each class C , the sequence of fields with their types, the inherited first • mbody(C , m) gives, for each method m of class C , parameters and body.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Type System</head><p>The type system uses coeffects c ::= n | v ^, with n ∈ N, and v ^user-defined coeffect, that is, value expected to be of a coeffect class.</p><p>The typing judgment has shape Γ ⊢ e : C , where Γ is a (type-and-coeffect) context, that is, a (finite) map from variables to pairs of a coeffect and a type (class name), written Γ = x 1 : c 1 C 1 , . . . , x 𝑛 : c𝑛 C 𝑛 . Equivalently, Γ can be seen as the pair of a coeffect context and a type context, maps from variables to coeffects and types, respectively, with the same domain.</p><p>As customary in type-and-coeffect systems, in typing rules contexts are combined by means of some operations, which are, in turn, defined in terms of the corresponding operations on coeffects. We first define the operations on contexts, then we show the typing rules, and finally we define how the assumed operations on coeffects are derived from user-defined methods in coeffect classes.</p><p>The operations on contexts are the following: </p><formula xml:id="formula_1">Sup ∅ ∨ Γ = Γ (x : c C , Γ) ∨ Δ = x : c C , (Γ ∨ Δ) if x / ∈ dom(Δ) (x : c C , Γ) ∨ (x : c ′ C , Δ) = x : c∨c ′ C , (Γ ∨ Δ) Partial order (x : c C , Γ) ≤ (x : c ′ C , Δ) if c ′ ≤ c and Γ ≤ Δ Sum ∅+Γ = Γ (x : c C , Γ)+Δ = x : c C , (Γ+Δ) if x / ∈ dom(Δ) (x : c C , Γ)+(x : c ′ C , Δ) = x : c+c ′ C , (Γ+Δ) (t-sub) Γ ⊢ e : C ′ Γ ⊢ e : C C ′ ≤ C (t-var) (0×Γ) + x : 1 C ⊢ x : C (t-field-access) Γ ⊢ e : C Γ ⊢ e.f 𝑖 : C 𝑖 fields(C ) = C 1 f 1 ; . . . C 𝑛 f 𝑛 ; 𝑖 ∈ 1..𝑛 (t-new) Γ 𝑖 ⊢ e 𝑖 : C 𝑖 ∀𝑖 ∈ 1..𝑛 Γ 1 + . . . +Γ 𝑛 ⊢ new C (e 1 , . . . , e 𝑛 ) : C fields(C ) = C 1 f 1 ; . . . C 𝑛 f 𝑛 ; (t-invk) Γ 0 ⊢ e 0 : C Γ 𝑖 ⊢ e 𝑖 : C 𝑖 ∀𝑖 ∈ 1..𝑛 (c ′ 0 ×Γ 0 )+ . . . +(c ′ 𝑛 ×Γ 𝑛 ) ⊢ e 0 .m(e 1 , . . . , e 𝑛 ) : C mtype(C , m) = v ^0, C v ^1 1 . . . C v ^𝑛 𝑛 → C c ′ 𝑖 = v ^𝑖∨1 ∀𝑖 ∈ 0..𝑛 (t-block) ∅ ⊢ v ^: Coeffect Γ ⊢ e : C Γ ′ , x : c C ⊢ e ′ : C ′ (c ′ ×Γ)+Γ ′ ⊢ {C [v ^] x = e; e ′ } : C ′ c ≤ v ĉ′ = v ^∨1 (t-case) ∅ ⊢ v ^𝑖 : Coeffect ∀𝑖 ∈ 1..2 Γ ⊢ e : C Γ 𝑖 , x : c𝑖 C 𝑖 ⊢ e 𝑖 : C ′ ∀𝑖 ∈ 1..2 (c ′ 1 ∨c ′ 2 )×Γ+(Γ 1 ∨ Γ 2 ) ⊢ case e of (C 1 [v ^1] x 1 )e 1 (C 2 [v ^2] x 2 )e 2 : C ′ C ̸ ≤ C 1 implies C ≤ C 2 c 𝑖 ≤ v ^𝑖 ∀𝑖 ∈ 1..2 c ′ 𝑖 = v ^𝑖∨1 ∀𝑖 ∈ 1..2</formula></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Scalar multiplication</head><formula xml:id="formula_2">c×∅ = ∅ c×(x : c ′ C , Γ) = x : c×c ′ C ,<label>(c×Γ)</label></formula><p>As the reader can note, operations on coeffect contexts are obtained by pointwise application of the corresponding operations on coeffects, and then they are lifted to type-and-coeffect contexts.</p><p>In this lifting, sum becomes partial since a variable in the domain of both contexts is required to have the same type.</p><p>The typing rules are given in Fig. <ref type="figure" target="#fig_1">2</ref>. In the subsumption rule (t-sub), the type can be made more general, as usual. The context could, symmetrically, be made more specific (Γ ≤ Γ ′ ), by pointwise overapproximating coeffects; however, to stress that they can be actually computed bottom-up, we prefer a presentation where overapproximation of coeffects is an explicit side condition of the rules where it is needed, see rules (t-block) and (t-case).</p><p>In rule (t-var), the given variable is used exactly once. In rules (t-field-access) and (t-new), coeffects of the subterms are summed.</p><p>In rule (t-invk), the coeffects of the arguments are summed, after multiplying each of them with the sup (greatest lower bound) of the coeffect annotation of the corresponding parameter, and the one coeffect. The sup with the one coeffect guarantees to take into account the coeffects of the initialization expression for parameters not used in the body, see the last part of Example 2 in Sect. 4. This is customary in type-and-coeffect systems for call-by-value calculi. The rule uses the auxiliary function mtype which returns an enriched method type, where the types of the parameters and of this have coeffect annotations. Such coeffect annotations should have a coeffect class as type.</p><formula xml:id="formula_3">Formally, if mtype(C , m) = v ^0, C v ^1 1 . . . C v ^𝑛 𝑛 → C , then ∅ ⊢ v ^𝑖 :</formula><p>Coeffect for 𝑖 ∈ 0..𝑛. Moreover, mtype(C , m) and mbody(C , m) should be either both undefined or both defined with the same number of parameters; in the latter case, the method body should be well-typed with respect to the method type, notably by typechecking the method body we should get coeffects which are (overapproximated by) those specified in the annotations. Formally, if mbody(C , m) = (x 1 . . . x 𝑛 , e), and mtype</p><formula xml:id="formula_4">(C , m) = v ^0, C v ^1 1 . . . C v ^𝑛 𝑛 → C , the following condition must hold: (t-meth) this : c 0 C , x 1 : c 1 C 1 , . . . , x 𝑛 : c𝑛 C 𝑛 ⊢ e : C c 𝑖 ≤ v ^𝑖 ∀𝑖 ∈ 0..𝑛</formula><p>In rule (t-block), the coeffects of the initialization expression are multiplied by the sup of the coeffect annotation of the variable, and the one coeffect, and then summed with those of the body. Analogously to method invocation, the sup with the one coeffect is needed when the variable is not used in the body. The side condition c ≤ v ^checks that the variable is used in the body accordingly with the annotation v ^written by the programmer. The premise ∅ ⊢ v ^: Coeffect checks that v ^is a user-defined coeffect. In rule (t-case), coeffects are handled analogously as in rule (t-block). The first side-condition ensures that the cases are exhaustive.</p><p>We describe now how operations on coeffects are derived from user-defined methods in the coeffect classes. The predefined class Coeffect is defined as follows:</p><formula xml:id="formula_5">class Coeffect { Coeffect sup(Coeffect c) { new Coeffect() } Coeffect sum(Coeffect c) { new Coeffect() } Coeffect mult(Coeffect c) { new Coeffect() } Coeffect zero() { new Coeffect() } Coeffect one() { new Coeffect() } }</formula><p>Being subclasses of Coeffect, coeffect classes implement the above methods, corresponding to the expected operations on coeffects: sup, sum, multiplication, zero, and one. In the class Coeffect, such operations are those of the trivial semiring consisting of only one element.</p><p>Let nf(e) denote the normal form of e. The normal form, if any, is unique, since it is easy to see that the reduction relation is deterministic. Moreover, we assume that methods sup, sum, mult, zero, and one in coeffect classes always terminate, so that normal forms in the definitions below are defined.</p><p>Recall that coeffects are either natural numbers or user-defined coeffects (values of a coeffect class). Natural numbers are internally used<ref type="foot" target="#foot_1">2</ref> by the type system, notably in rule (t-var) which is independent from coeffect classes in the program. As a consequence, operations on coeffects derived from user-defined methods need to handle natural numbers as well. This is achieved through a translation into user-defined coeffects, which corresponds to the unique homomorphism from the initial semiring to another one. That is, in v ^(n ) is the user-defined coeffect corresponding to n in the class of v ^, defined by:</p><formula xml:id="formula_6">in v ^(0) = nf(v ^.zero()) in v ^(1) = nf(v ^.one()) in v ^(n + 1) = nf(in v ^(n ).sum(v ^.one())) for n ≥ 1</formula><p>We can now define operations on coeffects. To avoid confusion, standard operations on natural numbers have the explicit subscript N.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Sup</head><formula xml:id="formula_7">v ^∨n = nf(v ^.sup(in v ^(n ))) n∨v ^= nf(in v ^(n ).sup(v ^)) v ^1∨v ^2 = nf(v ^1.sup(v ^2)) n 1 ∨n 2 = max N (n 1 , n 2 ) Sum v ^+ n = nf(v ^.sum(in v ^(n ))) n + v ^= nf(in v ^(n ).sum(v ^)) v ^1 + v ^2 = nf(v ^1.sum(v ^2)) n 1 + n 2 = n 1 + N n 2 Multiplication v ^× n = nf(v ^.mul(in v ^(n ))) n × v ^= nf(in v ^(n ).mul(v ^)) v ^1 × v ^2 = nf(v ^1.mul(v ^2)) n 1 × n 2 = n 1 × N n 2</formula><p>Note that the order ≤ on coeffects can be derived from the ∨ operator, as follows:</p><formula xml:id="formula_8">c 1 ≤ c 2 iff c 1 ∨c 2 = c 2 .</formula><p>We prefer to implement the sup operator, rather than the order, in coeffect classes, since the latter would require to include the primitive type boolean in the calculus.</p><p>Our main technical result is subject reduction (Theorem 1), expressing, as customary in type-and-coeffect systems, that not only types, but also coeffects are preserved by reduction. As expected, to prove this property we need, as in proofs in the literature, assumptions on operations derived from user-defined methods, corresponding to have a semiring (1-8) with an additional order-theoretic structure (9-15). Ensuring such properties is in charge of the programmer, possibily using some verification tool.</p><p>Assumptions 1. For all user-defined coeffects v ^1, v ^2, v ^3:</p><formula xml:id="formula_9">1. v ^1 + v ^2 = v ^2 + v ^1 2. v ^1 + (v ^2 + v ^3) = (v ^1 + v ^2) + v ^3 3. v ^1 + 0 = v ^1 4. v ^1 × 1 = 1 × v ^1 = v ^1 5. v ^1 × 0 = 0 × v ^1 = 0 6. v ^1 × (v ^2 × v ^3) = (v ^1 × v ^2) × v ^3 7. v ^1×(v ^2+v ^3) = v ^1×v ^2+v ^1×v ^3 8. (v ^1+v ^2)×v ^3 = v ^1×v ^3+v ^2×v ^3 9. v ^1 ∨ v ^1 = v ^1 10. v ^1 ∨ (v ^2 ∨ v ^3) = (v ^1 ∨ v ^2) ∨ v ^3 11. v ^1 ∨ v ^2 = v ^2 ∨ v ^1 12. v ^1 ∨ (v ^1 + v ^2) = (v ^1 + v ^2) 13. v ^1 + (v ^2 ∨ v ^3) = (v ^1 + v ^2) ∨ (v ^1 + v ^3) 14. v ^1 × (v ^2 ∨ v ^3) = (v ^1 × v ^2) ∨ (v ^1 × v ^3) 15. (v ^2 ∨ v ^3) × v ^1 = (v ^2 × v ^1) ∨ (v ^3 × v ^1)</formula><p>The proof of Theorem 1 uses the standard lemmas of inversion for expressions and contexts (Lemmas 1 and 2), and substitution in evaluation contexts and terms (Lemmas 3 and 4).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Lemma 1 (Inversion).</head><p>1.  Proof 3. By induction on the reduction relation. We show some significant cases.</p><formula xml:id="formula_10">If Γ ⊢ x : C , then Γ = (0×Γ ′ ) + x : 1 C for some Γ ′ . 2. If Γ ⊢ e.</formula><formula xml:id="formula_11">Γ 0 ⊢ e 0 : C , mtype(C , m) = v ^0, C v ^1 1 . . . C v ^𝑛 𝑛 → C , c ′ 𝑖 = v ^𝑖 ∨ 1 for all 𝑖 ∈ 0..𝑛, Γ 𝑖 ⊢ e 𝑖 : C 𝑖 for all 𝑖 ∈ 1..𝑛 and Γ = (c ′ 0 × Γ 0 ) + (c ′ 1 × Γ 1 ) + . . . + (c ′ 𝑛 × Γ 𝑛 ). 5. If Γ ⊢ {C [v ^] x = e; e ′ } : C ′ , then we have ∅ ⊢ v ^: Coeffect and Γ = c ′ × Δ ′ + Γ ′ where c ′ = v ^∨ 1, c ≤ v ^and Δ ′ ⊢ e : C and Γ ′ , x : c C ′ ⊢ e ′ : C ′ . 6. If Γ ⊢ case e of (C 1 [v ^1] x 1 )e 1 (C 2 [v ^2] x 2 )e 2 : C then we have Γ = (c ′ 1 ∨c ′ 2 )×Γ ′ +(Γ 1 ∨ Γ 2 ), ∅ ⊢ v ^𝑖 : Coeffect for 𝑖 ∈ 1..2, Γ ′ ⊢ e : C , Γ 𝑖 , x : c 𝑖 C 𝑖 ⊢ e 𝑖 : C ′ for 𝑖 ∈ 1..2, C ̸ ≤ C 1 implies C ≤ C 2 , c 𝑖 ≤ v ^𝑖 for 𝑖 ∈ 1..2 and c ′ 𝑖 = v ^𝑖∨1 for 𝑖 ∈ 1..2.</formula></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Lemma 2 (Context Inversion</head><p>(ctx) By Lemma 2 we have</p><formula xml:id="formula_12">Γ ′ + x : v ^C ′ ⊢ ℰ[x ] : C , Δ ⊢ e : C ′ and Γ = Γ ′ + v ^× Δ. By induction hypothesis we derive Δ ⊢ e ′ : C ′ . By Lemma 3 we derive Γ ′ + v ^× Δ ⊢ ℰ[e ′ ] : C , that is, Γ ⊢ ℰ[e ′ ] : C . (field-access) By Lemma 1(2) we have Γ ⊢ new C (v 1 , . . . , v 𝑛 ) : C and fields(C ) = C 1 f 1 ; . . . C 𝑛 f 𝑛 ; with C 𝑖 = C . By Lemma 1(3) we have fields(C ) = C 1 f 1 ; . . . C 𝑛 f 𝑛 ;, Γ 𝑗 ⊢ v ^𝑗 : C 𝑗 for all 𝑗 ∈ 1.</formula><p>.𝑛 and Γ = Γ 1 + . . . + Γ 𝑛 . We know that 𝑖 ∈ 1...𝑛, v ^𝑖 = e ′ and Γ 𝑖 ⊢ e ′ : C . By Assumptions <ref type="bibr" target="#b11">(12)</ref> and <ref type="bibr" target="#b9">(10)</ref> we know Γ ≤ Γ 𝑖 , so we have the thesis .</p><p>(block) By Lemma 1 <ref type="bibr" target="#b4">(5)</ref> we have ⊢ v ^: </p><formula xml:id="formula_13">Coeffect, Γ = Γ ′ + c ′ × Δ ′ where c ′ = v ^∨ 1, c ≤ v ^, Δ ′ ⊢ e : C and Γ ′ , x : c C ′ ⊢ e ′ : C ′ . Applying Lemma 4 we derive Γ ′ + c ′ × Δ ′ ⊢ e 2 [</formula></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">Examples</head><p>We use as syntactic sugar case expressions with more than two alternatives, which can be easily encoded in the calculus. Moreover, variable declarations with no coeffect annotation are assumed to have a new Coeffect() coeffect. Some other simplifications in code are explained when used. Coeffect annotations are emphasized in grey to help the reader.</p><p>Example 1. Linearity As first example we show how to implement the classical coeffect system mentioned in the Introduction, which traces when a variable is either not used (coeffect 0), or used linearly (that is, exactly once, coeffect 1), or used in an unrestricted way (coeffect 𝜔). Let us see some examples of how the type system works. To check that, e.g., the method duplicate is well-typed, we have to typecheck the method body, and then verify the condition (t-meth) at page 5. A type derivation for the method body is as follows:</p><formula xml:id="formula_14">(t-new) (t-var) this : 1 A ⊢ this : A (t-var)</formula><p>this : 1 A ⊢ this : A this : 2 A ⊢ new Pair(this, this) : Pair Set 𝜔 = new Omega(). The condition (t-meth) requires this : 𝜔 A ≤ this : 2 A, and this holds since we can derive 2 ≤ 𝜔 from</p><formula xml:id="formula_15">• 2 ∨ 𝜔 = nf(in 𝜔 (2).sup(𝜔)) • in 𝜔 (2) = nf((𝜔.zero().sum(𝜔.one())).sum(𝜔.one())) = 𝜔 • nf(𝜔.sup(𝜔)) = 𝜔</formula><p>If the expression new Pair(this, this).fst was the body of method identity, instead, then the method would be ill-typed. Indeed, we would have a similar derivation:</p><formula xml:id="formula_16">(t-field-access) (t-new) (t-var) this : 1 A ⊢ this : A (t-var)</formula><p>this : 1 A ⊢ this : A this : 2 A ⊢ new Pair(this, this) : Pair this : 2 A ⊢ new Pair(this, this).fst : A However, this : new One() A ≤ this : 2 A does not hold, since 2 ≰ new One():</p><formula xml:id="formula_17">• 2 ∨ new One() = nf(in new One() (2).sup(new One())) • in new One() (2) =</formula><p>nf((new One().zero().sum(new One().one())).sum(new One().one())) = 𝜔</p><p>• nf(𝜔.sup(new One())) = 𝜔 A call of duplicate can be typed as shown below:</p><p>(t-new) (t-var)</p><p>x : We can see that natural numbers are translated into user-defined linearity coeffects when coeffect operations occur in the derivation.</p><formula xml:id="formula_18">1 A ⊢ x : A (t-var) y : 1 A ⊢ y : A (t-field-access) x : 1 A, y : 1 A ⊢ new Pair(x ,</formula><p>Finally, we show an example motivating that in rules (t-invk), (t-block), and (t-case) the sup with 1 is needed. For instance, in this way we can derive the judgment y : 𝜔 A ⊢ {Pair[new Zero()] x = y.duplicate; new A()} : A.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Example 3. Product of coeffects</head><p>The following example shows that, besides single coeffect classes, the programmer can also define general constructions. The class Product implements coeffects which are the product of two arbitrary coeffects. Example 4. Sessions Finally, we show a more significant programming example, which also uses the coeffect type Level, providing a way to specify the privacy level of data. In this case, the coeffects form a three point lattice: Public, Private and Irrelevant with zero being Irrelevant, one being Private and order Irrelevant≤Private≤Public. Sum is the sup and product is defined by</p><formula xml:id="formula_19">c 1 × c 2 =Irrelevant if either c 1 =Irrelevant or c 2 =Irrelevant, otherwise c 1 × c 2 = c 1 ∨ c 2 .</formula><p>It is easy to write the Level classes which implement the previous definitions.</p><p>The example illustrates how binary sessions could be implemented using our coeffect annotations. We take inspiration from the encoding of sessions into the 𝜋-calculus with variants and linear I/O types of <ref type="bibr" target="#b9">[10]</ref>. We assume to have the following classes implementing linear input and output channels over which we can send a message and, if needed, some private data. The linearity of the channel is expressed by annotating the receiver of the send and receive methods with the One coeffect of the Linearity coeffects. The send method of the class OutPrivChannel takes as input, in addition to the message and the data to be sent, an input channel that will be used, by whoever is sending the message, to wait for the answer to the sent message. On the other side, the rcv method of class InPrivChannel returns a message, a data and an output channel<ref type="foot" target="#foot_2">3</ref> that will be used, by whoever received the message, to continue the conversation. The </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">Conclusion</head><p>We proposed a Java-like calculus supporting, in variable declarations, coeffect annotations, allowing to express how such variables should be used. Thanks to the inheritance mechanism of OO languages, programmers are able to define their own coeffect annotations. Indeed, they are expressions of (subclasses of) Coeffect, a predefined class which can be extended by user-defined subclasses, similarly to Java exceptions which are expressions of (subclasses of) Exception. We formally defined the type system and proved subject reduction, which includes preservation of coeffects, and provided several examples. There are many interesting directions for further work. The most natural development is adding graded modal types. Indeed, a limitation of the current proposal is that, whereas it is possible to specify how a variable should be used (e.g., a parameter should be used at most once in a method's body), it is not possible to do the same for the result of an expression (e.g., the result of a method). Graded modal types, which are, roughly, types annotated with coeffects (grades) <ref type="bibr" target="#b1">[2,</ref><ref type="bibr" target="#b5">6,</ref><ref type="bibr" target="#b7">8]</ref>, also similar to types annotated with modifiers or capabilities <ref type="bibr" target="#b10">[11,</ref><ref type="bibr" target="#b11">12,</ref><ref type="bibr" target="#b12">13]</ref>, would allow to overcome this limitation.</p><p>Coeffects considered in this paper are structural, in the sense that they are expressed and computed on a per-variable basis. However, in some cases the coeffect, expressing how an expression uses external resources, cannot be captured by just assigning independent scalar coeffects to single variables, but should be assigned to the whole context <ref type="bibr" target="#b0">[1]</ref>. In our work, this would correspond to allow a "global" annotation in a method's signature.</p><p>Finally, expressive power could be added by allowing variables in coeffect annotations, so to specify, e.g., that a variable should be used no more than a certain number computed at runtime. This approach would require first the study of dependent coeffects on the foundational side, which, to the best of our knowledge, have not been developed yet.</p><p>On the more applicative side, we could investigate how the proposal scales to realistic subsets of Java. Implementations could use in a parametric way auxiliary tools, notably a termination checker to prevent divergence in methods implementing coeffect operations, and/or a verifier to ensure that they provide the required properties (assumptions at page 6).</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>Figure 1 :</head><label>1</label><figDesc>Figure 1: Calculus</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>Figure 2 :</head><label>2</label><figDesc>Figure 2: Coeffect system with user defined coeffects</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head></head><label></label><figDesc>f 𝑖 : C , then we have Γ ⊢ e : C and fields(C ) = C 1 f 1 ; . . . C 𝑛 f 𝑛 ; and C 𝑖 = C . 3. If Γ ⊢ new C (e 1 , . . . , e 𝑛 ) : C , then we have fields(C ) = C 1 f 1 ; . . . C 𝑛 f 𝑛 ;, Γ 𝑖 ⊢ e 𝑖 : C 𝑖 for all 𝑖 ∈ 1..𝑛 and Γ = Γ 1 + . . . + Γ 𝑛 . 4. If Γ ⊢ e 0 .m(e 1 , . . . , e 𝑛 ) : C , then we have</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_3"><head>Proof 1 .Lemma 3 (Proof 2 .Lemma 4 (Theorem 1 .</head><label>13241</label><figDesc>). If Γ ⊢ ℰ[e] : C , then Γ ′ +x : c C ′ ⊢ ℰ[x ] : C and Δ ⊢ e : C ′ for some Γ ′ , Δ, x ̸ ∈ dom(Γ), c and C ′ such that Γ = Γ ′ + c × Δ. By induction on ℰ. Context Substitution). If Δ ⊢ e : C ′ and Γ + x : c C ′ ⊢ ℰ[x ] : C , with x / ∈ dom(Γ), then Γ + c × Δ ⊢ ℰ[e] : C . By induction on the derivation of Γ + x : v ^C ⊢ ℰ[x ] : C ′ . Substitution). If Δ ⊢ e ′ : C ′ and Γ, x : c C ′ ⊢ e : 𝑇 then Γ + c × Δ ⊢ e[e ′ /x ] : C . If Γ ⊢ e : C and e → e ′ , then Γ ′ ⊢ e ′ : C such that Γ ≤ Γ ′ .</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_4"><head></head><label></label><figDesc>e 1 /x ] : C ′ . Applying Assumption (14) we derive the thesis.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_5"><head>Example 2 .</head><label>2</label><figDesc>Using linearity coeffects After declaring the above coeffect classes, the programmer can use them in annotations, as in the simple example below, where they are used for the annotation of this, written between the method name and the list of parameters. class Pair { A fst; A snd; } class A { A drop [new Zero()] () {new A()} A identity [new One()] () {this} Pair duplicate [new Omega()] () { new Pair(this,this)} }</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_6"><head></head><label></label><figDesc>y) : Pair (t-invk) x : 1 A, y : 1 A ⊢ new Pair(x , y).fst : A x : 𝜔 A, y : 𝜔 A ⊢ new Pair(x , y).fst.duplicate() : Pair where mtype(A, dup) = 𝜔, 𝜖 → Pair, 𝜔 = 𝜔 ∨ 1, and 𝜔 = 𝜔 × 1.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_7"><head></head><label></label><figDesc>new One()] (Msg msg,OptData [new Private()] data, InPrivChannel [new One()] cont) {...} } class InPrivChannel{ (Msg,OptData,OutPrivChannel) rcv [new One()] (OutPrivChannel [new One()] cont) {...} } class Unit{ } class OptData{ } class Some extends OptData{A inf;} class None extends OptData{ } class Msg { } class NextData extends Msg{ } class Stop extends Msg{ } class OK extends Msg{ } class KO extends Msg{ }</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_8"><head></head><label></label><figDesc>OutPrivChannel [new One()] outCh = new OutPrivChannel(); InPrivChannel [new One()] inCh = new InPrivChannel(); new Client().main(outCh) | new Server().main(inCh)</figDesc></figure>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0">Coeffect annotations could be generalized to be arbitrary expressions; here we use this simpler assumption to make the presentation lighter.</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_1">Derivations in Example 2 illustrate their interplay with user-defined coeffects.</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="3" xml:id="foot_2">To simplify the code we allow the method to return a triple here.</note>
		</body>
		<back>

			<div type="acknowledgement">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Acknowledgments</head><p>The authors thank the anonymous referees who provided useful and detailed comments. This work was partially funded by the MUR project "T-LADIES" (PRIN 2020TL3X8X).</p></div>
			</div>

			<div type="annex">
<div xmlns="http://www.tei-c.org/ns/1.0"><p>message does not have a coeffect as this is irrelevant.</p><p>The class Server that follows implements a server which waits for a message that can be either NextData or Stop. In the first case, the server sends to whoever sent the message the message OK, processes the data, and goes back to waiting for a message. In the second case, it stops returning OK (we use this message also to signal that the protocol ended successfully). If it receives any other message, the server stops returning KO, meaning failure of the exchange. Note that the server receives the initial message from the client on the channel which is the parameter of the method. After receiving the message the channel cannot be used any longer. A client of the previous server sends a data to the server and then, if the response of the server is OK, either sends a NextData or a Stop message. If the response is not OK the client returns KO, meaning failure of the exchange. The client above sends just one data, however clients could interact with the server sending more data. As for the server, the initial message of the client is sent on the channel which is the parameter of the method, and then a new pair of channels is generated and used for the successive interaction.</p><p>The computation of the server and the client is started by sending an output channel to the client and an input channel to the server. The fact that the channels are linear ensures that they will be used to realise the wanted binary session. Assuming to have a parallel composition operator, the server and the client can be started as follows.</p></div>			</div>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">Coeffects: a calculus of context-dependent computation</title>
		<author>
			<persName><forename type="first">T</forename><surname>Petricek</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><forename type="middle">A</forename><surname>Orchard</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Mycroft</surname></persName>
		</author>
		<idno type="DOI">10.1145/2628136.2628160</idno>
	</analytic>
	<monogr>
		<title level="m">ACM International Conference on Functional Programming, ICFP 2014</title>
				<editor>
			<persName><forename type="first">J</forename><surname>Jeuring</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">M</forename><forename type="middle">M T</forename><surname>Chakravarty</surname></persName>
		</editor>
		<imprint>
			<publisher>ACM Press</publisher>
			<date type="published" when="2014">2014</date>
			<biblScope unit="page" from="123" to="135" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">A core quantitative coeffect calculus</title>
		<author>
			<persName><forename type="first">A</forename><surname>Brunel</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Gaboardi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Mazza</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Zdancewic</surname></persName>
		</author>
		<idno type="DOI">10.1007/978-3-642-54833-8_19</idno>
	</analytic>
	<monogr>
		<title level="m">European Symposium on Programming, ESOP 2013</title>
		<title level="s">Lecture Notes in Computer Science</title>
		<editor>
			<persName><forename type="first">Z</forename><surname>Shao</surname></persName>
		</editor>
		<imprint>
			<publisher>Springer</publisher>
			<date type="published" when="2014">2014</date>
			<biblScope unit="volume">8410</biblScope>
			<biblScope unit="page" from="351" to="370" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">Syntax and semantics of quantitative type theory</title>
		<author>
			<persName><forename type="first">R</forename><surname>Atkey</surname></persName>
		</author>
		<idno type="DOI">10.1145/3209108.3209189</idno>
	</analytic>
	<monogr>
		<title level="m">IEEE Symposium on Logic in Computer Science, LICS 2018</title>
				<editor>
			<persName><forename type="first">A</forename><surname>Dawar</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">E</forename><surname>Grädel</surname></persName>
		</editor>
		<imprint>
			<publisher>ACM Press</publisher>
			<date type="published" when="2018">2018</date>
			<biblScope unit="page" from="56" to="65" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">Combining effects and coeffects via grading</title>
		<author>
			<persName><forename type="first">M</forename><surname>Gaboardi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Katsumata</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><forename type="middle">A</forename><surname>Orchard</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><surname>Breuvart</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Uustalu</surname></persName>
		</author>
		<idno type="DOI">10.1145/2951913.2951939</idno>
	</analytic>
	<monogr>
		<title level="m">ACM International Conference on Functional Programming, ICFP 2016</title>
				<editor>
			<persName><forename type="first">J</forename><surname>Garrigue</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">G</forename><surname>Keller</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">E</forename><surname>Sumii</surname></persName>
		</editor>
		<imprint>
			<publisher>ACM Press</publisher>
			<date type="published" when="2016">2016</date>
			<biblScope unit="page" from="476" to="489" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<analytic>
		<title level="a" type="main">Bounded linear types in a resource semiring</title>
		<author>
			<persName><forename type="first">D</forename><forename type="middle">R</forename><surname>Ghica</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><forename type="middle">I</forename><surname>Smith</surname></persName>
		</author>
		<idno type="DOI">10.1007/978-3-642-54833-8_18</idno>
	</analytic>
	<monogr>
		<title level="m">European Symposium on Programming, ESOP 2013</title>
		<title level="s">Lecture Notes in Computer Science</title>
		<editor>
			<persName><forename type="first">Z</forename><surname>Shao</surname></persName>
		</editor>
		<imprint>
			<publisher>Springer</publisher>
			<date type="published" when="2014">2014</date>
			<biblScope unit="volume">8410</biblScope>
			<biblScope unit="page" from="331" to="350" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">Quantitative program reasoning with graded modal types</title>
		<author>
			<persName><forename type="first">D</forename><surname>Orchard</surname></persName>
		</author>
		<author>
			<persName><forename type="first">V</forename><surname>Liepelt</surname></persName>
		</author>
		<author>
			<persName><forename type="first">H</forename><forename type="middle">E</forename><surname>Iii</surname></persName>
		</author>
		<idno type="DOI">10.1145/3341714</idno>
	</analytic>
	<monogr>
		<title level="j">Proceedings of ACM on Programming Languages</title>
		<imprint>
			<biblScope unit="volume">3</biblScope>
			<biblScope unit="page">30</biblScope>
			<date type="published" when="2019">2019</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">A graded dependent type system with a usage-aware semantics</title>
		<author>
			<persName><forename type="first">P</forename><surname>Choudhury</surname></persName>
		</author>
		<author>
			<persName><forename type="first">H</forename><forename type="middle">E</forename><surname>Iii</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><forename type="middle">A</forename><surname>Eisenberg</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Weirich</surname></persName>
		</author>
		<idno type="DOI">10.1145/3434331</idno>
	</analytic>
	<monogr>
		<title level="m">Proceedings of ACM on Programming Languages</title>
				<meeting>ACM on Programming Languages</meeting>
		<imprint>
			<date type="published" when="2021">2021</date>
			<biblScope unit="volume">5</biblScope>
			<biblScope unit="page" from="1" to="32" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<analytic>
		<title level="a" type="main">A relational theory of effects and coeffects</title>
		<author>
			<persName><forename type="first">U</forename><surname>Lago</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><surname>Gavazzo</surname></persName>
		</author>
		<idno type="DOI">10.1145/3498692</idno>
	</analytic>
	<monogr>
		<title level="m">Proceedings of ACM on Programming Languages</title>
				<meeting>ACM on Programming Languages</meeting>
		<imprint>
			<date type="published" when="2022">2022</date>
			<biblScope unit="volume">6</biblScope>
			<biblScope unit="page" from="1" to="28" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b8">
	<analytic>
		<title level="a" type="main">Union types for object-oriented programming</title>
		<author>
			<persName><forename type="first">A</forename><surname>Igarashi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">H</forename><surname>Nagira</surname></persName>
		</author>
		<idno type="DOI">10.5381/jot.2007.6.2.a3</idno>
	</analytic>
	<monogr>
		<title level="j">J. Object Technol</title>
		<imprint>
			<biblScope unit="volume">6</biblScope>
			<biblScope unit="page" from="47" to="68" />
			<date type="published" when="2007">2007</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<analytic>
		<title level="a" type="main">Session types revisited</title>
		<author>
			<persName><forename type="first">O</forename><surname>Dardha</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Giachino</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Sangiorgi</surname></persName>
		</author>
		<idno type="DOI">10.1145/2370776.2370794</idno>
	</analytic>
	<monogr>
		<title level="m">PPDP&apos;12</title>
				<editor>
			<persName><forename type="first">D</forename><forename type="middle">D</forename><surname>Schreye</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">G</forename><surname>Janssens</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">A</forename><surname>King</surname></persName>
		</editor>
		<imprint>
			<publisher>ACM</publisher>
			<date type="published" when="2012">2012</date>
			<biblScope unit="page" from="139" to="150" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b10">
	<analytic>
		<title level="a" type="main">Capabilities for uniqueness and borrowing</title>
		<author>
			<persName><forename type="first">P</forename><surname>Haller</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Odersky</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">European Conference on Object-Oriented Programming</title>
		<title level="s">Lecture Notes in Computer Science</title>
		<editor>
			<persName><forename type="first">T</forename><forename type="middle">D</forename><surname>Hondt</surname></persName>
		</editor>
		<imprint>
			<publisher>Springer</publisher>
			<date type="published" when="2010">2010. 2010</date>
			<biblScope unit="volume">6183</biblScope>
			<biblScope unit="page" from="354" to="378" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b11">
	<analytic>
		<title level="a" type="main">Uniqueness and reference immutability for safe parallelism</title>
		<author>
			<persName><forename type="first">C</forename><forename type="middle">S</forename><surname>Gordon</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">J</forename><surname>Parkinson</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Parsons</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Bromfield</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Duffy</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">ACM Symp. on Object-Oriented Programming: Systems, Languages and Applications 2012</title>
				<editor>
			<persName><forename type="first">G</forename><forename type="middle">T</forename><surname>Leavens</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">M</forename><forename type="middle">B</forename><surname>Dwyer</surname></persName>
		</editor>
		<imprint>
			<publisher>ACM Press</publisher>
			<date type="published" when="2012">2012</date>
			<biblScope unit="page" from="21" to="40" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b12">
	<analytic>
		<title level="a" type="main">Designing with static capabilities and effects: Use, mention, and invariants (pearl)</title>
		<author>
			<persName><forename type="first">C</forename><forename type="middle">S</forename><surname>Gordon</surname></persName>
		</author>
		<idno type="DOI">10.4230/LIPIcs.ECOOP.2020.10</idno>
	</analytic>
	<monogr>
		<title level="m">European Conference on Object-Oriented Programming, ECOOP 2020</title>
				<editor>
			<persName><forename type="first">R</forename><surname>Hirschfeld</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">T</forename><surname>Pape</surname></persName>
		</editor>
		<imprint>
			<publisher>Schloss Dagstuhl -Leibniz-Zentrum für Informatik</publisher>
			<date type="published" when="2020">2020</date>
			<biblScope unit="volume">166</biblScope>
			<biblScope unit="page">25</biblScope>
		</imprint>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
