skip to main content
research-article

A theory of gradual effect systems

Published:19 August 2014Publication History
Skip Abstract Section

Abstract

Effect systems have the potential to help software developers, but their practical adoption has been very limited. We conjecture that this limited adoption is due in part to the difficulty of transitioning from a system where effects are implicit and unrestricted to a system with a static effect discipline, which must settle for conservative checking in order to be decidable. To address this hindrance, we develop a theory of gradual effect checking, which makes it possible to incrementally annotate and statically check effects, while still rejecting statically inconsistent programs. We extend the generic type-and-effect framework of Marino and Millstein with a notion of unknown effects, which turns out to be significantly more subtle than unknown types in traditional gradual typing. We appeal to abstract interpretation to develop and validate the concepts of gradual effect checking. We also demonstrate how an effect system formulated in Marino and Millstein's framework can be automatically extended to support gradual checking.

References

  1. M. Abadi, C. Flanagan, and S. N. Freund. Types for safe locking: Static race detection for Java. ACM Transactions on Programming Languages and Systems, 28(2):207--255, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. M. Abadi, A. Birrell, T. Harris, and M. Isard. Semantics of transactional memory and automatic mutual exclusion. In Proceedings of the 35th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2008), pages 63--74, San Francisco, CA, USA, Jan. 2008. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. N. Benton and P. Buchlovsky. Semantics of an effect analysis for exceptions. In Proceedings of the 2007 ACM SIGPLAN International Workshop on Types in Languages Design and Implementation (TLDI 07), pages 15--26, New York, NY, USA, 2007. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. P. Cousot and R. Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Conference Record of the 4th ACM Symposium on Principles of Programming Languages (POPL 77), pages 238--252, Los Angeles, CA, USA, Jan. 1977. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. P. Cousot and R. Cousot. Systematic design of program analysis frameworks. In Proceedings of the 6th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL 79), pages 269--282, New York, NY, USA, 1979. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. T. Disney and C. Flanagan. Gradual information flow typing. In International Workshop on Scripts to Programs, 2011.Google ScholarGoogle Scholar
  7. T. Disney, C. Flanagan, and J. McCarthy. Temporal higher-order contracts. In Proceedings of the 16th ACM SIGPLAN Conference on Functional Programming (ICFP 2011), pages 176--188, Tokyo, Japan, Sept. 2011. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. R. B. Findler and M. Felleisen. Contracts for higher-order functions. In Proceedings of the 7th ACM SIGPLAN International Conference on Functional Programming, pages 48--59, Pittsburgh, PA, USA, October 2002. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. R. B. Findler and M. Felleisen. Contracts for higher-order functions. In Proceedings of the 7th ACM SIGPLAN International Conference on Functional Programming (ICFP 2002), pages 48--59, Pittsburgh, PA, USA, 2002. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. R. Garcia, É. Tanter, R. Wolff, and J. Aldrich. Foundations of typestate-oriented programming. ACM Transactions on Programming Languages and Systems, 2014. To appear.Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. D. K. Gifford and J. M. Lucassen. Integrating functional and imperative programming. In Proceedings of the 1986 ACM Conference on Lisp and Functional Programming, pages 28--38, Cambridge, MA, USA, Aug. 1986. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. C. S. Gordon, W. Dietl, M. D. Ernst, and D. Grossman. JavaUI: Effects for controlling UI object access. In G. Castagna, editor, Proceedings of the 27th European Conference on Object-oriented Programming (ECOOP 2013), volume 7920 of Lecture Notes in Computer Science, pages 179--204, Montpellier, France, July 2013. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. Gosling, B. Joy, G. Steele, and G. Bracha. The Java Language Specification, Third Edition. Addison-Wesley, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. L. Ina and A. Igarashi. Gradual typing for generics. In Proceedings of the 26th ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2011), pages 609--624, Portland, Oregon, USA, Oct. 2011. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. D. Marino and T. Millstein. A generic type-and-effect system. In Proceedings of the ACM SIGPLAN International Workshop on Types in Language Design and Implementation, pages 39--50, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. B. C. Pierce. Types and programming languages. MIT Press, Cambridge, MA, USA, 2002. ISBN 0-262-16209-1. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. L. Rytz, M. Odersky, and P. Haller. Lightweight polymorphic effects. In J. Noble, editor, Proceedings of the 26th European Conference on Object-oriented Programming (ECOOP 2012), volume 7313 of Lecture Notes in Computer Science, pages 258--282, Beijing, China, June 2012. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. L. Rytz, N. Amin, and M. Odersky. A flow-insensitive, modular effect system for purity. In Proceedings of the Workshop on Formal Techniques for Java-like Programs, 2013. Article No: 4. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. C. Scholliers, É. Tanter, and W. De Meuter. Computational contracts. In Scheme and Functional Programming Workshop, 2011.Google ScholarGoogle Scholar
  20. C. Scholliers, É. Tanter, and W. De Meuter. Computational contracts. Science of Computer Programming (To Appear), Oct. 2013. URL http://dx.doi.org/10.1016/j.scico.2013.09.005.Google ScholarGoogle Scholar
  21. I. Sergey and D. Clarke. Gradual ownership types. In H. Seidl, editor, Proceedings of the 21st European Symposium on Programming Languages and Systems (ESOP 2012), volume 7211 of Lecture Notes in Computer Science, pages 579--599, Tallinn, Estonia, 2012. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. J. Siek and W. Taha. Gradual typing for objects. In E. Ernst, Proceedings of the 21st European Conference on Object-oriented Programming (ECOOP 2007), number 4609 in Lecture Notes in Computer Science, pages 2--27, Berlin, Germany, July 2007. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. J. G. Siek and W. Taha. Gradual typing for functional languages. In Proceedings of the Scheme and Functional Programming Workshop, pages 81--92, Sept. 2006.Google ScholarGoogle Scholar
  24. A. Takikawa, T. S. Strickland, C. Dimoulas, S. Tobin-Hochstadt, and M. Felleisen. Gradual typing for first-class classes. In Proceedings of the 27th ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2012), pages 793--810, Tucson, AZ, USA, Oct. 2012. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Y. M. Tang and P. Jouvelot. Effect systems with subtyping. In Proceedings of the 1995 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-based Program Manipulation (PEPM 95), pages 45--53, New York, NY, USA, 1995. ACM. ISBN 0-89791-720-0. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. R. Wolff, R. Garcia, É. Tanter, and J. Aldrich. Gradual typestate. In M. Mezini, editor, Proceedings of the 25th European Conference on Object-oriented Programming (ECOOP 2011), volume 6813 of Lecture Notes in Computer Science, pages 459--483, Lancaster, UK, July 2011. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. A. K. Wright and M. Felleisen. A syntactic approach to type soundness. Journal of Information and Computation, 115(1):38--94, Nov. 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A theory of gradual effect systems

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!