On optimising shape-generic array programs using symbolic structural information

  • Authors:
  • Kai Trojahner;Clemens Grelck;Sven-Bodo Scholz

  • Affiliations:
  • University of Lübeck, Institute of Software Technology and Programming Languages;University of Hertfordshire, Department of Computer Science;University of Hertfordshire, Department of Computer Science

  • Venue:
  • IFL'06 Proceedings of the 18th international conference on Implementation and application of functional languages
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

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.