## A Virtual Machine for Functional Logic Computations (2005)

### Cached

### Download Links

Venue: | In Proc. of the 16th International Workshop on Implementation and Application of Functional Languages (IFL 2004 |

Citations: | 18 - 17 self |

### BibTeX

@INPROCEEDINGS{Antoy05avirtual,

author = {Sergio Antoy and Michael Hanus and Jimeng Liu and Andrew Tolmach},

title = {A Virtual Machine for Functional Logic Computations},

booktitle = {In Proc. of the 16th International Workshop on Implementation and Application of Functional Languages (IFL 2004},

year = {2005},

pages = {108--125},

publisher = {Springer LNCS}

}

### Years of Citing Articles

### OpenURL

### Abstract

Abstract. We describe the architecture of a virtual machine for executing functional logic programming languages. A distinguishing feature of our machine is that it preserves the operational completeness of non-deterministic programs by concurrently executing a pool of independent computations. Each computation executes only root-needed sequential narrowing steps. We describe the machine’s architecture and instruction set, and show how to compile overlapping inductively sequential programs to sequences of machine instructions. The machine has been implemented in Java and in Standard ML. 1

### Citations

334 | Functional logic programming: From theory to Curry
- Hanus
- 2013
(Show Context)
Citation Context ...on of related work. 2 Functional Logic Computations Functional logic computations generalize functional computations by adding three specific features: non-determinism, narrowing and residuation (see =-=[12]-=- for a survey). Our machine is not designed for a specific programming language. The examples in this paper are in Curry, but the details of the source language are largely irrelevant. Our only assump... |

291 | A needed narrowing strategy
- Antoy, Echahed, et al.
(Show Context)
Citation Context ...t and the comments at the right are not part of the code itself. a definitional tree is a high-level abstraction for the definition of a sound, complete and theoretically efficient narrowing strategy =-=[6]-=-, mapping this strategy into virtual machine instructions increases our confidence in both the correctness and the efficiency of the execution. The notation for the variant of definitional trees we us... |

152 | Definitional trees
- Antoy
- 1992
(Show Context)
Citation Context ...). This code is executed when the top of the pre-narrex stack contains a term of the form u++v. 3.7 Compilation Every function of an overlapping inductively sequential program has a definitional tree =-=[2, 3]-=-, which is a hierarchical representation of the rewrite rules of a function that has become the standard device for the implementation of narrowing computations. We compile each definitional tree into... |

141 | A unified computation model for functional and logic programming
- Hanus
- 1997
(Show Context)
Citation Context ...into a single paradigm. In the last decade, the theory of functional logic computations has made substantial progress. Significant milestones include a model that integrates narrowing and residuation =-=[13]-=-, narrowing strategies for several classes of programs suitable for functional logic languages [5], a functional-like model for non-deterministic computations [3], and well-defined semantics for progr... |

126 |
TOY: A multiparadigm declarative system
- López-Fraguas, Sánchez-Hernández
- 1999
(Show Context)
Citation Context ...ed semantics for programming languages of this kind [1, 11]. These results have been influential in the design and implementations of functional logic programming languages, e.g., Curry [18] and T OY =-=[19]-=-. Most existing implementations of these languages are based on a translation of source code to Prolog code (e.g., [7]), which can be executed by existing standard Prolog engines. This approach simpli... |

88 |
Higher-order extensions to Prolog: are they needed
- Warren
- 1982
(Show Context)
Citation Context ...ed as an application of a specific first-order function apply (where partial applications are considered as data terms)—a standard technique to extend first-order languages with higher-order features =-=[23]-=-. (Additional preliminary compiler transformations, e.g., name resolution, lambda lifting, etc., are typically needed to turn source programs into rewrite system form; we do not discuss these further ... |

76 | Higher-Order Narrowing with Definitional Trees
- Hanus, Prehofer
- 1999
(Show Context)
Citation Context ...e activity of the machine, during which the definitions of functions are applied. Since normal form computations can be modeled by head normal form computations using auxiliary operations (see, e.g., =-=[15]-=-), we concentrate on head normal form computations in this paper; they are described in more detail in Section 3.3. Parallel-and computations handle the evaluation of a conjunction of two terms. Resid... |

61 | Optimal non-deterministic functional logic computations
- Antoy
(Show Context)
Citation Context ...integrates narrowing and residuation [13], narrowing strategies for several classes of programs suitable for functional logic languages [5], a functional-like model for non-deterministic computations =-=[3]-=-, and well-defined semantics for programming languages of this kind [1, 11]. These results have been influential in the design and implementations of functional logic programming languages, e.g., Curr... |

57 |
PAKCS: The Portland Aachen Kiel Curry System. Available at http://www.informatik. uni-kiel.de/~pakcs
- Hanus, Antoy, et al.
- 2013
(Show Context)
Citation Context ...ram. This test shows that the machine executes approximately 0.5 million reductions (i.e., function calls) per second on a 2.0 Ghz Linux-PC (with AMD Athlon XP 2600). On the same benchmark, the PAKCS =-=[14]-=- implementation of Curry, which compiles Curry programs into Prolog using the scheme in [7], runs about twice as fast. PAKCS is one of the most efficient Curry implementations, apart from MCC [20], wh... |

55 | Operational semantics for declarative multi-paradigm languages
- Albert, Hanus, et al.
- 2005
(Show Context)
Citation Context ...eral classes of programs suitable for functional logic languages [5], a functional-like model for non-deterministic computations [3], and well-defined semantics for programming languages of this kind =-=[1, 11]-=-. These results have been influential in the design and implementations of functional logic programming languages, e.g., Curry [18] and T OY [19]. Most existing implementations of these languages are ... |

55 | Compiling Multi-Paradigm Declarative Programs into Prolog
- Antoy, Hanus
- 2000
(Show Context)
Citation Context ...ementations of functional logic programming languages, e.g., Curry [18] and T OY [19]. Most existing implementations of these languages are based on a translation of source code to Prolog code (e.g., =-=[7]-=-), which can be executed by existing standard Prolog engines. This approach simplifies the task of implementing functional logic language features: e.g., source language variables can be implemented b... |

54 | Constructor-based conditional narrowing
- Antoy
(Show Context)
Citation Context ...st pushed on the stack in reverse order. The MAKETERM instruction, which is parameterized by the symbol being applied, replaces these arguments with the application term. For example, the term [1,2]++=-=[3,4]-=-, which is a narrex, is replaced by 1:([2]++[3,4]) which is constructed as follows. First, the handles for the terms [3,4] and [2] are pushed on the pre-term stack. Executing “MAKETERM ++” replaces th... |

40 | Call by Need Computations to Root-Stable Form
- Middeldorp
- 1997
(Show Context)
Citation Context ...tion of a head normal form computation attempts to rewrite an operationrooted term into a constructor-rooted term or variable. The evaluation strategy executed by our machine is root-needed reduction =-=[21]-=- with the addition of narrowing and nondeterministic steps. Simply put, the strategy repeatedly attempts to apply rewrite rules at the top of an operation-rooted term until a constructor-rooted term o... |

29 | F.: Controlling search in declarative programs
- Hanus, Steiner
- 1998
(Show Context)
Citation Context ...the depth-first evaluation strategy of the Prolog system causes the loss of the operational completeness of functional logic computations and inhibits the implementation of advanced search strategies =-=[17]-=-. ⋆ This work was supported in part by the National Science Foundation under grants CCR0110496 and CCR-0218224 and by the German Research Council (DFG) under grants Ha 2457/1-2 and Ha 2457/5-1.sThis p... |

28 | Evaluation strategies for functional logic programming
- Antoy
- 2005
(Show Context)
Citation Context ...bstantial progress. Significant milestones include a model that integrates narrowing and residuation [13], narrowing strategies for several classes of programs suitable for functional logic languages =-=[5]-=-, a functional-like model for non-deterministic computations [3], and well-defined semantics for programming languages of this kind [1, 11]. These results have been influential in the design and imple... |

21 | An abstract machine for Curry and its concurrent implementation
- Hanus, Sadre
- 1999
(Show Context)
Citation Context ...a and ML due to their built-in support for automatic memory management and appropriate programming abstractions which simplified the development of our prototypes. The same approach has been taken in =-=[16]-=-, which describes an abstract machine for Curry and its implementation in Java. On the negative side, the use of Java limits the speed of the execution—the Java implementation in [16] is more than an ... |

15 |
An efficient abstract machine for Curry
- Lux, Kuchen
- 1999
(Show Context)
Citation Context ...KCS [14] implementation of Curry, which compiles Curry programs into Prolog using the scheme in [7], runs about twice as fast. PAKCS is one of the most efficient Curry implementations, apart from MCC =-=[20]-=-, which produces native code. However, neither of these implementations is operationally complete. For example, neither produces a solution to example (3).scompileTree (Branch(p, pos, flex?, [T1, . . ... |

14 |
An approach to declarative programming based on a rewriting logic
- Moreno, Fraguas, et al.
- 1999
(Show Context)
Citation Context ...eral classes of programs suitable for functional logic languages [5], a functional-like model for non-deterministic computations [3], and well-defined semantics for programming languages of this kind =-=[1, 11]-=-. These results have been influential in the design and implementations of functional logic programming languages, e.g., Curry [18] and T OY [19]. Most existing implementations of these languages are ... |

12 | Implementing functional logic languages using multiple threads and stores
- Tolmach, Antoy, et al.
(Show Context)
Citation Context ...ewer possibilities for optimization, e.g., the sharing of deterministic evaluations between non-deterministic computations discussed in Section 4. Thus, this implementation is no longer supported. In =-=[22]-=-, Tolmach, Antoy, and Nita describe a definitional interpreter for Curry-like languages based on the semantics of Albert, et al. [1]. The primary contrast with the present work is in the treatment of ... |

6 | Towards the uniform implementation of declarative languages. Computer Languages
- Chakravarty, Lock
- 1997
(Show Context)
Citation Context ...d-only code that operates on multiple variant versions of the heap. A direct performance comparison between these two approaches remains to be made. Among related work by others, Chakravarty and Lock =-=[10]-=- proposed a virtual machine for functional logic languages that combines implementation techniques from functional and logic programming in an orthogonal way. To implement logic language features, the... |

3 | TeaBag: A Functional Logic Language Debugger
- Antoy, Johnson
- 2004
(Show Context)
Citation Context ...ved. Presenting steps in the order in which they are executed produces traces which are hard to read. An external debugger with a suitable interface for non-deterministic computations is described in =-=[9]-=-. Finally, we have implemented a handful of modules for built-in types, such as the integers, that cannot be compiled from source programs. To conclude, we have a solid, though preliminary, implementa... |