skip to main content
10.1145/1449764.1449766acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

Caching and incrementalisation in the java query language

Authors Info & Claims
Published:19 October 2008Publication History

ABSTRACT

Many contemporary object-oriented programming languages support first-class queries or comprehensions. These language extensions make it easier for programmers to write queries, but are generally implemented no more efficiently than the code using collections, iterators, and loops that they replace. Crucially, whenever a query is re-executed, it is recomputed from scratch. We describe a general approach to optimising queries over mutable objects: query results are cached, and those caches are incrementally maintained whenever the collections and objects underlying those queries are updated. We hope that the performance benefits of our optimisations may encourage more general adoption of first-class queries by object-oriented programmers.

References

  1. U. Acar, A. Ahmed, and M. Blume. Imperative self-adjusting computation. In Proceedings of the ACM Conference on Principles of Programming Languages (POPL), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. G. Bierman, E. Meijer, and W. Schulte. The essence of data access in c!. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP), volume 3586 of Lecture Notes in Computer Science, pages 287--311. Springer-Verlag, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. S. Ceri and J. Widom. Deriving production rules for incremental view maintenance. In Proceedings of the International Conference on Very Large Data Bases (VLDB), pages 577--589. Morgan Kaufmann Publishers Inc., 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. S. Chiba. A metaobject protocol for C++. In Proceedings of the ACM conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), pages 285--299. ACM Press, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. J. Darlington. Program transformation and synthesis: Present capabilities. Technical Report Res. Report 77/43, Dept. of Computing and Control, Imperial College of Science and Technology, London, 1977.Google ScholarGoogle Scholar
  6. M. Eisenstadt. My hairiest bug war stories. Communications of the ACM, 40(4):30--37, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. E. Gamma, R. Helm, R. E. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. S. Goldsmith, R. O'Callahan, and A. Aiken. Relational queries over program traces. In Proceedings of the ACM Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), pages 385--402. ACM Press, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. T. Griffin and L. Libkin. Incremental maintenance of views with duplicates. In Proceedings of the international conference on Management of Data, pages 328--339. ACM Press, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. A. Gupta and I. S. Mumick. Maintenance of materialized views: Problems, techniques and applications. IEEE Quarterly Bulletin on Data Engineering; Special Issue on Materialized Views and Data Warehousing, 18(2):3--18, 1995.Google ScholarGoogle Scholar
  11. A. Gupta, I. S. Mumick, and V. S. Subrahmanian. Maintaining views incrementally. In Proceedings of the international conference on Management of Data, pages 157--166. ACM Press, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. P. J. Haas, J. F. Naughton, and A. N. Swami. On the relative cost of sampling for join selectivity estimation. In Proceedings of the thirteenth ACM symposium on Principles of Database Systems (PODS), pages 14--24. ACM Press, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. K. Hartness. Robocode: using games to teach artificial intelligence. Journal of Computing Sciences in Colleges, 19(4):287--291, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. C. Hobatr and B. A. Malloy. The design of an OCL query-based debugger for C++. In Proceedings of the ACM Symposium on Applied Computing (SAC), pages 658--662. ACM Press, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. C. Hobatr and B. A. Malloy. Using OCL-queries for debugging C++. In Proceedings of the IEEE International Conference on Software Engineering (ICSE), pages 839--840. IEEE Computer Society Press, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. J.--H. Hong and S.-B. Cho. Evolution of emergent behaviors for shooting game characters in robocode. In Proceedings of the 2004 IEEE Congress on Evolutionary Computation, pages 634--638. IEEE Press, 2004.Google ScholarGoogle Scholar
  17. K. Hristova, T. Rothamel, Y. A. Liu, and S. D. Stoller. Efficient type inference for secure information flow. In Proceedings on Programming Languages and Analysis for Security, pages 85--94. ACM Press, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. K. Y. Lee, J. H. Son, and M. H. Kim. Efficient incremental view maintenance in data warehouses. In Proceedings of the conference on Information and knowledge management, pages 349--356. ACM Press, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. R. Lencevicius. Query-Based Debugging. PhD thesis, University of California, Santa Barbara, 1999. TR--199927. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. R. Lencevicius. On-the-fly query-based debugging with examples. In Proceedings of the Workshop on Automated and Algorithmic Debugging (AADEBUG), 2000.Google ScholarGoogle Scholar
  21. R. Lencevicius, U. Holzle, and A. K. Singh. Query-based debugging of object-oriented programs. In Proceedings of the ACM conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), pages 304--317. ACM Press, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. R. Lencevicius, U. Hynamicolzle, and A. K. Singh. query-based debugging. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP), volume 1628 of Lecture Notes in Computer Science, pages 135--160. Springer--Verlag, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Y. A. Liu and S. D. Stoller. From datalog rules to efficient programs with time and space guarantees. In Proceedings of the ACM Conference on Principles and Practice of Declarative Programming, pages 172--183. ACM Press, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Y. A. Liu, S. D. Stoller, M. Gorbovitski, T. Rothamel, and Y. E. Liu. Incrementalization across object abstraction. In Proceedings of the ACM conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), pages 473--486. ACM Press, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Y. A. Liu, S. D. Stoller, N. Li, and T. Rothamel. Optimizing aggregate array computations in loops. ACM Transactions on Programming Languages and Systems, 27(1):91--125, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Y. A. Liu, S. D. Stoller, and T. Teitelbaum. Static caching for incremental computation. ACM Transactions on Programming Languages and Systems, 20(3):546--585, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. M. Martin, B. Livshits, and M. S. Lam. Finding application errors and security flaws using PQL: a program query language. In Proceedings of the ACM conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), pages 365--383. ACM Press, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. E. Meijer, B. Beckman, and G. M. Bierman. LINQ: reconciling object, relations and XML in the .NET framework. In Proceedings of the ACM Symposium on Principles Database Systems, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. P. Mishra and M. H. Eich. Join processing in relational databases. ACM Computing Surveys, 24(1):63--113, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. H. Nakamura. Incremental computation of complex object queries. In Proceedings of the ACM conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), pages 156--165. ACM Press, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. M. Nelson. Robocode, http://robocode.sourceforge.net, 2007.Google ScholarGoogle Scholar
  32. J. O'Kelly and J. P. Gibson. Robocode & problem-based learning: a non-prescriptive approach to teaching programming. In Proceedings of the ACM conference on Innovation and technology in computer science education, pages 217--221, 2006. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. A. Potanin, J. Noble, and R. Biddle. Checking ownership and confinement. Concurrency and Computation: Practice and Experience, 16(7):671--687, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. A. Potanin, J. Noble, and R. Biddle. Snapshot query-based debugging. In Proceedings of the IEEE Australian Software Engineering Conference (ASWEC), pages 251--261. IEEE Computer Society Press, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. G. Ramalingam and T. Reps. A categorized bibliography on incremental computation. In Proceedings of the Conference on the Principles of Programming Languages, pages 502--510. ACM Press, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. J. Schwartz, R. Dewar, E. Dubinsky, and E. Schonberg. Programming with Sets: An Introduction to SETL. Springer-Verlag, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. M. Steinbrunn, G. Moerkotte, and A. Kemper. Heuristic and randomized optimization for the join ordering problem. The VLDB Journal, 6(3):191--208, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. A. N. Swami and B. R. Iyer. A polynomial time algorithm for optimizing join queries. In Proceedings of the International Conference on Data Engineering, pages 345--354, Washington, DC, USA, 1993. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. D. Viswanathan and S. Liang. Java virtual machine profiler interface. IBM Systems Journal, 39(1):82--95, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. J. Warmer and A. Kleppe. The Object Constraint Language: precise modeling with UML. Addison--Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. D. Willis, D. J. Pearce, and J. Noble. Efficient object querying for Java. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP), volume 4067 of Lecture Notes in Computer Science, pages 28--49. Springer-Verlag, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Caching and incrementalisation in the java query language

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!