Abstract
This paper discusses issues in a sequential implementation of a subset-equational language, an extension of the equational programming paradigm for efficient treatment of set-valued functions. Subset assertions have the form f(terms)⊇expression, and in general, multiple subset assertions may be used to define a set-valued function f. They incorporate a collect-all capability, so that the meaning of a set-valued function f applied to argument terms is equal to the union of the respective sets defined by the different subset assertions for f. The universe of terms also includes set-valued terms; hence the matching operation between terms is set matching. The multiple matches arising from set matching effectively serve to iterate over the elements of sets, thus permitting many useful set operations to be stated nonrecursively. The main features of this implementation are: (1) compiling the commonly occurring forms of set patterns using instructions similar to the WAM instructions for PROLOG; (2) avoiding checks for duplicates and construction of intermediate sets in argument positions of functions when they distribute over union in these arguments; and (3) performing last-call optimization for both equational and subset assertions. An implementation of these ideas has been completed, and compiled code for typical program fragments is presented, as well as performance figures for the key optimizations.
| Original language | English |
|---|---|
| Pages (from-to) | 299-324 |
| Number of pages | 26 |
| Journal | Journal of Logic Programming |
| Volume | 12 |
| Issue number | 4 |
| DOIs | |
| State | Published - Apr 1992 |
Fingerprint
Dive into the research topics of 'Implementation of subset-equational programs'. Together they form a unique fingerprint.Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver