Coeffects: A calculus of context-dependent computation

Petricek, Tomas and Orchard, Dominic A. and Mycroft, Alan (2014) Coeffects: A calculus of context-dependent computation. Proceedings of the 19th ACM SIGPLAN international conference on Functional programming, 49 (9). pp. 123-135. ISSN 0362-1340. E-ISSN 1558-1160. (doi:https://doi.org/10.1145/2692915.2628160) (Full text available)

PDF - Pre-print
Download (352kB) Preview
[img]
Preview
Official URL
http://dx.doi.org/10.1145/2692915.2628160

Abstract

The notion of context in functional languages no longer refers just to variables in scope. Context can capture additional properties of variables (usage patterns in linear logics; caching requirements in dataflow languages) as well as additional resources or properties of the execution environment (rebindable resources; platform version in a cross-platform application). The recently introduced notion of coeffects captures the latter, whole-context properties, but it failed to capture fine-grained per-variable properties. We remedy this by developing a generalized coeffect system with annotations indexed by a coeffect shape. By instantiating a concrete shape, our system captures previously studied flat (whole-context) coeffects, but also structural (per-variable) coeffects, making coeffect analyses more useful. We show that the structural system enjoys desirable syntactic properties and we give a categorical semantics using extended notions of indexed comonad. The examples presented in this paper are based on analysis of established language features (liveness, linear logics, dataflow, dynamic scoping) and we argue that such context-aware properties will also be useful for future development of languages for increasingly heterogeneous and distributed platforms.

Item Type: Article
Subjects: Q Science > QA Mathematics (inc Computing science) > QA 9 Formal systems, logics
Divisions: Faculties > Sciences > School of Computing > Programming Languages and Systems Group
Depositing User: Dominic Orchard
Date Deposited: 28 Sep 2016 13:02 UTC
Last Modified: 17 Jan 2017 21:19 UTC
Resource URI: https://kar.kent.ac.uk/id/eprint/57493 (The current URI for this page, for reference purposes)
Orchard, Dominic A.: https://orcid.org/0000-0002-7058-7842
  • Depositors only (login required):

Downloads

Downloads per month over past year