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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Abadi, M., Banerjee, A., Heintze, N., Riecke, J.G.: A core calculus of dependency. In: Proceedings of POPL (1999)
Atkey, R.: Parameterised notions of computation. J. Funct. Program. 19 (2009)
Bierman, G.M., de Paiva, V.C.V.: On an intuitionistic modal logic. Studia Logica 65, 2000 (2001)
Filinski, A.: Monads in action. In: Proceedings of POPL (2010)
Gifford, D.K., Lucassen, J.M.: Integrating functional and imperative programming. In: Proceedings of Conference on LISP and func. prog., LFP 1986 (1986)
Jouvelot, P., Gifford, D.K.: Communication Effects for Message-Based Concurrency. Technical report, Massachusetts Institute of Technology (1989)
Lewis, J.R., Shields, M.B., Meijert, E., Launchbury, J.: Implicit parameters: dynamic scoping with static types. In: Proceedings of POPL, POPL 2000 (2000)
Moggi, E.: Notions of computation and monads. Inf. Comput. 93, 55–92 (1991)
Nanevski, A., Pfenning, F., Pientka, B.: Contextual modal type theory. ACM Trans. Comput. Logic 9(3), 23:1–23:49 (2008)
O’Hearn, P.: On bunched typing. J. Funct. Program. 13(4), 747–796 (2003)
Orchard, D., Mycroft, A.: A Notation for Comonads. In: Post-Proceedings of IFL 2012. LNCS. Springer, Heidelberg (2012) (to appear)
Pfenning, F., Davies, R.: A judgmental reconstruction of modal logic. Mathematical. Structures in Comp. Sci. 11(4), 511–540 (2001)
Talpin, J., Jouvelot, P.: The type and effect discipline. In: Logic in Computer Science, 1992. LICS, pp. 162–173 (1994)
Uustalu, T., Vene, V.: Comonadic Notions of Computation. Electron. Notes Theor. Comput. Sci. 203, 263–284 (2008)
Volpano, D., Irvine, C., Smith, G.: A sound type system for secure flow analysis. J. Comput. Secur. 4, 167–187 (1996)
Wadge, W.W., Ashcroft, E.A.: LUCID, the dataflow programming language. Academic Press Professional, Inc., San Diego (1985)
Wadler, P., Thiemann, P.: The marriage of effects and monads. ACM Trans. Comput. Logic 4, 1–32 (2003)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Petricek, T., Orchard, D., Mycroft, A. (2013). Coeffects: Unified Static Analysis of Context-Dependence. In: Fomin, F.V., Freivalds, R., Kwiatkowska, M., Peleg, D. (eds) Automata, Languages, and Programming. ICALP 2013. Lecture Notes in Computer Science, vol 7966. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-39212-2_35
Download citation
DOI: https://doi.org/10.1007/978-3-642-39212-2_35
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-39211-5
Online ISBN: 978-3-642-39212-2
eBook Packages: Computer ScienceComputer Science (R0)