Skip to main content

Functional Representations of SSA

  • Chapter
  • First Online:
SSA-based Compiler Design
  • 851 Accesses

Abstract

Functional programming languages provide a perspective on SSA that complements presentations based on phi-functions using notions such as nested scope, parameter passing, and mutually recursive function definitions. The correspondence extends from syntactic aspects to tasks such as SSA construction, data-flow analysis, and program transformations, and can be expressed in terms of multiple intermediate representation forms, all commonly found in compilers for functional programming languages. The chapter concludes with a discussion of loop nesting forests and their relationship to the relative placement of mutually recursive functions during block sinking and lambda dropping.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 89.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 119.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Apart from the function identifiers f i, which can always be chosen distinct from the variables.

  2. 2.

    Refinements of this representation will be sketched in Sect. 6.3.

References

  1. Appel, A. W. (1998). Modern compiler implementation in {C,Java,ML}. Cambridge: Cambridge University Press.

    Google Scholar 

  2. Appel, A. W. (1998). SSA is functional programming. Sigplan Notices, 33(4), 17–20 (1998).

    Google Scholar 

  3. Danvy, O., Millikin, K., & Nielsen, L. R. (2007). On one-pass CPS transformations. Journal of Functional Programming, 17(6), 793–812.

    Article  MathSciNet  MATH  Google Scholar 

  4. Kennedy, A. (2007). Compiling with continuations, continued. In Proceedings of the International Conference on Functional Programming. ICFP ’07 (pp. 177–190).

    Google Scholar 

  5. Landin, P. (1965). A Generalization of Jumps and Labels. Technical Report. Reprinted in Higher Order and Symbolic Computation, 11(2), 125–143, 1998, with a foreword by Hayo Thielecke. UNIVAC Systems Programming Research, 1965.

    Google Scholar 

  6. Plotkin, G. D. (1975). Call-by-name, call-by-value and the lambda-calculus. Theoretical Computer Science, 1(2), 125–159.

    Article  MathSciNet  MATH  Google Scholar 

  7. Reppy, J. H. (2002). Optimizing nested loops using local CPS conversion. Higher-Order and Symbolic Computation, 15(2–3), 161–180.

    Article  MATH  Google Scholar 

  8. Reynolds, J. C. (1972). Definitional interpreters for higher-order programming languages. In Proceedings of the ACM National Conference. Reprinted in Higher-Order and Symbolic Computation, 11(4), 363–397, 1998 (pp. 717–714).

    Google Scholar 

  9. Reynolds, J. C. (1974). On the relation between direct and continuation semantics. In Proceedings of the Colloquium on Automata, Languages and Programming (pp. 141–156).

    Google Scholar 

  10. van Wijngaarden, A. (1966). Recursive defnition of syntax and semantics. In Formal Language Description Languages for Computer Programming (pp. 13–24).

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Lennart Beringer .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Beringer, L. (2022). Functional Representations of SSA. In: Rastello, F., Bouchez Tichadou, F. (eds) SSA-based Compiler Design. Springer, Cham. https://doi.org/10.1007/978-3-030-80515-9_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-80515-9_6

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-80514-2

  • Online ISBN: 978-3-030-80515-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics