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

A functional representation of data structures with a hole

Published: 21 January 1998 Publication History

Abstract

Data structures with a hole, in other words data structures with an uninitialized field, are useful to write efficient programs: they enable us to construct functional data structures flexibly and write functions such as append and map as tail recursive functions. In this paper we present an approach to introducing data structures with a hole into call-by-value functional programming languages like ML. Data structures with a hole are formalized as a new form of λ-abstraction called hole abstraction. The novel features of hole abstraction are that expressions inside hole abstraction are evaluated and application is implemented by destructive update of a hole. We present a simply typed call-by-value λ-calculus extended with hole abstractions. Then we show a compilation method of hole abstraction and prove correctness of the compilation.

References

[1]
H. R Barendregt. The Lambda Calculus: Its Syntax and Semantics. Horth-Holland, 1984.
[2]
R.M. BurstaU and J. Dadington. A transformation system for developing recursive programs. Journal of ACM, 24(1):44- 67, 1977.
[3]
R Cheng and C. Okasaki. Destination-passing style and generational garbage collection. Unpublished, 1996.
[4]
J. Chirimar, C. A. Gunter, and J. G. Riecke. Proving memory management invariants for a language based on linear logic. In Proc. ACM Conf. Lisp and Functional Programruing, pages 139-147, 1992.
[5]
J.-Y. Girard. Linear logic. Theoretical Computer Science, 50(1), 1987.
[6]
J. C. Guzm~ and P. Hudak. Single-threaded polymorphie lambda calculus. In IEEE Syrup. on Logic in Computer Science, 1990.
[7]
G. Huet and B. Lang. Proving and applying program transformations expressed with second-order patterns. Acta Informatica, 11, 1978.
[8]
B. Jaeobs. Semantics of weakening and eontraetion. Anna/s of Pure and Applied Logic, 69:73--106, 1994.
[9]
J. R. Larus. Restructuring Symbolic Programs for Concurrent Execution on Multiprocessors. Phi) thesis, Computer Science Division, University of California at Berkeley, 1989. USB/CSD 891502.
[10]
G. Lindstrom. Functional programming and the logical variable. In Proc. ACM Syrup. on Principles of Prog. Languages, pages 266-280, 1985.
[11]
Y. Minamide. Compilation based on a calculus for explicit type passing. In Second Fuji International Workshop on Functional and Logic Programming, pages 301-320. World Scientific, 1996.
[12]
Y. Minamide, G. Mordsett, and R. Harper. Typed closure conversion. In Proc. ACM Syrup. on Principles of Prog. Languages, pages 271-283, 1996.
[13]
A. Ohod. A compilation method for ML-style polymorphie record calculi. In Proc. ACM Syrup. on Principles of Prog. Languages, 1992.
[14]
A. Ohori. A polymorphie record calculus and its compilation. ACM Transaction on Progi'ammfng Languages and Systems, 17(6), 1995.
[15]
K.K.'Pingali. Lazy eva/uation and ~elogic variable. In D. A. Turner, editor, Research Topics in Functional Programming, pages 171-198. Addison-Wesley, 1987.
[16]
R. Ptasmeijer and M. van Eekelen. Language Report CON- CURRENT Clean Version 1.1. 1996.
[17]
G. D. Plotldn. Call-by-name, call-by-value and the A- calculus. Theoretical Computer Science, I(2), December I975.
[18]
D. Tarditi, (3. Morrisett, P. Cheng, C. Stone, R. Harper, and P. Lee. TIL: A type-directed optimizing compiler for NIL. In Proc. ACM SIGPLAN Conf. on Programming Language Design and Implementation, 1996.
[19]
A. Tolmach. Tag-free garbage collection using explicit type parameters. In Proc. ACM Conf. Lisp and Functional Programming, pages 1-I1, 1994.
[20]
D. N. Turner, P. Wadler, and t2. Mossin. Once upon a type. In Functional Programming Languages and Computer Architecture, 1995.
[21]
P. Wadler. Linear types can change the world! In Programming Concepts and Methods, 1990.
[22]
P. Wader. Is there ause forlinear Iogie'?. In PartiaIEvaluation and Semantics Based Program Manipulation, I99t.
[23]
P. Wadler. A taste of linear logic. In Mathematical Foundations of Computing Science, 1993. LNCS 711.
[24]
P.L. Wadler. Listlessness is Better than Laziness. Phi) thesis, Computer Science Department, Carnegie-Mellon University, 1985. CMU-CS-85-171.
[25]
A. K. Wright and M. FeUeisen. A syntactic approach to type soundness. Information and Computation, 115(1):38- 94, 1994.

