Skip to main content
Kent Academic Repository

Coeffects: A calculus of context-dependent computation

Petricek, Tomas, Orchard, Dominic A., Mycroft, Alan (2014) Coeffects: A calculus of context-dependent computation. Proceedings of the 19th ACM SIGPLAN international conference on Functional programming, . pp. 123-135. ISSN 0362-1340. E-ISSN 1558-1160. (doi:10.1145/2628136.2628160) (KAR id:57493)

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
DOI/Identification number: 10.1145/2628136.2628160
Subjects: Q Science > QA Mathematics (inc Computing science) > QA 9 Formal systems, logics
Divisions: Divisions > Division of Computing, Engineering and Mathematical Sciences > School of Computing
Depositing User: Dominic Orchard
Date Deposited: 28 Sep 2016 13:02 UTC
Last Modified: 05 Nov 2024 10:47 UTC
Resource URI: https://kar.kent.ac.uk/id/eprint/57493 (The current URI for this page, for reference purposes)

University of Kent Author Information

  • Depositors only (login required):

Total unique views for this document in KAR since July 2020. For more details click on the image.