Nothing Special   »   [go: up one dir, main page]

Skip to main content

On Optimising Shape-Generic Array Programs Using Symbolic Structural Information

  • Conference paper
Implementation and Application of Functional Languages (IFL 2006)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4449))

Included in the following conference series:

Abstract

Shape-generic programming and high run time performance do match if generic source code is systematically specialised into nongeneric executable code. However, as soon as we drop the assumption of whole-world knowledge or refrain from specialisation for other reasons, compiled generic code is substantially less efficient. Limited effectiveness of code optimisation techniques due to the inherent lack of knowledge about the structural properties of arrays can be identified as the single most important source of inefficiency.

However, in many cases partial structural information or structural relationships between arrays would actually suffice for optimisation. We propose symbolic array attributes as a uniform scheme to infer and to represent partial and relational structural information in shape-generic array code. By reusing the regular language to express structural properties in intermediate code, existing optimisations benefit from symbolic array attributes with little or no alteration. In fact, program optimisation and identification of structural properties cross-fertilise each other. We outline our approach in the context of the functional array language SaC and demonstrate its effectiveness by a small case study.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight 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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Scholz, S.B.: Single Assignment C — Efficient Support for High-Level Array Operations in a Functional Setting. Journal of Functional Programming 13(6), 1005–1059 (2003)

    Article  MATH  MathSciNet  Google Scholar 

  2. Grelck, C., Scholz, S.B.: SAC — A Functional Array Language for Efficient Multithreaded Execution. International Journal of Parallel Programming 34(4), 383–427 (2006)

    Article  MATH  Google Scholar 

  3. Scholz, S.B.: With-loop-folding in SAC — Condensing Consecutive Array Operations. In: Clack, C., Hammond, K., Davie, T. (eds.) IFL 1997. LNCS, vol. 1467, pp. 72–92. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  4. Grelck, C., Scholz, S.B., Trojahner, K.: With-Loop Scalarization: Merging Nested Array Operations. In: Trinder, P., Michaelson, G.J., Peña, R. (eds.) IFL 2003. LNCS, vol. 3145, pp. 118–134. Springer, Heidelberg (2004)

    Google Scholar 

  5. Grelck, C., Hinckfuß, K., Scholz, S.B.: With-Loop Fusion for Data Locality and Parallelism. In: Butterfield, A., Grelck, C., Huch, F. (eds.) IFL 2005. LNCS, vol. 4015, pp. 178–195. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  6. Grelck, C., Trojahner, K.: Implicit Memory Management for SAC. In: Grelck, C., Huch, F. (eds.) Hardware Specification, Verification and Synthesis: Mathematical Aspects. LNCS, vol. 408, Springer, Heidelberg (1990)

    Google Scholar 

  7. Grelck, C., Scholz, S.B., Shafarenko, A.: A Binding-Scope Analysis for Generic Programs on Arrays. In: Butterfield, A. (ed.) IFL 2005. LNCS, vol. 4015, pp. 212–230. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  8. Martin-Löf, P.: Intuitionistic Type Theory. Biblio-Napoli (1984)

    Google Scholar 

  9. Bernecky, R.: Shape Cliques. In: Horváth, Z., Zsók, V. (eds.) Proceedings of the 18th International Symposium on Implementation of Functional Languages, IFL 2006, Budapest, Hungary, September 4-6, 2006, Eötvös Loránd University pp. 1–12 (2006)

    Google Scholar 

  10. Jay, C., Steckler, P.: The Functional Imperative: Shape! In: Hankin, C. (ed.) ESOP 1998 and ETAPS 1998. LNCS, vol. 1381, pp. 139–153. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  11. Kreye, D.: A Compilation Scheme for a Hierarchy of Array Types. In: Arts, T., Mohnen, M. (eds.) IFL 2001. LNCS, vol. 2312, pp. 24–26. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  12. de Rose, L., Padua, D.: Techniques for the translation of matlab programs into fortran 90. ACM Transactions on Programming Languages and Systems 21(2), 286–323 (1999)

    Article  Google Scholar 

  13. Joisha, P., Banerjee, P.: An algebraic array shape inference system for matlab. ACM Transactions on Programming Languages and Systems 28(5), 848–907 (2006)

    Article  Google Scholar 

  14. McCosh, C.: Type-based specialization in a telescoping compiler for matlab. Master Thesis TR03-412, Rice University, Houston, Texas, USA (2003)

    Google Scholar 

  15. Bernecky, R.: Reducing Computational Complexity with Array Predicates. In: Picchi, S., Micocci, M. (eds.) Proceedings of the International Conference on Array Processing Languages (APL 1998), pp. 46–54. ACM Press, New York (1998)

    Google Scholar 

  16. Augustsson, L.: Cayenne – a language with dependent types. In: International Conference on Functional Programming. pp. 239–250 (1998)

    Google Scholar 

  17. McBride, C., McKinna, J.: The view from the left. Journal of Functional Programming 14(1), 69–111 (2004)

    Article  MATH  MathSciNet  Google Scholar 

  18. Altenkirch, T., McBride, C., McKinna, J.: Why dependent types matter. Manuscript, available online (2005)

    Google Scholar 

  19. Xi, H., Pfenning, F.: Dependent Types in Practical Programming. In: Aiken, A. (ed.) Proceedings of the 26th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 1999), pp. 214–227. ACM Press, New York (1999)

    Chapter  Google Scholar 

  20. Xi, H.: Applied Type System (extended abstract). In: Berardi, S., Coppo, M., Damiani, F. (eds.) TYPES 2003. LNCS, vol. 3085, pp. 394–408. Springer, Heidelberg (2004)

    Google Scholar 

  21. Zenger, C.: Indexed types. Theorectical Computer Science 187(1-2), 147–165 (1997)

    Article  MATH  MathSciNet  Google Scholar 

  22. Xi, H., Pfenning, F.: Eliminating array bound checking through dependent types. In: Proceedings of ACM SIGPLAN Conference on Programming Language Design and Implementation, Montreal, pp. 249–257 (1998)

    Google Scholar 

  23. Xi, H.: Dead code elimination through dependent types. In: Gupta, G. (ed.) PADL 1999. LNCS, vol. 1551, pp. 228–242. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  24. McKinna, J., Brady, E.: Phase distinctions in the compilation of epigram. Draft, available online (2005)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Zoltán Horváth Viktória Zsók Andrew Butterfield

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Trojahner, K., Grelck, C., Scholz, SB. (2007). On Optimising Shape-Generic Array Programs Using Symbolic Structural Information. In: Horváth, Z., Zsók, V., Butterfield, A. (eds) Implementation and Application of Functional Languages. IFL 2006. Lecture Notes in Computer Science, vol 4449. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-74130-5_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-74130-5_1

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-74129-9

  • Online ISBN: 978-3-540-74130-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics