Efficient Object Querying for Java

Modern programming languages have little or no support for querying objects and collections. Programmers are forced to hand code such queries using nested loops, which is both cumbersome and inefficient. We demonstrate that first-class queries over objects and collections improve program readability, provide good performance and are applicable to a large number of common programming problems. We have developed a prototype extension to Java which tracks all objects in a program using AspectJ and allows first-class queries over them in the program. Our experimental findings indicate that such queries can be significantly faster than common programming idioms and within reach of hand optimised queries.

[1]  Ivar Jacobson,et al.  The Unified Modeling Language User Guide , 1998, J. Database Manag..

[2]  Jennifer Widom,et al.  Deriving Production Rules for Incremental View Maintenance , 1991, VLDB.

[3]  Toshihide Ibaraki,et al.  On the optimal nesting order for computing N-relational joins , 1984, TODS.

[4]  Balakrishna R. Iyer,et al.  A polynomial time algorithm for optimizing join queries , 1993, Proceedings of IEEE 9th International Conference on Data Engineering.

[5]  K. Rustan M. Leino,et al.  Modular Verification of Static Class Invariants , 2005, FM.

[6]  Wolfram Schulte,et al.  The essence of data access in Cω: the power is in the dot! , 2005 .

[7]  Guido Moerkotte,et al.  Heuristic and randomized optimization for the join ordering problem , 1997, The VLDB Journal.

[8]  Shigeru Chiba,et al.  A metaobject protocol for C++ , 1995, OOPSLA.

[9]  James Noble,et al.  Relationship aspects , 2006, AOSD.

[10]  Yanhong A. Liu,et al.  Incrementalization across object abstraction , 2005, OOPSLA '05.

[11]  James Noble,et al.  Explicit Relationships in Object Oriented Development , 1995 .

[12]  Jeffrey F. Naughton,et al.  On the relative cost of sampling for join selectivity estimation , 1994, PODS '94.

[13]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[14]  Gavin M. Bierman,et al.  The Essence of Data Access in Comega , 2005, European Conference on Object-Oriented Programming.

[15]  Gavin M. Bierman,et al.  First-Class Relationships in an Object-Oriented Language , 2005, ECOOP.

[16]  James Noble,et al.  Checking ownership and confinement , 2004, Concurr. Pract. Exp..

[17]  Perdita Stevens,et al.  Using UML - software engineering with objects and components, Second Edition , 2006, Addison Wesley object technology series.

[18]  Carlo Zaniolo,et al.  Optimization of Nonrecursive Queries , 1986, VLDB.

[19]  Desmond D'Souza,et al.  Objects, Components, and Frameworks with UML: The Catalysis Approach , 1998 .

[20]  S. Rai,et al.  Safe query objects: statically typed objects as remotely executable queries , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[21]  James Noble Basic Relationship Patterns , 1997 .

[22]  Brian A. Malloy,et al.  The design of an OCL query-based debugger for C++ , 2001, SAC.

[23]  Ambuj K. Singh,et al.  Query-Based Debugging , 1999 .

[24]  Henry G. Baker,et al.  Iterators: signs of weakness in object-oriented languages , 1993, OOPS.

[25]  Ambuj K. Singh,et al.  Dynamic Query-Based Debugging , 1999, ECOOP.

[26]  Raimondas Lencevicius Static Query-Based Debugging , 2000 .

[27]  Frank S. de Boer,et al.  Creational Invariants , 2004 .

[28]  Margaret H. Dunham,et al.  Join processing in relational databases , 1992, CSUR.

[29]  Ivar Jacobson,et al.  Unified Modeling Language , 2020, Definitions.

[30]  James Noble,et al.  Snapshot query-based debugging , 2004, 2004 Australian Software Engineering Conference. Proceedings..

[31]  Ambuj K. Singh,et al.  Query-based debugging of object-oriented programs , 1997, OOPSLA '97.

[32]  K. Rustan M. Leino,et al.  Object Invariants in Dynamic Contexts , 2004, ECOOP.

[33]  Raimondas Lencevicius,et al.  On-the-fly query-based debugging with examples , 2000, AADEBUG.

[34]  Brian A. Malloy,et al.  Using OCL-Queries for debugging C++ , 2001, Proceedings of the 23rd International Conference on Software Engineering. ICSE 2001.

[35]  Marc Eisenstadt,et al.  My hairiest bug war stories , 1997, CACM.

[36]  Anneke Kleppe,et al.  The object constraint language: precise modeling with UML , 1998 .

[37]  Benjamin Livshits,et al.  Finding application errors and security flaws using PQL: a program query language , 2005, OOPSLA '05.

[38]  Alexander Aiken,et al.  Relational queries over program traces , 2005, OOPSLA '05.

[39]  K. Rustan M. Leino,et al.  Verification of Object-Oriented Programs with Invariants , 2003, J. Object Technol..