skip to main content
10.1145/2636228.2636231acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Defunctionalizing push arrays

Published: 03 September 2014 Publication History

Abstract

Recent work on embedded domain specific languages (EDSLs) for high performance array programming has given rise to a number of array representations. In Feldspar and Obsidian there are two different kinds of arrays, called Pull and Push arrays. Both Pull and Push arrays are deferred; they are methods of computing arrays, rather than elements stored in memory. The reason for having multiple array types is to obtain code that performs better. Pull and Push arrays provide this by guaranteeing that operations fuse automatically. It is also the case that some operations are easily implemented and perform well on Pull arrays, while for some operations, Push arrays provide better implementations. But do we really need to have more than one array representation? In this paper we derive a new array representation from Push arrays that have all the good qualities of Pull and Push arrays combined. This new array representation is obtained via defunctionalization of a Push array API.

References

[1]
M. S. Ager, D. Biernacki, O. Danvy, and J. Midtgaard. A functional correspondence between evaluators and abstract machines. In Proceedings of the 5th ACM SIGPLAN international conference on Principles and practice of declaritive programming, pages 8--19. ACM, 2003.
[2]
M. S. Ager, D. Biernacki, O. Danvy, and J. Midtgaard. From interpreter to compiler and virtual machine: a functional derivation. BRICS, Department of Computer Science, University of Aarhus, 2003.
[3]
M. S. Ager, O. Danvy, and J. Midtgaard. A functional correspondence between call-by-need evaluators and lazy abstract machines. Information Processing Letters, 90(5):223--232, 2004.
[4]
M. S. Ager, O. Danvy, and J. Midtgaard. A functional correspondence between monadic evaluators and abstract machines for languages with computational effects. BRICS, Department of Computer Science, Univ., 2004.
[5]
J. Ankner and J. D. Svenningsson. An EDSL Approach to High Performance Haskell Programming. In Proceedings of the 2013 ACM SIGPLAN Symposium on Haskell, Haskell '13, pages 1--12, New York, NY, USA, 2013. ACM. ISBN 978-1-4503-2383-3. . URL http://doi.acm.org/10.1145/2503778.2503789.
[6]
E. Axelsson, K. Claessen, M. Sheeran, J. Svenningsson, D. Engdal, and A. Persson. The Design and Implementation of Feldspar an Embedded Language for Digital Signal Processing. In Proceedings of the 22nd international conference on Implementation and application of functional languages, IFL'10, pages 121--136, Berlin, Heidelberg, 2011. Springer Verlag. ISBN 978--3--642--24275--5. URL http://dl. acm.org/citation.cfm?id=2050135.2050143.
[7]
J. M. Bell, F. Bellegarde, and J. Hook. Type-driven defunctionalization. In Proceedings of the Second ACM SIGPLAN International Conference on Functional Programming, ICFP '97, pages 25--37, New York, NY, USA, 1997. ACM. ISBN 0-89791-918-1. . URL http://doi.acm.org/10.1145/258948.258953.
[8]
M. Biernacka and O. Danvy. A syntactic correspondence between context-sensitive calculi and abstract machines. Theoretical Computer Science, 375(1):76--108, 2007.
[9]
D. Biernacki and O. Danvy. From interpreter to logic engine by defunctionalization. In M. Bruynooghe, editor, Logic Based Program Synthesis and Transformation, volume 3018 of Lecture Notes in Computer Science, pages 143--159. Springer Berlin Heidelberg, 2004. ISBN 978-3-540-22174-6. . URL http://dx.doi.org/10.1007/ 978-3-540-25938-1_13.
[10]
K. Claessen, M. Sheeran, and B. J. Svensson. Expressive Array Constructs in an Embedded GPU Kernel Programming Language. In Proceedings of the 7th workshop on Declarative aspects and applications of multicore programming, DAMP '12, pages 21--30, New York, NY, USA, 2012. ACM.
[11]
O. Danvy. Defunctionalized interpreters for programming languages. In Proceedings of the 13th ACM SIGPLAN international conference on Functional programming, ICFP '08, pages 131--142, New York, NY, USA, 2008. ACM. ISBN 978-1-59593-919-7. . URL http://doi.acm.org/10.1145/1411204.1411206.
[12]
O. Danvy and L. R. Nielsen. Defunctionalization at work. In Proceedings of the 3rd ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming, PPDP '01, pages 162--174, New York, NY, USA, 2001. ACM. ISBN 1-58113-388-X. . URL http://doi.acm.org/10.1145/773184.773202.
[13]
O. Danvy and L. R. Nielsen. Defunctionalization at work. In Proceedings of the 3rd ACM SIGPLAN international conference on Principles and practice of declarative programming, pages 162--174. ACM, 2001.
[14]
O. Danvy, K. Millikin, J. Munk, and I. Zerny. Defunctionalized interpreters for call-by-need evaluation. In Functional and Logic Programming, pages 240--256. Springer, 2010.
[15]
C. Elliott, S. Finne, and O. de Moor. Compiling embedded languages. Journal of Functional Programming, 13(2), 2003. URL http://conal.net/papers/jfp-saig/.
[16]
J.-C. Filliâtre and F. Pottier. Producing all ideals of a forest, functionally. Journal of Functional Programming, 13(5):945--956, Sept. 2003. URL http://gallium.inria.fr/~fpottier/publis/filliatre-pottier.ps.gz.
[17]
T. Harper. A library writer's guide to shortcut fusion. In Proceedings of the 4th ACM Symposium on Haskell, Haskell '11, pages 47--58, New York, NY, USA, 2011. ACM. ISBN 978-1-4503-0860-1. . URL http://doi.acm.org/10.1145/2034675.2034682.
[18]
R. J. M. Hughes. A novel representation of lists and its application to the function reverse. Information processing letters, 22(3):141--144, 1986.
[19]
G. Keller, M. M. Chakravarty, R. Leshchinskiy, S. Peyton Jones, and B. Lippmeier. Regular, shape-polymorphic, parallel arrays in haskell. In Proceedings of the 15th ACM SIGPLAN international conference on Functional programming, ICFP '10, pages 261--272, New York, NY, USA, 2010. ACM. ISBN 978-1-60558-794-3. . URL http://doi.acm.org/10.1145/1863543.1863582.
[20]
A. Kulkarni and R. R. Newton. Embrace, Defend, Extend: A Methodology for Embedding Preexisting DSLs, 2013. Functional Programming Concepts in Domain-Specific Languages (FPCDSL'13).
[21]
B. Lippmeier and G. Keller. Efficient Parallel Stencil Convolution in Haskell. In Proceedings of the 4th ACM Symposium on Haskell, Haskell '11, pages 59--70, New York, NY, USA, 2011. ACM. ISBN 978-1-4503-0860-1. . URL http://doi.acm.org/10.1145/2034675.2034684.
[22]
F. Pottier and N. Gauthier. Polymorphic typed defunctionalization. In Proceedings of the 31st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, POPL '04, pages 89--98, New York, NY, USA, 2004. ACM. . URL http://doi.acm.org/10.1145/964001.964009.
[23]
J. C. Reynolds. Definitional interpreters for higher-order programming languages. In Proceedings of the ACM annual conference - Volume 2, ACM '72, pages 717--740, New York, NY, USA, 1972. ACM. . URLhttp://doi.acm.org/10.1145/800194.805852.
[24]
J. Svenningsson and E. Axelsson. Combining Deep and Shallow Embedding for EDSL. In H.-W. Loidl and R. Pea, editors, Trends in Functional Programming, volume 7829 of Lecture Notes in Computer Science, pages 21--36. Springer Berlin Heidelberg, 2013. . URL http://dx.doi.org/10.1007/978-3-642-40447-4_2.

Cited By

View all
  • (2022)Deep Fusion for Efficient Nested Recursive ComputationsProceedings of the 21st ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences10.1145/3564719.3568698(33-44)Online publication date: 29-Nov-2022
  • (2022)Functional collection programming with semi-ring dictionariesProceedings of the ACM on Programming Languages10.1145/35273336:OOPSLA1(1-33)Online publication date: 29-Apr-2022
  • (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
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
FHPC '14: Proceedings of the 3rd ACM SIGPLAN workshop on Functional high-performance computing
September 2014
116 pages
ISBN:9781450330404
DOI:10.1145/2636228
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].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 03 September 2014

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. arrays
  2. defunctionalization
  3. embedded languages

Qualifiers

  • Research-article

Conference

ICFP'14
Sponsor:

Acceptance Rates

FHPC '14 Paper Acceptance Rate 10 of 11 submissions, 91%;
Overall Acceptance Rate 18 of 25 submissions, 72%

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)20
  • Downloads (Last 6 weeks)5
