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

Hoopl: a modular, reusable library for dataflow analysis and transformation

Published: 30 September 2010 Publication History

Abstract

Dataflow analysis and transformation of control-flow graphs is pervasive in optimizing compilers, but it is typically entangled with the details of a particular compiler. We describe Hoopl, a reusable library that makes it unusually easy to define new analyses and transformations for any compiler written in Haskell. Hoopl's interface is modular and polymorphic, and it offers unusually strong static guarantees. The implementation encapsulates state-of-the-art algorithms (interleaved analysis and rewriting, dynamic error isolation), and it cleanly separates their tricky elements so that they can be understood independently.

Supplementary Material

JPG File (haskell-1555-peytonjones.jpg)
MOV File (haskell-1555-peytonjones.mov)

References

[1]
}}Andrew W. Appel. 1998. Modern Compiler Implementation. Cambridge University Press, Cambridge, UK. Available in three editions: C, Java, and ML.
[2]
}}John Cocke and Ken Kennedy. 1977. An algorithm for reduction of operator strength. Communications of the ACM, 20(11): 850--856.
[3]
}}Keith D. Cooper, Timothy J. Harvey, and Ken Kennedy. 2001. A simple, fast dominance algorithm. Technical report, Rice University. Unpublished report available from http://www.hipersoft.rice.edu/grads/publications/dom14.pdf.
[4]
}}Patrick Cousot and Radhia Cousot. 1977 (January). 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, pages 238--252.
[5]
}}Patrick Cousot and Radhia Cousot. 1979 (January). Systematic design of program analysis frameworks. In Conference Record of the 6th Annual ACM Symposium on Principles of Programming Languages, pages 269--282.
[6]
}}John B. Kam and Jeffrey D. Ullman. 1976. Global data flow analysis and iterative algorithms. Journal of the ACM, 23(1):158--171.
[7]
}}John B. Kam and Jeffrey D. Ullman. 1977. Monotone data flow analysis frameworks. Acta Informatica, 7:305--317.
[8]
}}Gary A. Kildall. 1973 (October). A unified approach to global program optimization. In Conference Record of the ACM Symposium on Principles of Programming Languages, pages 194--206.
[9]
}}Jens Knoop, Oliver Ruething, and Bernhard Steffen. 1992. Lazy code motion. Proceedings of the ACM SIGPLAN '92 Conference on Programming Language Design and Implementation, in SIGPLAN Notices, 27 (7):224--234.
[10]
}}Sorin Lerner, David Grove, and Craig Chambers. 2002 (January). Composing dataflow analyses and transformations. Conference Record of the 29th Annual ACM Symposium on Principles of Programming Languages, in SIGPLAN Notices, 31 (1):270--282.
[11]
}}Thomas J. Marlowe and Barbara G. Ryder. 1990. Properties of data flow frameworks: a unified model. Acta Informatica, 28 (2):121--163.
[12]
}}Steven S. Muchnick. 1997. Advanced compiler design and implementation. Morgan Kaufmann, San Mateo, CA.
[13]
}}George C. Necula, Scott McPeak, Shree Prakash Rahul, and Westley Weimer. 2002. CIL: Intermediate language and tools for analysis and transformation of C programs. In CC '02: Proceedings of the 11th International Conference on Compiler Construction, pages 213--228.
[14]
}}Norman Ramsey and João Dias. 2005 (September). An applicative control-flow graph based on Huet's zipper. In ACM SIGPLAN Workshop on ML, pages 101--122.
[15]
}}Colin Runciman. 2010 (June). Finding and increasing PRS candidates. Reduceron Memo 50, www.cs.york.ac.uk/fp/reduceron.
[16]
}}David A. Schmidt. 1998. Data flow analysis is model checking of abstract interpretations. In ACM, editor, Conference Record of the 25th Annual ACM Symposium on Principles of Programming Languages, pages 38--48.
[17]
}}Bernhard Steffen. 1991. Data flow analysis as model checking. In TACS '91: Proceedings of the International Conference on Theoretical Aspects of Computer Software, pages 346--365.
[18]
}}Raja Vallée-Rai, Etienne Gagnon, Laurie J. Hendren, Patrick Lam, Patrice Pominville, and Vijay Sundaresan. 2000. Optimizing Java bytecode using the Soot framework: Is it feasible? In CC '00: Proceedings of the 9th International Conference on Compiler Construction, pages 18--34.
[19]
}}David B. Whalley. 1994 (September). Automatic isolation of compiler errors. ACM Transactions on Programming Languages and Systems, 16 (5):1648--1659.

