skip to main content
research-article
Free access

A theory of gradual effect systems

Published: 19 August 2014 Publication History

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.
[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.
[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.
[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.
[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.
[6]
T. Disney and C. Flanagan. Gradual information flow typing. In International Workshop on Scripts to Programs, 2011.
[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.
[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.
[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.
[10]
R. Garcia, É. Tanter, R. Wolff, and J. Aldrich. Foundations of typestate-oriented programming. ACM Transactions on Programming Languages and Systems, 2014. To appear.
[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.
[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.
[13]
J. Gosling, B. Joy, G. Steele, and G. Bracha. The Java Language Specification, Third Edition. Addison-Wesley, 2003.
[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.
[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.
[16]
B. C. Pierce. Types and programming languages. MIT Press, Cambridge, MA, USA, 2002. ISBN 0-262-16209-1.
[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.
[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.
[19]
C. Scholliers, É. Tanter, and W. De Meuter. Computational contracts. In Scheme and Functional Programming Workshop, 2011.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[27]
A. K. Wright and M. Felleisen. A syntactic approach to type soundness. Journal of Information and Computation, 115(1):38--94, Nov. 1994.

Cited By

View all
  • (2024)Effectful Software ContractsProceedings of the ACM on Programming Languages10.1145/36329308:POPL(2639-2666)Online publication date: 5-Jan-2024
  • (2023)Data Extraction via Semantic Regular Expression SynthesisProceedings of the ACM on Programming Languages10.1145/36228637:OOPSLA2(1848-1877)Online publication date: 16-Oct-2023
  • (2023)Compositional Verification of Efficient Masking Countermeasures against Side-Channel AttacksProceedings of the ACM on Programming Languages10.1145/36228627:OOPSLA2(1817-1847)Online publication date: 16-Oct-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 49, Issue 9
ICFP '14
September 2014
361 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/2692915
Issue’s Table of Contents
  • cover image ACM Conferences
    ICFP '14: Proceedings of the 19th ACM SIGPLAN international conference on Functional programming
    August 2014
    390 pages
    ISBN:9781450328739
    DOI:10.1145/2628136
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 ACM 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: 19 August 2014
Published in SIGPLAN Volume 49, Issue 9

Check for updates

Author Tags

  1. abstract interpretation
  2. gradual typing
  3. type-and-effect systems

Qualifiers

  • Research-article

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)18
  • Downloads (Last 6 weeks)2
Reflects downloads up to 13 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Effectful Software ContractsProceedings of the ACM on Programming Languages10.1145/36329308:POPL(2639-2666)Online publication date: 5-Jan-2024
  • (2023)Data Extraction via Semantic Regular Expression SynthesisProceedings of the ACM on Programming Languages10.1145/36228637:OOPSLA2(1848-1877)Online publication date: 16-Oct-2023
  • (2023)Compositional Verification of Efficient Masking Countermeasures against Side-Channel AttacksProceedings of the ACM on Programming Languages10.1145/36228627:OOPSLA2(1817-1847)Online publication date: 16-Oct-2023
  • (2023)Synthesizing SpecificationsProceedings of the ACM on Programming Languages10.1145/36228617:OOPSLA2(1787-1816)Online publication date: 16-Oct-2023
  • (2023)Gradual Typing for Effect HandlersProceedings of the ACM on Programming Languages10.1145/36228607:OOPSLA2(1758-1786)Online publication date: 16-Oct-2023
  • (2021)Gradually structured dataProceedings of the ACM on Programming Languages10.1145/34855035:OOPSLA(1-29)Online publication date: 15-Oct-2021
  • (2021)Fully abstract from static to gradualProceedings of the ACM on Programming Languages10.1145/34342885:POPL(1-30)Online publication date: 4-Jan-2021
  • (2021)GATE: Gradual Effect TypesLeveraging Applications of Formal Methods, Verification and Validation10.1007/978-3-030-89159-6_21(335-345)Online publication date: 12-Oct-2021
  • (2017)Sums of uncertainty: refinements go gradualProceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages10.1145/3009837.3009865(804-817)Online publication date: 1-Jan-2017
  • (2016)First-class effect reflection for effect-guided programmingProceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications10.1145/2983990.2984037(820-837)Online publication date: 19-Oct-2016
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media