Skip to main content
Log in

An implementation of syntax directed functional programming on nested-stack machines

  • Published:
Formal Aspects of Computing

Abstract

This paper contributes to the field of functional programming languages. We investigate the call-by-name and call-by-need implementation of a restricted type of functional programming, calledsyntax directed functional programming; the target of this implementation is an abstract machine that is based on nested stacks. In fact, the technical kernel of this paper is a refinement of an automata theoretical result that, roughly speaking, investigates the well-known relationship “recursion = iteration + stack” in the framework of tree transducers. More precisely, in the underlying result the class of functions computed by total deterministic macro tree-to-string transducers with the call-by-name computation strategy is characterized by total deterministic checking-tree nested-stack transducers. Note that total deterministic macro tree-to-string transducers are term rewriting systems by means of which the reduction semantics of syntax directed functional programming languages can be described.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Aho, A. V.: Nested Stack Automata.J. Assoc. Comput. Mach.,16, 383–406 (1969).

    Google Scholar 

  2. Aho, A. V. and Ullman, J. D.: Translations on a Context Free Grammar.Inform. Control,19, 439–475 (1971).

    Google Scholar 

  3. Aho, A. V. and Ullman, J. D.:The Theory of Parsing, Translation and Compiling, Vols I, II, Prentice Hall, Englewood Cliffs 1973.

    Google Scholar 

  4. Courcelle, B. and Franchi-Zannettacci, P.: Attribute grammars and Recursive Program Schemes I, II.Theoret. Comput. Sci.,17, 163–191 and 235–257 (1982).

    Google Scholar 

  5. Engelfriet, J.: Bottom-Up and Top-Down Tree Transformations — a comparison.Math. Syst. Theory,9, 198–231 (1975).

    Google Scholar 

  6. Engelfriet, J.: Tree Automata and Tree Grammars. Datalogisk Afdeling report, DAIMI FN-10, Aarhus University, 1975.

  7. Engelfriet, J.: Some Open Questions and Recent Results on Tree Transducers and Tree Languages. In:Formal Language Theory;Perspectives and Open Problems, R. V. Book (ed.), New York, Academic Press. 1980.

    Google Scholar 

  8. Engelfriet, J.: Tree Transducers and Syntax Directed Semantics. Memorandum Nr. 363, Technische Hogeschool Twente, 1981.

  9. Engelfriet, J.: Iterated Pushdown Automata and Complexity Classes.Proc. 15th STOC, Boston, April 1983, pp. 365–373.

  10. Engelfriet, J.: Personal communication, 1984.

  11. Engelfriet, J., Slutzki, G.: Extended Macro Grammars and Stack Controlled Machines.J. Comput. Syst. Sci.,29, 366–408 (1984).

    Google Scholar 

  12. Engelfriet, J. and Vogler, H.: Macro Tree Transducer.J. Comput. Syst. Sci.,31, 71–146 (1985).

    Google Scholar 

  13. Engelfriet, J. and Vogler, H.: Pushdown Machines for the Macro Tree Transducer.Theor. Comput. Sci.,42, 251–368 (1986).

    Google Scholar 

  14. Engelfriet, J. and Vogler, H.: Modular Tree Transducers.Theoret. Comput. Sci. 78, 267–303, (1991).

    Google Scholar 

  15. Fassbender, H.: Implementierung der Call-by-Need Auswertungsstrategie für Macro Tree-to-String Transducer auf Nested-Stack Maschinen mit geschachtelten AusgabebÄndern. Diplomarbeit, RWTH Aachen, Dezember 1989.

    Google Scholar 

  16. Gladitz, K., Fassbender, H. and Vogler, H.: Compiler-Based Implementation of Syntax-Directed Functional Programming. Ulmer Informatik Berichte Nr. 91-02, UniversitÄt Ulm, 1991.

  17. Hudak, P.: Conception, Evolution, and Application of Functional Programming Languages.ACM Comput. Surv.,21, 353–411 (1989).

    Google Scholar 

  18. Huet, G. and Oppen, D. C.: Equation and Rewrite Rules, a Survey.J. Assoc. Comput. Mach.,27, 797–821 (1980).

    Google Scholar 

  19. Hupach, U.: Rekursive Funktionen in mehrsortigen Algebren; Elektron. Informationsverarb.Kybernetik,15, 491–506 (1978).

    Google Scholar 

  20. Indermark, K.: Functional Compiler Description.Banach Center Publications,21, 223–232 (1979).

    Google Scholar 

  21. Klaeren, H. A.: Eine Klasse von Algebren mit struktureller Rekursion und ihre Anwendung bei der abstrakten Software-Spezifikation. Dissertation, RWTH Aachen, 1980.

    Google Scholar 

  22. Klaeren, H.A.: The SRDL Specification experiment. InWorkshop on Program Specification, 1981, LNCS 134, pp. 282–293 (1981).

    Google Scholar 

  23. Klaeren, H. A.: A Constructive Method for Abstract Algebraic Specification.Theoret. Comput. Sci.,30, 139–204 (1984).

    Google Scholar 

  24. Klaeren, H. A.: Ein algebraischer Ansatz zur Rekursionselimination. Habilitationsschrift, RWTH Aachen, 1988.

    Google Scholar 

  25. Klaeren, H.A. and Indermark, K.: A New Implementation Technique for Recursive Function Definitions. Aachener Informatik Berichte Nr. 87-10, RWTH Aachen, 1987.

    Google Scholar 

  26. Klop, J. W.: Term rewriting systems: a tutorial.Butt EATCS,32, 143–182 (1987).

    Google Scholar 

  27. Landin, P. J.: The mechanical evaluation of expressions.Comput. J.,6, 308–320 (1964).

    Google Scholar 

  28. Loogen, R.:Parallele Implementierung funktionaler Programmiersprachen. Informatik Fachberichte 232, Springer Verlag, 1990.

  29. Loogen, R., Moreno-Navarro, J. J., Kuchen, H. and Rodriguez-Artalejo, M.: Graph-Based Implementation of a Functional Logic Language. Aachener Informatik Berichte Nr. 89-20, RWTH Aachen, 1989.

    Google Scholar 

  30. Moreno-Navarro, J. J. and Rodriguez-Artalejo, M.: Logic Programming with Functions and Predicates: The Language BABEL. Dpto. de Informatica y Automatica UCM, Technical Report DIA/89/3, March 1989.

  31. Péter, R.:Rekursive Funktionen, Akademiai Kiado, Budapest, 1957 (English translation: Academic Press, New York, 1967).

    Google Scholar 

  32. Rodriguez-Artalejo, M. and Vogler, H.: Note on a Narrowing Machine for Syntax Directed BABEL. Aachener Informatik Berichte Nr. 89-19, RWTH Aachen, 1989.

    Google Scholar 

  33. Rounds, W. C.: Mappings and Grammars on Trees;Math. Syst. Theory,4 257–287 (1970).

    Google Scholar 

  34. Thatcher, J. W.: Tree automata: an informal survey. InCurrents in the Theory of Computing, A. V. Aho, (ed.), pp 143–172, Prentice Hall, Englewood Cliffs 1973.

    Google Scholar 

  35. Vogler, H.: Funktionale Programmierung mit primitiver Rekursion — formale Modelle zur Reduktionssemantik; Habilitationsschrift, RWTH Aachen, Oktober 1990.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Additional information

The work of this author has been supported by the Deutsche Forschungsgemeinschaft (DFG).

Rights and permissions

Reprints and permissions

About this article

Cite this article

Fassbender, H., Vogler, H. An implementation of syntax directed functional programming on nested-stack machines. Formal Aspects of Computing 4, 341–375 (1992). https://doi.org/10.1007/BF01211311

Download citation

  • Received:

  • Accepted:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01211311

Keywords

Navigation