Coeffects: Unified Static Analysis of Context-Dependence

  • Tomas Petricek
  • Dominic Orchard
  • Alan Mycroft
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7966)

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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Abadi, M., Banerjee, A., Heintze, N., Riecke, J.G.: A core calculus of dependency. In: Proceedings of POPL (1999)Google Scholar
  2. 2.
    Atkey, R.: Parameterised notions of computation. J. Funct. Program. 19 (2009)Google Scholar
  3. 3.
    Bierman, G.M., de Paiva, V.C.V.: On an intuitionistic modal logic. Studia Logica 65, 2000 (2001)Google Scholar
  4. 4.
    Filinski, A.: Monads in action. In: Proceedings of POPL (2010)Google Scholar
  5. 5.
    Gifford, D.K., Lucassen, J.M.: Integrating functional and imperative programming. In: Proceedings of Conference on LISP and func. prog., LFP 1986 (1986)Google Scholar
  6. 6.
    Jouvelot, P., Gifford, D.K.: Communication Effects for Message-Based Concurrency. Technical report, Massachusetts Institute of Technology (1989)Google Scholar
  7. 7.
    Lewis, J.R., Shields, M.B., Meijert, E., Launchbury, J.: Implicit parameters: dynamic scoping with static types. In: Proceedings of POPL, POPL 2000 (2000)Google Scholar
  8. 8.
    Moggi, E.: Notions of computation and monads. Inf. Comput. 93, 55–92 (1991)MathSciNetMATHCrossRefGoogle Scholar
  9. 9.
    Nanevski, A., Pfenning, F., Pientka, B.: Contextual modal type theory. ACM Trans. Comput. Logic 9(3), 23:1–23:49 (2008)Google Scholar
  10. 10.
    O’Hearn, P.: On bunched typing. J. Funct. Program. 13(4), 747–796 (2003)MathSciNetMATHCrossRefGoogle Scholar
  11. 11.
    Orchard, D., Mycroft, A.: A Notation for Comonads. In: Post-Proceedings of IFL 2012. LNCS. Springer, Heidelberg (2012) (to appear)Google Scholar
  12. 12.
    Pfenning, F., Davies, R.: A judgmental reconstruction of modal logic. Mathematical. Structures in Comp. Sci. 11(4), 511–540 (2001)MathSciNetMATHGoogle Scholar
  13. 13.
    Talpin, J., Jouvelot, P.: The type and effect discipline. In: Logic in Computer Science, 1992. LICS, pp. 162–173 (1994)Google Scholar
  14. 14.
    Uustalu, T., Vene, V.: Comonadic Notions of Computation. Electron. Notes Theor. Comput. Sci. 203, 263–284 (2008)MathSciNetCrossRefGoogle Scholar
  15. 15.
    Volpano, D., Irvine, C., Smith, G.: A sound type system for secure flow analysis. J. Comput. Secur. 4, 167–187 (1996)Google Scholar
  16. 16.
    Wadge, W.W., Ashcroft, E.A.: LUCID, the dataflow programming language. Academic Press Professional, Inc., San Diego (1985)MATHGoogle Scholar
  17. 17.
    Wadler, P., Thiemann, P.: The marriage of effects and monads. ACM Trans. Comput. Logic 4, 1–32 (2003)MathSciNetCrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Tomas Petricek
    • 1
  • Dominic Orchard
    • 1
  • Alan Mycroft
    • 1
  1. 1.University of CambridgeUK

Personalised recommendations