Cited By

View all
  • (2024)The Functional Essence of Imperative Binary Search TreesProceedings of the ACM on Programming Languages10.1145/36563988:PLDI(518-542)Online publication date: 20-Jun-2024
  • (2024)A Tensor Algebra Compiler for Sparse Differentiation2024 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)10.1109/CGO57630.2024.10444787(1-12)Online publication date: 2-Mar-2024
  • (2023)Indexed Streams: A Formal Intermediate Representation for Fused Contraction ProgramsProceedings of the ACM on Programming Languages10.1145/35912687:PLDI(1169-1193)Online publication date: 6-Jun-2023
  • Show More Cited By

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '98: Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
January 1998
403 pages
ISBN:0897919793
DOI:10.1145/268946
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: 21 January 1998

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Conference

POPL98
POPL98: Symposium on Principles of Programming Languages
January 19 - 21, 1998
California, San Diego, USA

Acceptance Rates

POPL '98 Paper Acceptance Rate 32 of 175 submissions, 18%;
Overall Acceptance Rate 824 of 4,130 submissions, 20%

Upcoming Conference

POPL '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)146
  • Downloads (Last 6 weeks)18
Reflects downloads up to 15 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)The Functional Essence of Imperative Binary Search TreesProceedings of the ACM on Programming Languages10.1145/36563988:PLDI(518-542)Online publication date: 20-Jun-2024
  • (2024)A Tensor Algebra Compiler for Sparse Differentiation2024 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)10.1109/CGO57630.2024.10444787(1-12)Online publication date: 2-Mar-2024
  • (2023)Indexed Streams: A Formal Intermediate Representation for Fused Contraction ProgramsProceedings of the ACM on Programming Languages10.1145/35912687:PLDI(1169-1193)Online publication date: 6-Jun-2023
  • (2023)Tail Recursion Modulo Context: An Equational ApproachProceedings of the ACM on Programming Languages10.1145/35712337:POPL(1152-1181)Online publication date: 11-Jan-2023
  • (2022)From functional to imperative: combining destination-passing style and viewsProceedings of the 8th ACM SIGPLAN International Workshop on Libraries, Languages and Compilers for Array Programming10.1145/3520306.3534502(25-36)Online publication date: 13-Jun-2022
  • (2021)Lambda calculus with algebraic simplification for reduction parallelisation: Extended studyJournal of Functional Programming10.1017/S095679682100005831Online publication date: 5-Apr-2021
  • (2019)Lambda calculus with algebraic simplification for reduction parallelization by equational reasoningProceedings of the ACM on Programming Languages10.1145/33416443:ICFP(1-25)Online publication date: 26-Jul-2019
  • (2017)Destination-passing style for efficient memory managementProceedings of the 6th ACM SIGPLAN International Workshop on Functional High-Performance Computing10.1145/3122948.3122949(12-23)Online publication date: 7-Sep-2017
  • (2016)The Design and Formalization of Mezzo, a Permission-Based Programming LanguageACM Transactions on Programming Languages and Systems10.1145/283702238:4(1-94)Online publication date: 2-Aug-2016
  • (2013)Programming with permissions in MezzoACM SIGPLAN Notices10.1145/2544174.250059848:9(173-184)Online publication date: 25-Sep-2013
  • 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