skip to main content
10.1145/3359591.3359731acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

CallƐ: an effect system for method calls

Published:23 October 2019Publication History

ABSTRACT

Effect systems are used to statically reason about the effects an expression may have when evaluated. In the literature, such effects include various behaviours as diverse as memory accesses and exception throwing. Here we present CallƐ, an object-oriented language that takes a flexible approach where effects are just method calls: this works well because ordinary methods often model things like I/O operations, access to global state, or primitive language operations such as thread creation. CallƐ supports both flexible and fine-grained control over such behaviour, in a way designed to minimise the complexity of annotations.

CallƐ’s effect system can be used to prevent OO code from performing privileged operations, such as querying a database, modifying GUI widgets, exiting the program, or performing network communication. It can also be used to ensure determinism, by preventing methods from (indirectly) calling non-deterministic primitives like random number generation or file reading.

Skip Supplemental Material Section

Supplemental Material

3359591.3359731.mp4

mp4

76 MB

References

  1. Aaron Craig, Alex Potanin, Lindsay Groves, and Jonathan Aldrich. 2018. Capabilities: Effects for Free. In Formal Methods and Software Engineering, Jing Sun and Meng Sun (Eds.). Springer International Publishing, Cham, 231–247.Google ScholarGoogle Scholar
  2. D. Devriese, L. Birkedal, and F. Piessens. 2016. Reasoning about Object Capabilities with Logical Relations and Effect Parametricity. In 2016 IEEE European Symposium on Security and Privacy (EuroS P). 147–162. Google ScholarGoogle ScholarCross RefCross Ref
  3. C. Dimoulas, S. Moore, A. Askarov, and S. Chong. 2014. Declarative Policies for Capability Control. In 2014 IEEE 27th Computer Security Foundations Symposium. 3–17. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Burak Emir, Andrew Kennedy, Claudio Russo, and Dachuan Yu. 2006. Variance and Generalized Constraints for C ♯ Generics. In ECOOP 2006 – Object-Oriented Programming, Dave Thomas (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 279–303.Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. David K. Gifford and John M. Lucassen. 1986. Integrating Functional and Imperative Programming. In Proceedings of the 1986 ACM Conference on LISP and Functional Programming (LFP ’86). ACM, New York, NY, USA, 28–38. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Colin S. Gordon, Werner Dietl, Michael D. Ernst, and Dan Grossman. 2013. JavaUI: Effects for Controlling UI Object Access. In ECOOP 2013 – Object-Oriented Programming, Giuseppe Castagna (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 179–204.Google ScholarGoogle Scholar
  7. James Gosling, Bill Joy, Guy Steele, and Bracha. Gilad. 2005. The Java Language Specification (3rd ed.). Addison-Wesley Longman Publishing Co., Boston, MA, USA.Google ScholarGoogle Scholar
  8. Aaron Greenhouse and John Boyland. 1999. An Object-Oriented Effects System. In Proceedings of the 13th European Conference on ObjectOriented Programming (ECOOP ’99). Springer-Verlag, London, UK, UK, 205–229. http://dl.acm.org/citation.cfm?id=646156.679836Google ScholarGoogle ScholarCross RefCross Ref
  9. Atsushi Igarashi, Benjamin C. Pierce, and Philip Wadler. 2001. Featherweight Java: A Minimal Core Calculus for Java and GJ. ACM Trans. Program. Lang. Syst. 23, 3 (May 2001), 396–450. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Atsushi Igarashi and Mirko Viroli. 2006. Variant Parametric Types: A Flexible Subtyping Scheme for Generics. ACM Trans. Program. Lang. Syst. 28, 5 (Sept. 2006), 795–847. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Pablo Inostroza and Tijs van der Storm. 2018. JEff: Objects for Effect. In Proceedings of the 2018 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software (Onward! 2018). ACM, New York, NY, USA, 111–124. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Shin-ya Katsumata. 2014. Parametric Effect Monads and Semantics of Effect Systems. In Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’14). ACM, New York, NY, USA, 633–645. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Daan Leijen. 2014. Koka: Programming with Row Polymorphic Effect Types. In Proceedings 5th Workshop on Mathematically Structured Functional Programming, MSFP@ETAPS 2014, Grenoble, France, 12 April 2014. 100–126. Google ScholarGoogle ScholarCross RefCross Ref
  14. Sam Lindley, Conor McBride, and Craig McLaughlin. 2017. Do Be Do Be Do. In Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages (POPL 2017). ACM, New York, NY, USA, 500–514. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. J. M. Lucassen and D. K. Gifford. 1988. Polymorphic Effect Systems. In Proceedings of the 15th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’88). ACM, New York, NY, USA, 47– 57. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Daniel Marino and Todd Millstein. 2009. A Generic Type-and-effect System. In Proceedings of the 4th International Workshop on Types in Language Design and Implementation (TLDI ’09). ACM, New York, NY, USA, 39–50. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Darya Melicher, Yangqingwei Shi, Alex Potanin, and Jonathan Aldrich. 2017. A Capability-Based Module System for Authority Control. In 31st European Conference on Object-Oriented Programming (ECOOP 2017) (Leibniz International Proceedings in Informatics (LIPIcs)), Peter Müller (Ed.), Vol. 74. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 20:1–20:27. Google ScholarGoogle ScholarCross RefCross Ref
  18. Adrian Mettler, David A. Wagner, and Tyler Close. 2010. Joe-E: A Security-Oriented Subset of Java. In Proceedings of the Network and Distributed System Security Symposium, NDSS 2010, San Diego, California, USA, 28th February - 3rd March 2010. http://www.isoc.org/isoc/ conferences/ndss/10/pdf/20.pdfGoogle ScholarGoogle Scholar
  19. Mark Miller, Ka-Ping Yee, Jonathan Shapiro, and Combex Inc. 2003. Capability Myths Demolished. Technical Report.Google ScholarGoogle Scholar
  20. Flemming Nielson and Hanne Riis Nielson. 1999. Type and Effect Systems. In Correct System Design, Recent Insight and Advances, (to Hans Langmaack on the Occasion of His Retirement from His Professorship at the University of Kiel). Springer-Verlag, Berlin, Heidelberg, 114–136. http://dl.acm.org/citation.cfm?id=646005.673740Google ScholarGoogle Scholar
  21. Dominic Orchard and Tomas Petricek. 2014. Embedding Effect Systems in Haskell. In Proceedings of the 2014 ACM SIGPLAN Symposium on Haskell (Haskell ’14). ACM, New York, NY, USA, 13–24. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Gordon Plotkin and Matija Pretnar. 2009. Handlers of Algebraic Effects. In Proceedings of the 18th European Symposium on Programming Languages and Systems: Held As Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2009 (ESOP ’09). SpringerVerlag, Berlin, Heidelberg, 80–94. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Alex Potanin, James Noble, Dave Clarke, and Robert Biddle. 2006. Generic Ownership for Generic Java. In Proceedings of the 21st Annual ACM SIGPLAN Conference on Object-oriented Programming Systems, Languages, and Applications (OOPSLA ’06). ACM, New York, NY, USA, 311–324. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Lukas Rytz, Martin Odersky, and Philipp Haller. 2012. Lightweight Polymorphic Effects. In Proceedings of the 26th European Conference on Object-Oriented Programming (ECOOP’12). Springer-Verlag, Berlin, Heidelberg, 258–282. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Christian Skalka and Scott Smith. 2005. Static Use-based Object Confinement. Int. J. Inf. Secur. 4, 1-2 (Feb. 2005), 87–104. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Jean-Pierre Talpin and Pierre Jouvelot. 1992. Polymorphic Type, Region and Effect Inference. Journal of Functional Programming 2 (1992), 245– 271.Google ScholarGoogle ScholarCross RefCross Ref
  27. Yan Mei Tang and Pierre Jouvelot. 1994. Separate Abstract Interpretation for Control-Flow Analysis. In Proceedings of the International Conference on Theoretical Aspects of Computer Software (TACS ’94). Springer-Verlag, London, UK, UK, 224–243. http://dl.acm.org/citation. cfm?id=645868.668505Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Yan Mei Tang and Pierre Jouvelot. 1995. Effect Systems with Subtyping. In Proceedings of the 1995 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-based Program Manipulation (PEPM ’95). ACM, New York, NY, USA, 45–53. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Ross Tate and Daan Leijen. 2010. Convenient explicit effects using type inference with subeffects. Technical Report.Google ScholarGoogle Scholar
  30. Philip Wadler and Peter Thiemann. 2003. The Marriage of Effects and Monads. ACM Trans. Comput. Logic 4, 1 (Jan. 2003), 1–32. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. CallƐ: an effect system for method calls

          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
          • Published in

            cover image ACM Conferences
            Onward! 2019: Proceedings of the 2019 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software
            October 2019
            197 pages
            ISBN:9781450369954
            DOI:10.1145/3359591

            Copyright © 2019 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 23 October 2019

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article

            Acceptance Rates

            Overall Acceptance Rate40of105submissions,38%

            Upcoming Conference

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader