Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/258948.258970acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article
Free access

Monadic state: axiomatization and type safety

Published: 01 August 1997 Publication History

Abstract

Type safety of imperative programs is an area fraught with difficulty and requiring great care. The SML solution to the problem, originally involving imperative type variables, has been recently simplified to the syntactic-value restriction. In Haskell, the problem is addressed in a rather different way using explicit monadic state. We present an operational semantics for state in Haskell and the first full proof of type safety. We demonstrate that the semantic notion of value provided by the explicit monadic types is able to avoid any problems with generalization.

References

[1]
ARIOLA, Z. M., AND FELLEISEN, M. The call-by-need lambda calculus. To appear in the Journal of Functional ProgramminE, 1996.
[2]
ARIOLA, Z. M., FELLEISEN, M., MARAIST, J., ODERSKY, M., AND WAOLER, P. A call-by-need lambda calculus. In A CM Symposium on Principles of Programming Languages (1995), pp. 233-246.
[3]
BOEHM, H.-J. Side effects and aliasing can have simple axiomatic descriptions. A CM T~ansactions on Programming Languages and Systems 7, 4 (Oct. 1985), 637-655.
[4]
CHEN, K., AND ODERSKY, M. A type system for a lambda calculus with assignment. In Theoretical Aspects of Compurer Software (1994), Springer Verlag, LNCS 789.
[5]
CRANK, E., AND FELLEISEN, M. Parameter-passing and the lambda calculus. In A CM Symposium on Principles of Programming Languages (1991), pp. 233-244.
[6]
DAMAS, L. M. Type Assignment in Programming Languages. PhD thesis, University of Edinburgh, 1985.
[7]
FELLEISEN, M., AND FRIEDMAN, D. A calculus for assignments in higher-order languages. In A CM Symposium on Principles of Programming Languages (1987), pp. 314-325.
[8]
FELLEISEN, M., AND HIEB, R. The revised report on the syntactic theories of sequential control and state. Theoretical Computer Science 102 (1992), 235-271. Technical Report 89-100, Rice University.
[9]
HOARE, C., HAYES, I., JIFENG, H., MORGAN, C., ROSCOE, A., SANDERS, J., SORENSEN, I., SP!VRY, J., AND SuttoN, B. Laws of programming. Communications of the A CM 30, 8 (1987), 672-686.
[10]
LAUNCHBURY, J. Lazy imperative programming. Technical Report, Yale University, 1993. ACM SIGPLAN Workshop on State in Programming Languages.
[11]
LAUNCHBURY, J., AND PEYTON JONES, S. L. Lazy functional state threads. In A CM SIGPLAN Conference on Programming Language Design and Implementation (1994), pp. 24- 35.
[12]
LAUNCHBURY, J., ANO PEYTON JONES, S. L. State in Haskell. Lisp and Symbolic Computation 8 (1995), 193-341.
[13]
MASON, I., AND TALCOTT, C. L. Equivalence in functional languages with effects. Journal of Functional Programming 1, 3 (July 1991), 287-327.
[14]
MILNER, R. A theory of type polymorphism in programming. Journal of Computer and System Sciences 17 (1978).
[15]
MILNER, R., TOFTE, M., HARPER, R., AND MACQUEEN, D. The Definition of Standard ML, Revised 1996. Forthcoming, 1996.
[16]
ODERSKY, M. A syntactic theory of local names. Technical Report YALEU/DCS/RR-965, Yale University, 1993.
[17]
ODERSKY, M., RABIN, D., AND HUDAK, P. Call by name, assignment, and the lambda calculus, in A CM Symposium on Principles of Programming Languages (Jan. 1993), pp. 43- 56.
[18]
O'HEARN, P. W., AND TENNENT, R. D. Relational parametricity and local variables. In A GM Symposium on Principles of Programming Languages (1993).
[19]
PETERSON, JOHN, ET AL. Report on the programming language Haskell (version 1.3). Technical Report YALEU/DCS/RR-1106, Yale University, 1996.
[20]
RABIN, D. Calculi for Functional Prmjramming Languages with Assignments. PhD thesis, Yale University, 1996. Technical Report YALEU/DCS/RR-1107.
[21]
RIECKE, J. G. Delimiting the scope of effects. In Conference on Functional Programming and Computer Architecture (1993), pp. 146-155.
[22]
RIECKE, J. G., AND VISWANATHAN, R. Isolating side effects in sequential languages. In A GM Symporium on Principles of Programming Languages (1995), pp. 1-12.
[23]
SABRY, A., AND FIELO, J. Reasoning about explicit and implicit representations of state. Technical Report YALEU/DCS/RR-968, Yale University, 1993. ACM SIG- PLAN Workshop on State in Programming Languages, pages 17-30.
[24]
SWARUP, V., REDDY, U., AND IRP. LANO, E. Assignments for applicative languages. In Conference on Functional Programming and Computer Architecture (1991), pp. 192-214.
[25]
TALPIN, J., AND JOUVELOT, P. The type and effect discipline. In IEEE Symposium on Logic in Computer Science (June 1992), pp. 162-173.
[26]
TOFTE, M. Type inference for polymorphic references. Information and Computation 89, 1 (November 1990), 1-34.
[27]
TORTS, M., ^ND TALPIN, J. Implementing the call-by-value calculus using a stack of regions. In A CM Symposium on Principles of Programming Languages (1994), pp. 188-201.
[28]
WADLER, P. Comprehending monads. In A CM Conference on Lisp and Functional Programming (1990), pp. 61-78.
[29]
WRIGHT, A. K., ANI) F~.LLEmRN, M. A syntactic approach to type soundness. Technical Report 91-160, Rice University, April 1991. Final version in Information and Computation 115 (1), 1994, 38-94.