Cited By

View all
  • (2024)Beyond Trees: Calculating Graph-Based Compilers (Functional Pearl)Proceedings of the ACM on Programming Languages10.1145/36746388:ICFP(370-394)Online publication date: 15-Aug-2024
  • (2023)SSA Translation Is an Abstract InterpretationProceedings of the ACM on Programming Languages10.1145/35712587:POPL(1895-1924)Online publication date: 11-Jan-2023
  • (2016)From Datalog to flix: a declarative language for fixed points on latticesACM SIGPLAN Notices10.1145/2980983.290809651:6(194-208)Online publication date: 2-Jun-2016
  • Show More Cited By

Index Terms

  1. Hoopl: a modular, reusable library for dataflow analysis and transformation

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Conferences
      Haskell '10: Proceedings of the third ACM Haskell symposium on Haskell
      September 2010
      166 pages
      ISBN:9781450302524
      DOI:10.1145/1863523
      • cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 45, Issue 11
        HASKELL '10
        November 2010
        156 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/2088456
        Issue’s Table of Contents
      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: 30 September 2010

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tag

      1. dataflow

      Qualifiers

      • Research-article

      Conference

      ICFP '10
      Sponsor:

      Acceptance Rates

      Overall Acceptance Rate 57 of 143 submissions, 40%

      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)9
      • Downloads (Last 6 weeks)0
      Reflects downloads up to 07 Mar 2025

      Other Metrics

      Citations

      Cited By

      View all
      • (2024)Beyond Trees: Calculating Graph-Based Compilers (Functional Pearl)Proceedings of the ACM on Programming Languages10.1145/36746388:ICFP(370-394)Online publication date: 15-Aug-2024
      • (2023)SSA Translation Is an Abstract InterpretationProceedings of the ACM on Programming Languages10.1145/35712587:POPL(1895-1924)Online publication date: 11-Jan-2023
      • (2016)From Datalog to flix: a declarative language for fixed points on latticesACM SIGPLAN Notices10.1145/2980983.290809651:6(194-208)Online publication date: 2-Jun-2016
      • (2016)From Datalog to flix: a declarative language for fixed points on latticesProceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/2908080.2908096(194-208)Online publication date: 2-Jun-2016
      • (2016)Specifying and executing optimizations for generalized control flow graphsScience of Computer Programming10.1016/j.scico.2016.06.003130:C(2-23)Online publication date: 15-Nov-2016
      • (2015)Provably correct peephole optimizations with aliveACM SIGPLAN Notices10.1145/2813885.273796550:6(22-32)Online publication date: 3-Jun-2015
      • (2015)Provably correct peephole optimizations with aliveProceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/2737924.2737965(22-32)Online publication date: 3-Jun-2015
      • (2015)Exploiting domain and program structure to synthesize efficient and precise data flow analysesProceedings of the 30th IEEE/ACM International Conference on Automated Software Engineering10.1109/ASE.2015.41(608-618)Online publication date: 9-Nov-2015
      • (2014)A modular and generic analysis server system for functional logic programsProceedings of the ACM SIGPLAN 2014 Workshop on Partial Evaluation and Program Manipulation10.1145/2543728.2543744(181-188)Online publication date: 11-Jan-2014
      • (2013)Implementing a Java JIT compiler in HaskellProceedings of the 2013 International Conference on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools10.1145/2500828.2500849(177-180)Online publication date: 11-Sep-2013
      • 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