Abstract
Abstract
Modern programming languages typically provide some form of comprehension syntax which renders programs manipulating collection types more readable and understandable. However, comprehension syntax corresponds to nested loops in general. There is no simple way of using it to express efficient general synchronized iterations on multiple ordered collections, such as linear-time algorithms for low-selectivity database joins. Synchrony fold is proposed here as a novel characterization of synchronized iteration. Central to this characterization is a monotonicisBeforepredicate for relating the orderings on the two collections being iterated on and an antimonotoniccanSeepredicate for identifying matching pairs in the two collections to synchronize and act on. A restriction is then placed on Synchrony fold, cutting its extensional expressive power to match that of comprehension syntax, giving us Synchrony generator. Synchrony generator retains sufficient intensional expressive power for expressing efficient synchronized iteration on ordered collections. In particular, it is proved to be a natural generalization of the database merge join algorithm, extending the latter to more general database joins. Finally, Synchrony iterator is derived from Synchrony generator as a novel form of iterator. While Synchrony iterator has the same extensional and intensional expressive power as Synchrony generator, the former is better dovetailed with comprehension syntax. Thereby, algorithms requiring synchronized iterations on multiple ordered collections, including those for efficient general database joins, become expressible naturally in comprehension syntax.
Publisher
Cambridge University Press (CUP)
Reference43 articles.
1. DeWitt, D. J. , Naughton, J. F. & Schneider, D. A. (1991) An evaluation of non-equijoin algorithms. In Proceedings of 17th International Conference on Very Large Data Bases, pp. 443–452.
2. Faking it
Simulating dependent types in Haskell
3. Join processing in relational databases
4. Versatile event correlation with algebraic effects
5. About primitive recursive algorithms
Cited by
2 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献