Abstract
The first part discusses an extension of RELFUN on the basis of ‘multiple-valued clauses’. These extend Horn clauses by multiple ‘foot’ premises, specifying the value sequence to be returned. Functions can thus, relation-like, succeed or fail, enumerate values non-deterministically, return multiple values, and have non-ground arguments and values. Relations act like characteristic functions, permit functionally nested call-by-value arguments, and, like functions, are definable as higher-order operators. Higher-order clauses are characterized by a structure or a (free) variable in some operator position.
The second part describes the WAM compilation of (multiple-valued) RELFUN. Multiple-valued functions are transformed to a ‘denotative’ form, eliminating foots that are active calls. Call-by-value nestings (possibly non-deterministic) are ‘flattened’. Higher-order clauses are reduced to ‘constant-operator’ clauses. Finally, WAM code is generated by extending the use of X-registers and ‘put’/‘get’ instructions: values are put into registers X1, … just before a clause returns; from there, the caller can get them as arguments, as if loaded by top-level put instructions.
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
(1999). Multiple-valued Horn clauses and their WAM compilation. In: A Tight, Practical Integration of Relations and Functions. Lecture Notes in Computer Science, vol 1712. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0103296
Download citation
DOI: https://doi.org/10.1007/BFb0103296
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-66644-8
Online ISBN: 978-3-540-48064-8
eBook Packages: Springer Book Archive