Cited By

View all
  • (2023)Capturing TypesACM Transactions on Programming Languages and Systems10.1145/361800345:4(1-52)Online publication date: 20-Nov-2023
  • (2019)STCLang: state thread composition as a foundation for monadic dataflow parallelismProceedings of the 12th ACM SIGPLAN International Symposium on Haskell10.1145/3331545.3342600(146-161)Online publication date: 8-Aug-2019
  • (2018)First class dynamic effect handlers: or, polymorphic heaps with dynamic effect handlersProceedings of the 3rd ACM SIGPLAN International Workshop on Type-Driven Development10.1145/3240719.3241789(51-64)Online publication date: 27-Sep-2018
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICFP '97: Proceedings of the second ACM SIGPLAN international conference on Functional programming
August 1997
326 pages
ISBN:0897919181
DOI:10.1145/258948
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 August 1997

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Conference

ICFP97
Sponsor:
ICFP97: International Conference on Functional Programming 1997
June 9 - 11, 1997
Amsterdam, The Netherlands

Acceptance Rates

ICFP '97 Paper Acceptance Rate 25 of 78 submissions, 32%;
Overall Acceptance Rate 333 of 1,064 submissions, 31%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)68
  • Downloads (Last 6 weeks)14
Reflects downloads up to 13 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2023)Capturing TypesACM Transactions on Programming Languages and Systems10.1145/361800345:4(1-52)Online publication date: 20-Nov-2023
  • (2019)STCLang: state thread composition as a foundation for monadic dataflow parallelismProceedings of the 12th ACM SIGPLAN International Symposium on Haskell10.1145/3331545.3342600(146-161)Online publication date: 8-Aug-2019
  • (2018)First class dynamic effect handlers: or, polymorphic heaps with dynamic effect handlersProceedings of the 3rd ACM SIGPLAN International Workshop on Type-Driven Development10.1145/3240719.3241789(51-64)Online publication date: 27-Sep-2018
  • (2017)Structured asynchrony with algebraic effectsProceedings of the 2nd ACM SIGPLAN International Workshop on Type-Driven Development10.1145/3122975.3122977(16-29)Online publication date: 3-Sep-2017
  • (2015)How functional programming matteredNational Science Review10.1093/nsr/nwv0422:3(349-370)Online publication date: 13-Jul-2015
  • (2008)Lightweight monadic regionsACM SIGPLAN Notices10.1145/1543134.141128844:2(1-12)Online publication date: 25-Sep-2008
  • (2008)Lightweight monadic regionsProceedings of the first ACM SIGPLAN symposium on Haskell10.1145/1411286.1411288(1-12)Online publication date: 25-Sep-2008
  • (2008)Witnessing side effectsACM Transactions on Programming Languages and Systems10.1145/1353445.135344930:3(1-42)Online publication date: 21-May-2008
  • (2007)A history of HaskellProceedings of the third ACM SIGPLAN conference on History of programming languages10.1145/1238844.1238856(12-1-12-55)Online publication date: 9-Jun-2007
  • (2006)Proof abstraction for imperative languagesProceedings of the 4th Asian conference on Programming Languages and Systems10.1007/11924661_6(97-113)Online publication date: 8-Nov-2006
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media