Reflects downloads up to 05 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2022)Deep Fusion for Efficient Nested Recursive ComputationsProceedings of the 21st ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences10.1145/3564719.3568698(33-44)Online publication date: 29-Nov-2022
  • (2022)Functional collection programming with semi-ring dictionariesProceedings of the ACM on Programming Languages10.1145/35273336:OOPSLA1(1-33)Online publication date: 29-Apr-2022
  • (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
  • (2022)Parallel block-delayed sequencesProceedings of the 27th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming10.1145/3503221.3508434(61-75)Online publication date: 2-Apr-2022
  • (2020)Multi-layer optimizations for end-to-end data analyticsProceedings of the 18th ACM/IEEE International Symposium on Code Generation and Optimization10.1145/3368826.3377923(145-157)Online publication date: 22-Feb-2020
  • (2019)Efficient differentiable programming in a functional array-processing languageProceedings of the ACM on Programming Languages10.1145/33417013:ICFP(1-30)Online publication date: 26-Jul-2019
  • (2017)Machine fusionProceedings of the 19th International Symposium on Principles and Practice of Declarative Programming10.1145/3131851.3131865(139-150)Online publication date: 9-Oct-2017
  • (2017)Stream fusion, to completenessACM SIGPLAN Notices10.1145/3093333.300988052:1(285-299)Online publication date: 1-Jan-2017
  • (2017)Stream fusion, to completenessProceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages10.1145/3009837.3009880(285-299)Online publication date: 1-Jan-2017
  • (2016)Polarized data parallel data flowProceedings of the 5th International Workshop on Functional High-Performance Computing10.1145/2975991.2975999(52-57)Online publication date: 8-Sep-2016
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media