EFFICIENT STREAM/ARRAY PROCESSING IN LOGIC PROGRAMMING LANGUAGES.
Kazunori Ueda, Takashi Chikayama · 1984
The Concurrent Prolog predicate for merging n input streams is investigated, and a compilation technique tor getting its efficient code is presented. Using the. technique, data are transferred with a.delay independent of n. Furthermore, it is shown that the addition and the removal of an input stream can be done within an average time of 0(1). The predicate for distributing data on an input stream to fa output streams can also be. realized as efficiently as n-ary merge. The compilation technique for the distributt predicate can further be applied to the implementation of mutable arrays thafallow constant-time accessing and updating. Although the efficiency stated above could be achieved by a sOphisticated compiler, the codes should be provided directly by the system to get rid of the bulk ot source programs and the time required to compile them. 1