Advertisement

Efficient implementation of an algebraic specification language

  • H. Klaeren
  • K. Indermark
Part I Algebraic Specification
Part of the Lecture Notes in Computer Science book series (LNCS, volume 394)

Abstract

We consider the implementation of SRDL, a small algebraic specification language with particular emphasis on structural recursion which is for abstract data types the analogue of primitive recursion. We demonstrate how the regular behaviour of structural recursion can be exploited for generating better code. Technically, this is achieved by generalizing loop iteration on integers to bottom-up iteration on trees. Here, it is possible to replace the function stack of activation records by simpler control stacks. On the machine level, this tree walk is performed by a generalization of the Schorr-Waite algorithm to n-ary trees, causing only a small overhead in execution time but no additional memory requirements. The resulting code is faster and requires less storage than usual call by value code.

Keywords

Recursive Call Abstract Machine Input Tree Recursive Definition Abstract Data Type 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [1]
    R.M. Burstall, D.B. MacQueen, D.T. Sannella, HOPE — An Experimental Applicative Language, Univ. Edinburgh, Dept. of Comp.Sci., Report CSR-62-80Google Scholar
  2. [2]
    M.J.C. Gordon, A.J.R.G. Milner, L. Morris, M. Newey, C. Wadsworth, A Metalanguage for Interactive Proofs in LCF, 5th ACM Symp. Princ. of Prog.Lang., Tucson 1978Google Scholar
  3. [3]
    D. Gries, The Schorr-Waite Graph Marking Algorithm, Acta Informatica 11 (1979), 223–232CrossRefGoogle Scholar
  4. [4]
    K. Indermark, Functional compiler description, Banach Center Publications 21 (1988), Polish Academy of Sciences, WarsawGoogle Scholar
  5. [5]
    K. Indermark, H. Klaeren, Compiling Fibonacci-like Recursion, SIGPLAN Notices 22 (1987), No. 6, 101–108CrossRefGoogle Scholar
  6. [6]
    H. Klaeren, Algebraische Spezifikation — Eine Einführung, Springer Lehrbuch Informatik, 1983Google Scholar
  7. [7]
    H. Klaeren, A Constructive Method for Abstract Algebraic Software Specification, Theoretical Computer Science, 30 (1984), 139–204Google Scholar
  8. [8]
    H. Klaeren, Ein algebraischer Ansatz zur Rekursionselimination, Habilitationsschrift, RWTH Aachen, 1988Google Scholar
  9. [9]
    H. Klaeren, ModAs/86 User Manual, Berichte des Lehrstuhls für Informatik II, RWTH Aachen, 1988Google Scholar
  10. [10]
    H. Klaeren, K. Indermark, A New Implementation Technique for Recursive Function Definitions, Aachener Informatik-Berichte Nr. 87-10Google Scholar
  11. [11]
    J. Loeckx, A Formal Description of the Specification Language OBSCURE, Universität des Saarlandes, FB 10, Bericht A85/15Google Scholar
  12. [12]
    H.C. Mayr, P.C. Lockemann, K.R. Dittrich, Operational Replacement Schemes — A Practice-Oriented Approach to the Specification of Abstract Data Types, Universität Karlsruhe, Fakultät für Informatik, Bericht 11/80Google Scholar
  13. [13]
    A. Schubert, Modularisierung algebraischer Spezifikationen zum Einsatz im System-und Programmentwurf, Diplomarbeit, RWTH Aachen, 1986Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1989

Authors and Affiliations

  • H. Klaeren
    • 1
  • K. Indermark
    • 1
  1. 1.Lehrstuhl für Informatik IIRWTH AachenAachenWest Germany

Personalised recommendations