Coeffects: unified static analysis of context-dependence

  • Authors:
  • Tomas Petricek;Dominic Orchard;Alan Mycroft

  • Affiliations:
  • University of Cambridge, UK;University of Cambridge, UK;University of Cambridge, UK

  • Venue:
  • ICALP'13 Proceedings of the 40th international conference on Automata, Languages, and Programming - Volume Part II
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

Monadic effect systems provide a unified way of tracking effects of computations, but there is no unified mechanism for tracking how computations rely on the environment in which they are executed. This is becoming an important problem for modern software --- we need to track where distributed computations run, which resources a program uses and how they use other capabilities of the environment. We consider three examples of context-dependence analysis: liveness analysis, tracking the use of implicit parameters (similar to tracking of resource usage in distributed computation), and calculating caching requirements for dataflow programs. Informed by these cases, we present a unified calculus for tracking context dependence in functional languages together with a categorical semantics based on indexed comonads. We believe that indexed comonads are the right foundation for constructing context-aware languages and type systems and that following an approach akin to monads can lead to a widespread use of the concept.