The Concurrent Prolog predicate for merging n input streams is investigated, and a compilation technique for getting its efficient code is presented. Using the technique, data are transferred with a delay independent of n. It is shown that the addition and the removal of an input stream can be done within an average time of O(1). The predicate for distributing data on an input stream to n output streams can also be realized as efficiently as n-ary merge. The compilation technique for the distribute predicate can further be applied to the implementation of mutable arrays that allow constant-time accessing and updating. These results are also applicable to PARLOG.
|Title of host publication||Unknown Host Publication Title|
|Number of pages||10|
|Publication status||Published - 1984 Dec 1|
ASJC Scopus subject areas