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.
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- M. Eisenstadt. My hairiest bug war stories. Communications of the ACM, 40(4):30--37, 1997. Google Scholar
Digital Library
- E. Gamma, R. Helm, R. E. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1994. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- K. Hartness. Robocode: using games to teach artificial intelligence. Journal of Computing Sciences in Colleges, 19(4):287--291, 2004. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- R. Lencevicius. Query-Based Debugging. PhD thesis, University of California, Santa Barbara, 1999. TR--199927. Google Scholar
Digital Library
- R. Lencevicius. On-the-fly query-based debugging with examples. In Proceedings of the Workshop on Automated and Algorithmic Debugging (AADEBUG), 2000.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- P. Mishra and M. H. Eich. Join processing in relational databases. ACM Computing Surveys, 24(1):63--113, 1992. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- M. Nelson. Robocode, http://robocode.sourceforge.net, 2007.Google Scholar
- 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 Scholar
Digital Library
- A. Potanin, J. Noble, and R. Biddle. Checking ownership and confinement. Concurrency and Computation: Practice and Experience, 16(7):671--687, 2004. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- J. Schwartz, R. Dewar, E. Dubinsky, and E. Schonberg. Programming with Sets: An Introduction to SETL. Springer-Verlag, 1986. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- D. Viswanathan and S. Liang. Java virtual machine profiler interface. IBM Systems Journal, 39(1):82--95, 2000. Google Scholar
Digital Library
- J. Warmer and A. Kleppe. The Object Constraint Language: precise modeling with UML. Addison--Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1999. Google Scholar
Digital Library
- 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 Scholar
Digital Library
Index Terms
Caching and incrementalisation in the java query language
Recommendations
Caching and incrementalisation in the java query language
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 ...
Backstage Java: making a difference in metaprogramming
OOPSLA '11: Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applicationsWe propose Backstage Java (BSJ), a Java language extension which allows algorithmic, contextually-aware generation and transformation of code. BSJ explicitly and concisely represents design patterns and other encodings by employing compile-time ...
Backstage Java: making a difference in metaprogramming
OOPSLA '11We propose Backstage Java (BSJ), a Java language extension which allows algorithmic, contextually-aware generation and transformation of code. BSJ explicitly and concisely represents design patterns and other encodings by employing compile-time ...







Comments