Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Caching and incrementalisation in the java query language

Published: 19 October 2008 Publication 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.
[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.
[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.
[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.
[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.
[6]
M. Eisenstadt. My hairiest bug war stories. Communications of the ACM, 40(4):30--37, 1997.
[7]
E. Gamma, R. Helm, R. E. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1994.
[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.
[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.
[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.
[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.
[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.
[13]
K. Hartness. Robocode: using games to teach artificial intelligence. Journal of Computing Sciences in Colleges, 19(4):287--291, 2004.
[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.
[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.
[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.
[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.
[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.
[19]
R. Lencevicius. Query-Based Debugging. PhD thesis, University of California, Santa Barbara, 1999. TR--199927.
[20]
R. Lencevicius. On-the-fly query-based debugging with examples. In Proceedings of the Workshop on Automated and Algorithmic Debugging (AADEBUG), 2000.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[29]
P. Mishra and M. H. Eich. Join processing in relational databases. ACM Computing Surveys, 24(1):63--113, 1992.
[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.
[31]
M. Nelson. Robocode, http://robocode.sourceforge.net, 2007.
[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.
[33]
A. Potanin, J. Noble, and R. Biddle. Checking ownership and confinement. Concurrency and Computation: Practice and Experience, 16(7):671--687, 2004.
[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.
[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.
[36]
J. Schwartz, R. Dewar, E. Dubinsky, and E. Schonberg. Programming with Sets: An Introduction to SETL. Springer-Verlag, 1986.
[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.
[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.
[39]
D. Viswanathan and S. Liang. Java virtual machine profiler interface. IBM Systems Journal, 39(1):82--95, 2000.
[40]
J. Warmer and A. Kleppe. The Object Constraint Language: precise modeling with UML. Addison--Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1999.
[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.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 43, Issue 10
September 2008
613 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/1449955
Issue’s Table of Contents
  • cover image ACM Conferences
    OOPSLA '08: Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications
    October 2008
    654 pages
    ISBN:9781605582153
    DOI:10.1145/1449764
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 19 October 2008
Published in SIGPLAN Volume 43, Issue 10

Check for updates

Author Tags

  1. incrementalization
  2. java
  3. querying

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)2
  • Downloads (Last 6 weeks)0
Reflects downloads up to 13 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2019)An extensible approach to implicit incremental model analysesSoftware and Systems Modeling (SoSyM)10.1007/s10270-019-00719-y18:5(3151-3187)Online publication date: 2-Aug-2019
  • (2014)i3QLACM SIGPLAN Notices10.1145/2714064.266024249:10(417-432)Online publication date: 15-Oct-2014
  • (2014)i3QLProceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications10.1145/2660193.2660242(417-432)Online publication date: 15-Oct-2014
  • (2014)REScalaProceedings of the 13th international conference on Modularity10.1145/2577080.2577083(25-36)Online publication date: 22-Apr-2014
  • (2013)Reactive behavior in object-oriented applicationsProceedings of the 12th annual international conference on Aspect-oriented software development10.1145/2451436.2451442(37-48)Online publication date: 24-Mar-2013
  • (2013)Higher-Order reactive programming with incremental listsProceedings of the 27th European conference on Object-Oriented Programming10.1007/978-3-642-39038-8_29(707-731)Online publication date: 1-Jul-2013
  • (2018)Parallel programming with arrays in KappaProceedings of the 5th ACM SIGPLAN International Workshop on Libraries, Languages, and Compilers for Array Programming10.1145/3219753.3219757(24-33)Online publication date: 19-Jun-2018
  • (2016)Demand-driven incremental object queriesProceedings of the 18th International Symposium on Principles and Practice of Declarative Programming10.1145/2967973.2968610(228-241)Online publication date: 5-Sep-2016
  • (2016)Reactive object queries: consistent views in object-oriented languagesCompanion Proceedings of the 15th International Conference on Modularity10.1145/2892664.2892665(23-28)Online publication date: 14-Mar-2016
  • (2016)Removing runtime overhead for optimized object queriesProceedings of the 2016 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation10.1145/2847538.2847545(73-84)Online publication date: 11-Jan-2016
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media