Search citation statements
Paper Sections
Citation Types
Year Published
Publication Types
Relationship
Authors
Journals
We present in this paper a graph-narrowing abstract machine which has been designed to support a sequential eager implementation of a functional logic language. Our approach has been to extend a purely functional, (programmed) graph reduction machine by mechanisms capable of performing unification and backtracking. We describe the structure of the machine and explain the compilation scheme which generates machine code from a given source program. Both the machine and the compilation scheme have been formally specified. A prototype emulator of the machine has been implemented in Occam on a transputer system. Future work is planned for incorporating lazy evaluation and parallelism to the machine. I n t r o d u c t i o nDuring the last years, several approaches have been proposed to achieve an integration of functional and logic programming languages in order to combine the advantages of the two main declarative programming paradigms in a single framework [DeGroot, Lindstrom 86], [Bellia, Levi 86]. Usually one argues that logic languages have more expressive power than functional languages , while the latter have a simpler execution model, particularly suited to parallel implementations. Roughly, many of the existing approaches to the integration of functional and logic programming can be parlLitioned into two classes: On the one hand, Horn clause logic languages enhanced with equality and functions; on the other hand, functional languages augmented with logical capabilities. This second class includes the so called functional logic languages [Reddy 85,87], which retain functional syntax but use narrowing --a unification based parameter passing mechanism which subsumes reduction and SLD-resolution --as operational semantics.We investigate in this paper a sequential, eager implementation of the functional logic language BABEL [Moreno, Rodrignez 89] on a graph narrowing abstract machine. Up to now, BABEL had been developped as a first order, type free language. Here, we extend it to a higher order functional logic language with polymorphic typing.Our approach has been to extend the sequential kernel of a parallel (programmed) graph reduction machine which has been designed for the execution of functional programming languages [Loogen et ai. 89] by the additional features that are necessary to execute functional logic programs, namely, *This work has been partially, supported by a german-spanish cooperation action, funded by the german D.A.A.D. and the spanish M.E.C tLehrstuhl f'tir Informatik II, Ahornstrai$e 55,
We present in this paper a graph-narrowing abstract machine which has been designed to support a sequential eager implementation of a functional logic language. Our approach has been to extend a purely functional, (programmed) graph reduction machine by mechanisms capable of performing unification and backtracking. We describe the structure of the machine and explain the compilation scheme which generates machine code from a given source program. Both the machine and the compilation scheme have been formally specified. A prototype emulator of the machine has been implemented in Occam on a transputer system. Future work is planned for incorporating lazy evaluation and parallelism to the machine. I n t r o d u c t i o nDuring the last years, several approaches have been proposed to achieve an integration of functional and logic programming languages in order to combine the advantages of the two main declarative programming paradigms in a single framework [DeGroot, Lindstrom 86], [Bellia, Levi 86]. Usually one argues that logic languages have more expressive power than functional languages , while the latter have a simpler execution model, particularly suited to parallel implementations. Roughly, many of the existing approaches to the integration of functional and logic programming can be parlLitioned into two classes: On the one hand, Horn clause logic languages enhanced with equality and functions; on the other hand, functional languages augmented with logical capabilities. This second class includes the so called functional logic languages [Reddy 85,87], which retain functional syntax but use narrowing --a unification based parameter passing mechanism which subsumes reduction and SLD-resolution --as operational semantics.We investigate in this paper a sequential, eager implementation of the functional logic language BABEL [Moreno, Rodrignez 89] on a graph narrowing abstract machine. Up to now, BABEL had been developped as a first order, type free language. Here, we extend it to a higher order functional logic language with polymorphic typing.Our approach has been to extend the sequential kernel of a parallel (programmed) graph reduction machine which has been designed for the execution of functional programming languages [Loogen et ai. 89] by the additional features that are necessary to execute functional logic programs, namely, *This work has been partially, supported by a german-spanish cooperation action, funded by the german D.A.A.D. and the spanish M.E.C tLehrstuhl f'tir Informatik II, Ahornstrai$e 55,
Narrowing, the evaluation mechanism of functional logic languages, can be seen as a gener~zation of reduction, the evaluation mechanism of purely functional languages. The unidirectional pattern matching, which is used for parameter passing in functional languages, is simply replaced by the bidirectional unification known from logic programming languages. We show in this paper, how to extend a reduction machine, that has been designed for the evaluation of purely functional programs to a machine that performs narrowing. The necessary extensions concern the realization of unification and backtracking. The latter has to be incorporated to handle nondeterministic computations. It turns out that the resulting narrowing machine can also be seen as an extension of Warren's Prolog engine [Warren 83]. This extension enables a space efficient handling of nested expressions and embodies an optimized treatment of deterministic computations. As in Warren's machine the central component of the machine is a stack that contains environments, i.e. activation records of function calls, and choice points to keep track of possible alternative computations. It is ensured that choice points always contain the minimal amount of information that is necessary to restore a previous state on backtracking. A complete specification of the machine and of the translation of a sample language into abstract machine code is given. To test the feasibility of the new implementation technique a preliminary implementation has been developed in Miranda.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
customersupport@researchsolutions.com
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
Copyright © 2024 scite LLC. All rights reserved.
Made with đź’™ for researchers
Part of the Research Solutions Family.