An Intensional Expressiveness Gap of Comprehension Syntax

Author Limsoon Wong



PDF
Thumbnail PDF

File

OASIcs.Tannen.11.pdf
  • Filesize: 0.65 MB
  • 13 pages

Document Identifiers

Author Details

Limsoon Wong
  • School of Computing, National University of Singapore, Singapore

Acknowledgements

During Val Tannen’s visit to Singapore in 2019, we developed the concept of synchrony iterators [Stefano Perna et al., 2022]. Synchrony iterators enables efficient algorithms for synchronized iterations on multiple collections to be expressed elegantly using comprehension syntax. Notably, they simplify the creation of efficient algorithms for low-selectivity non-equijoins. During our discussions, I was struck by an apparent gap: the difference between the efficiency of database queries in comprehension syntax and their real-world implementation in relational database systems. I am grateful for Val’s friendship and mentorship over the past three and a half decades. I am honoured and glad to contribute this chapter, which bridges the above gap in our understanding of comprehension syntax, as a tribute to Val in this festschrift volume.

Cite AsGet BibTex

Limsoon Wong. An Intensional Expressiveness Gap of Comprehension Syntax. In The Provenance of Elegance in Computation - Essays Dedicated to Val Tannen. Open Access Series in Informatics (OASIcs), Volume 119, pp. 11:1-11:13, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2024)
https://doi.org/10.4230/OASIcs.Tannen.11

Abstract

Comprehension syntax is widely adopted in modern programming languages as a means for manipulating collection types. This paper proves that all subquadratic algorithms which are expressible in comprehension syntax, do not compute low-selectivity joins. As database systems support these joins efficiently, this confirms an intensional expressiveness gap between comprehension syntax and relational database systems. The proof of this intensional expressiveness gap relies on a "limited-mixing" lemma which states that subquadratic algorithms expressible using comprehension syntax have limited ability for mixing atomic objects in their inputs.

Subject Classification

ACM Subject Classification
  • Information systems → Relational database query languages
Keywords
  • Comprehension syntax
  • intensional expressive power
  • limited-mixing lemma

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. Serge Abiteboul and Victor Vianu. Generic computation and its complexity. In Proceedings of 23rd ACM Symposium on the Theory of Computing, pages 209-219, 1991. Google Scholar
  2. Michael W. Blasgen and Kapali Eswaran. Storage and access in relational databases. IBM Systems Journal, 16(4):363-377, 1977. Google Scholar
  3. Peter Buneman, Leonid Libkin, Dan Suciu, Val Tannen, and Limsoon Wong. Comprehension syntax. SIGMOD Record, 23(1):87-96, March 1994. Google Scholar
  4. Peter Buneman, Shamim Naqvi, Val Tannen, and Limsoon Wong. Principles of programming with complex objects and collection types. Theoretical Computer Science, 149(1):3-48, September 1995. Google Scholar
  5. Edgar F. Codd. Relational completeness of data base sublanguages. In R. Rustin, editor, Data Base Systems, pages 65-98. Prentice-Hall, 1972. Google Scholar
  6. Ezra Cooper. The script-writer dream: How to write great SQL in your own language, and be sure it will succeed. In Proceedings of 12th International Symposium on Database Query Languages, pages 36-51, Lyon, France, August 2009. Google Scholar
  7. George Copeland and David Maier. Making Smalltalk a database system. In Proceedings of ACM-SIGMOD 84, pages 316-325, Boston, MA, June 1984. Google Scholar
  8. Haim Gaifman. On local and non-local properties. In Proceedings of the Herbrand Symposium, Logic Colloquium '81, pages 105-135. North Holland, 1982. Google Scholar
  9. John V. Guttag. Introduction to Computation and Programming Using Python: With Application to Understanding Data. MIT Press, 2016. Google Scholar
  10. Lauri Hella, Leonid Libkin, and Juha Nurmonen. Notions of locality and their logical characterizations over finite models. Journal of Symbolic Logic, 64(4):1751-1773, 1999. Google Scholar
  11. Dirk Leinders and Jan Van den Bussche. On the complexity of division and set joins in the relational algebra. Journal of Computer and System Sciences, 73(4):538-549, June 2007. Google Scholar
  12. Leonid Libkin. On the forms of locality over finite models. In Proceedings of 12th IEEE Symposium on Logic in Computer Science, pages 204-215, 1997. Google Scholar
  13. Leonid Libkin and Limsoon Wong. Aggregate functions, conservative extension, and linear orders. In Catriel Beeri, Atsushi Ohori, and Dennis E. Shasha, editors, Proceedings of 4th International Workshop on Database Programming Languages, New York, August 1993, pages 282-294. Springer-Verlag, January 1994. Google Scholar
  14. Leonid Libkin and Limsoon Wong. Conservativity of nested relational calculi with internal generic functions. Information Processing Letters, 49(6):273-280, March 1994. Google Scholar
  15. Leonid Libkin and Limsoon Wong. Query languages for bags and aggregate functions. Journal of Computer and System Sciences, 55(2):241-272, October 1997. Google Scholar
  16. Martin Odersky, Lex Spoon, and Bill Venners. Programming in Scala: A Comprehensive Step-by-Step Guide. Artima Inc., December 2019. Google Scholar
  17. Stefano Perna, Val Tannen, and Limsoon Wong. Iterating on multiple collections in synchrony. Journal of Functional Programming, 32:e9, July 2022. Google Scholar
  18. Dan Suciu and Jan Paredaens. The complexity of the evaluation of complex algebra expressions. Journal of Computer and Systems Sciences, 55(2):322-343, October 1997. Google Scholar
  19. Dan Suciu and Limsoon Wong. On two forms of structural recursion. In LNCS 893: Proceedings of 5th International Conference on Database Theory, pages 111-124, Prague, January 1995. Springer-Verlag. Google Scholar
  20. Stan J. Thomas and Patrick C. Fischer. Nested Relational Structures, pages 269-307. JAI Press, London, England, 1986. Google Scholar
  21. Wolfgang Wechler. Universal Algebra for Computer Scientists, volume 25 of EATCS Monograph on Theoretical Computer Science. Springer-Verlag, Berlin, 1992. Google Scholar
  22. Limsoon Wong. Normal forms and conservative extension properties for query languages over collection types. Journal of Computer and System Sciences, 52(3):495-505, June 1996. Google Scholar
  23. Limsoon Wong. Kleisli, a functional query system. Journal of Functional Programming, 10(1):19-56, 2000. Google Scholar
  24. Limsoon Wong. A dichotomy in the intensional expressive power of nested relational calculi augmented with aggregate functions and a powerset operator. In Proceedings of 32nd ACM Symposium on Principles of Database Systems, pages 285-295, New York, June 2013. Google Scholar
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail