A Compilation Scheme for a Hierarchy of Array Types

  • Dietmar Kreye
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2312)


In order to achieve a high level of abstraction,array-oriented languages provide language constructs for defining array operations in a shape-invariant way. However,when trying to compile such generic array operations into efficiently executable code,static knowledge of exact shapes is essential. Therefore, modern compilers try to infer the shapes of all arrays used in a program.

Unfortunately,shape inference is generally undecidable. Therefore,most compilers either rule out all programs for which shape inference fails,or they perform no shape inference at all. In the first case the expressive power of the language is restricted,in the latter the generated code has a weak runtime performance.

This paper presents a new compilation scheme for the language Sac which combines these two approaches in order to avoid their individual shortcomings. A preliminary performance evaluation demonstrates the benefits of this compilation scheme.


Shape Information Function Application Runtime Performance Array Type Executable Code 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    L. Augustsson: Implementing Haskell Overloading. In: Conference on Functional Programming Languages and Computer Architecture (FPCA’ 93). Copenhagen, Denmark,1993.Google Scholar
  2. 2.
    D. F. Bacon, S. L. Graham, O. J. Sharp: Compiler Transformations for High-Performance Computing. ACM Computing Surveys,26(4),pp. 345–420,1994.CrossRefGoogle Scholar
  3. 3.
    R. Bernecky: APEX: The APL Parallel Executor. Master’s Thesis,University of Toronto, Canada,1997.Google Scholar
  4. 4.
    J. Brown: Inside the APL2 Workspace. ACM Quote Quad,15,pp. 277–282,1985.CrossRefGoogle Scholar
  5. 5.
    T. Budd: An APL Compiler. Springer,1988. ISBN 0-387-96643-9.Google Scholar
  6. 6.
    C. Burke: J and APL. Iverson Software Inc., Toronto,Canada,1996.Google Scholar
  7. 7.
    B. L. Chamberlain, S. J. Deitz, L. Snyder: A Comparative Study of the NAS MG Benchmark Across Parallel Languages and Architectures. In: Proceedings of the ACM Conference on Supercomputing. ACM Press,2000.Google Scholar
  8. 8.
    J. Cohen: Garbage Collection of Linked Data Structures. ACM Computing Surveys, 13(3),pp. 341–367,1981.CrossRefGoogle Scholar
  9. 9.
    G. C. Driscoll, D. L. Orth: Compiling APL: The Yorktown APL Translator. IBM Journal of Research and Development,30(6),pp. 583–593,1986.CrossRefGoogle Scholar
  10. 10.
    C. Grelck, S.-B. Scholz: HPF vs. SAC—A Case Study. In A. Bode, T. Ludwig, W. Karl, R. Wismüller (Eds.): Euro-Par 2000, Parallel Processing, Proceedings of the 6th International Euro-Par Conference, Munich, Germany. Vol. 1900 of: LNCS. Springer,2000,pp. 620–624.Google Scholar
  11. 11.
    K. E. Iverson: A Programming Language. John Wiley & Sons,1962.Google Scholar
  12. 12.
    C. B. Jay: Programming in FISh. International Journal on Software Tools for Technology Transfer,2(3),pp. 307–315,1999.zbMATHCrossRefGoogle Scholar
  13. 13.
    M. A. Jenkins, W. H. Jenkins: The Q’Nial Language and Reference Manuals. Nial Systems Ltd., Ottawa,Canada,1993.Google Scholar
  14. 14.
    M. P. Jones: Dictionary-Free Overloading by Partial Evaluation. In: ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation. ACM Press,1994.Google Scholar
  15. 15.
    C. Lin: ZPL Language Reference Manual. UW-CSE-TR 94-10-06,Department of Computer Science and Engineering,University of Washington,Seattle, Washington, USA,1996.Google Scholar
  16. 16.
    C. Lin, L. Snyder, R. Anderson, B. L. Chamberlain, S.-E. Choi, G. Foreman, E. C. Lewis, W. D. Weathersby: ZPL vs. HPF: A Comparison of Performance and Programming Style. TR 95-11-05,Department of Computer Science and Engineering,University of Washington, Seattle,Washington,USA,1995.Google Scholar
  17. 17.
    S.-B. Scholz: Single Assignment C—Entwurf und Implementierung einer funktionalen C-Variante mit spezieller Unterstützung shape-invarianter Array-Operationen. PhD Thesis,Institut für Informatik und Praktische Mathematik, Universität Kiel,1996. ISBN 3-8265-3138-8.Google Scholar
  18. 18.
    S.-B. Scholz: A Case Study: Effects of WITH-Loop-Folding on the NAS Benchmark MG in SAC. In C. Clack, T. Davie, K. Hammond (Eds.): Implementation of Functional Languages,10th International Workshop (IFL’ 98),London,England, UK,Selected Papers. Vol. 1595 of: LNCS. Springer,1998,pp. 216–228. ISBN 3-540-66229-4.Google Scholar
  19. 19.
    S.-B. Scholz: On Defining Application-Specific High-Level Operations by Means of Shape-Invariant Programming Facilities. In S. Picchi, M. Micocci (Eds.): Proceedings of the Array Processing Language Conference (APL’ 98),Rome,Italy. ACM Press,1998,pp. 40–45.Google Scholar
  20. 20.
    S.-B. Scholz: A Type System for Inferring Array Shapes. In T. Arts, M. Mohnen (Eds.): Proceedings of the 13th International Workshop on the Implementation of Funtional Languages (IFL’ 01). Ericsson,Älvsjö,Sweden,2001,pp. 53–63.Google Scholar
  21. 21.
    J. Weigang: An Introduction to STSC’s APL Compiler. In: Proceedings of the Array Processing Language Conference (APL’ 89). Vol. 15 of: ACM Quote Quad. ACM Press,1989,pp. 231–238.Google Scholar
  22. 22.
    O. Zendra, D. Colnet, S. Collin: Efficient Dynamic Dispatch without Virtual Function Tables: The SmallEiffel Compiler. In: Proceeding of the 12th Annual ACM SIGPLAN Conference on Object-Oriented Programming,Systems,Languages and Applications (OOPSLA’ 97). Atlanta,Georgia,USA,1997,pp. 125–141.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2002

Authors and Affiliations

  • Dietmar Kreye
    • 1
  1. 1.Department of Computer Science and Applied MathematicsUniversity of KielKielGermany

Personalised recommendations