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.
Similar content being viewed by others
References
Aho, A. V.: Nested Stack Automata.J. Assoc. Comput. Mach.,16, 383–406 (1969).
Aho, A. V. and Ullman, J. D.: Translations on a Context Free Grammar.Inform. Control,19, 439–475 (1971).
Aho, A. V. and Ullman, J. D.:The Theory of Parsing, Translation and Compiling, Vols I, II, Prentice Hall, Englewood Cliffs 1973.
Courcelle, B. and Franchi-Zannettacci, P.: Attribute grammars and Recursive Program Schemes I, II.Theoret. Comput. Sci.,17, 163–191 and 235–257 (1982).
Engelfriet, J.: Bottom-Up and Top-Down Tree Transformations — a comparison.Math. Syst. Theory,9, 198–231 (1975).
Engelfriet, J.: Tree Automata and Tree Grammars. Datalogisk Afdeling report, DAIMI FN-10, Aarhus University, 1975.
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.
Engelfriet, J.: Tree Transducers and Syntax Directed Semantics. Memorandum Nr. 363, Technische Hogeschool Twente, 1981.
Engelfriet, J.: Iterated Pushdown Automata and Complexity Classes.Proc. 15th STOC, Boston, April 1983, pp. 365–373.
Engelfriet, J.: Personal communication, 1984.
Engelfriet, J., Slutzki, G.: Extended Macro Grammars and Stack Controlled Machines.J. Comput. Syst. Sci.,29, 366–408 (1984).
Engelfriet, J. and Vogler, H.: Macro Tree Transducer.J. Comput. Syst. Sci.,31, 71–146 (1985).
Engelfriet, J. and Vogler, H.: Pushdown Machines for the Macro Tree Transducer.Theor. Comput. Sci.,42, 251–368 (1986).
Engelfriet, J. and Vogler, H.: Modular Tree Transducers.Theoret. Comput. Sci. 78, 267–303, (1991).
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.
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.
Hudak, P.: Conception, Evolution, and Application of Functional Programming Languages.ACM Comput. Surv.,21, 353–411 (1989).
Huet, G. and Oppen, D. C.: Equation and Rewrite Rules, a Survey.J. Assoc. Comput. Mach.,27, 797–821 (1980).
Hupach, U.: Rekursive Funktionen in mehrsortigen Algebren; Elektron. Informationsverarb.Kybernetik,15, 491–506 (1978).
Indermark, K.: Functional Compiler Description.Banach Center Publications,21, 223–232 (1979).
Klaeren, H. A.: Eine Klasse von Algebren mit struktureller Rekursion und ihre Anwendung bei der abstrakten Software-Spezifikation. Dissertation, RWTH Aachen, 1980.
Klaeren, H.A.: The SRDL Specification experiment. InWorkshop on Program Specification, 1981, LNCS 134, pp. 282–293 (1981).
Klaeren, H. A.: A Constructive Method for Abstract Algebraic Specification.Theoret. Comput. Sci.,30, 139–204 (1984).
Klaeren, H. A.: Ein algebraischer Ansatz zur Rekursionselimination. Habilitationsschrift, RWTH Aachen, 1988.
Klaeren, H.A. and Indermark, K.: A New Implementation Technique for Recursive Function Definitions. Aachener Informatik Berichte Nr. 87-10, RWTH Aachen, 1987.
Klop, J. W.: Term rewriting systems: a tutorial.Butt EATCS,32, 143–182 (1987).
Landin, P. J.: The mechanical evaluation of expressions.Comput. J.,6, 308–320 (1964).
Loogen, R.:Parallele Implementierung funktionaler Programmiersprachen. Informatik Fachberichte 232, Springer Verlag, 1990.
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.
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.
Péter, R.:Rekursive Funktionen, Akademiai Kiado, Budapest, 1957 (English translation: Academic Press, New York, 1967).
Rodriguez-Artalejo, M. and Vogler, H.: Note on a Narrowing Machine for Syntax Directed BABEL. Aachener Informatik Berichte Nr. 89-19, RWTH Aachen, 1989.
Rounds, W. C.: Mappings and Grammars on Trees;Math. Syst. Theory,4 257–287 (1970).
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.
Vogler, H.: Funktionale Programmierung mit primitiver Rekursion — formale Modelle zur Reduktionssemantik; Habilitationsschrift, RWTH Aachen, Oktober 1990.
Author information
Authors and Affiliations
Additional information
The work of this author has been supported by the Deutsche Forschungsgemeinschaft (DFG).
Rights 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
Received:
Accepted:
Issue Date:
DOI: https://doi.org/10.1007/BF01211311