2010
DOI: 10.1007/978-3-642-11957-6_29
|View full text |Cite
|
Sign up to set email alerts
|

Stateful Contracts for Affine Types

Abstract: Abstract. Affine type systems manage resources by preventing some values from being used more than once. This offers expressiveness and performance benefits, but difficulty arises in interacting with components written in a conventional language whose type system provides no way to maintain the affine type system's aliasing invariants. We propose and implement a technique that uses behavioral contracts to mediate between code written in an affine language and code in a conventional typed language. We formalize… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
4
1

Citation Types

0
37
0

Year Published

2011
2011
2018
2018

Publication Types

Select...
5
3

Relationship

0
8

Authors

Journals

citations
Cited by 35 publications
(37 citation statements)
references
References 17 publications
0
37
0
Order By: Relevance
“…Since OCaml's type system is not substructural we are unable to distinguish between linear and unlimited types and, in particular, we are unable to prevent multiple endpoint usages solely using the type system. Following ideas of Tov and Pucella [24] and Hu and Yoshida [11] and the design of FuSe [18], the idea is to associate each endpoint with a boolean flag indicating whether the endpoint can be safely used or not. The flag is initially set to true, indicating that the endpoint can be used, and is tested by every operation that uses the endpoint.…”
Section: Basic Setupmentioning
confidence: 99%
See 1 more Smart Citation
“…Since OCaml's type system is not substructural we are unable to distinguish between linear and unlimited types and, in particular, we are unable to prevent multiple endpoint usages solely using the type system. Following ideas of Tov and Pucella [24] and Hu and Yoshida [11] and the design of FuSe [18], the idea is to associate each endpoint with a boolean flag indicating whether the endpoint can be safely used or not. The flag is initially set to true, indicating that the endpoint can be used, and is tested by every operation that uses the endpoint.…”
Section: Basic Setupmentioning
confidence: 99%
“…FuSe [18] is an OCaml implementation of binary sessions that combines static protocol enforcement with runtime checks for endpoint linearity [24,11] and resumption safety (Section 4.2). Support for sequential composition of session types based on resumptions was originally introduced in FuSe to describe iterative protocols, showing that a class of unbounded protocols could be described without resorting to (equi-)recursive types.…”
Section: Related Workmentioning
confidence: 99%
“…In this sense, our contracts conform to the definition of "chaperone contracts" given by Strickland et al [2012], where chaperones are not allowed to affect the behavior of monitored objects. Tov and Pucella [2010] use stateful contracts for controlling the usage of affine functions (functions that can be applied at most once) when these flow into a region of the program that uses a conventional (i.e., non substructural) type system. Projections and Duality.…”
Section: Related Workmentioning
confidence: 99%
“…Tov and Pucella [Tov and Pucella 2010] have recently shown how to use behavioral contracts to link code written in an affine language to code written in a conventionally typed language. The idea is to coerce affine values to non-affine ones that can be shared with the context, but can still be reasoned about safely using dynamic access counts.…”
Section: Related Workmentioning
confidence: 99%