Abstract
These notes are an introduction to .QL, an object-oriented query language for any type of structured data. We illustrate the use of .QL in assessing software quality, namely to find bugs, to compute metrics and to enforce coding conventions. The class mechanism of .QL is discussed in depth, and we demonstrate how it can be used to build libraries of reusable queries.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Abiteboul, S., Lausen, G., Uphoff, H., Waller, E.: Methods and rules. In: Buneman, P., Jaodia, S. (eds.) Proceedings of the 1993 ACM SIGMOD International Conference on Management of Data, pp. 32–41. ACM Press, New York (1993)
Afrati, F.N.: On inheritance in object oriented datalog. In: International Workshop on Issues and Applications of Database Technology (IADT), pp. 280–289 (1998)
ASG. ASG-becubicTM for understanding and managing the enterprise’s application portfolio. Product description on company website (2007), http://asg.com/products/product_details.asp?code=BSZ
Avgustinov, P., Christensen, A.S., Hendren, L., Kuzins, S., Lhoták, J., Lhoták, O., de Moor, O., Sereni, D., Sittampalam, G., Tibble, J.: An extensible AspectJ compiler. In: Rashid, A., Akşit, M. (eds.) Transactions on Aspect-Oriented Software Development. LNCS, vol. 3880, pp. 293–334. Springer, Heidelberg (2006)
Avgustinov, P., Hajiyev, E., Ongkingco, N., de Moor, O., Sereni, D., Tibble, J., Verbaere, M.: Semantics of static pointcuts in AspectJ. In: Felleisen, M. (ed.) Principles of Programming Languages (POPL), pp. 11–23. ACM Press, New York (2007)
Balbin, I., Ramamohanarao, K.: A generalization of the differential approach to recursive query evaluation. Journal of Logic Programming 4(3), 259–262 (1987)
Bancilhon, F., Maier, D., Sagiv, Y., Ullman, J.D.: Magic sets and other strange ways to implement logic programs. In: Proceedings of the Fifth ACM SIGACT-SIGMOD Symposium on Principles of Database Systems, 1986, pp. 1–16. ACM Press, New York (1986)
Basili, V., Brand, L., Melo, W.: A validation of object-oriented design metrics as quality indicators. IEEE Transactions on Software Engineering 22(10), 751–760 (1996)
BluePhoenix. IT discovery. Product description available from company (2004), http://www.bphx.com/Discovery.cfm
Cardelli, L., Matthes, F., Abadi, M.: Extensible grammars for language specialization. In: Beeri, C., Ohori, A., Shasha, D. (eds.) Database Programming Languages, pp. 11–31. Springer, Heidelberg (1993)
Cast. Application intelligence platform. Product description on company website at, http://www.castsoftware.com (2007)
Checkstyle. Eclipse-cs: Eclipse checkstyle plug-in. Documentation and download at, http://eclipse-cs.sourceforge.net/ (2007)
Chen, Y., Nishimoto, M., Ramamoorthy, C.V.: The C information abstraction system. IEEE Transactions on Software Engineering 16(3), 325–334 (1990)
Chidamber, S.R., Kemerer, C.F.: A metrics suite for object-oriented design. IEEE Transactions on Software Engineering 20(6), 476–493 (1994)
Cohen, T., Gil, J., Maman, I.: JTL - the Java Tools Language. In: 21st Annual Conference on Object-oriented Programming, systems languages and applications (OOPSLA 2006), pp. 89–108. ACM Press, New York (2006)
Consens, M., Mendelzon, A., Ryman, A.: Visualizing and querying software structures. In: ICSE 1992: Proceedings of the 14th international conference on Software engineering, pp. 138–156. ACM Press, New York (1992)
Crew, R.F.: ASTLOG: A language for examining abstract syntax trees. In: USENIX Conference on Domain-Specific Languages, pp. 229–242 (1997)
Darcy, D.P., Slaughter, S.A., Kemerer, C.F., Tomayko, J.E.: The structural complexity of software: an experimental test. IEEE Transactions on Software Engineering 31(11), 982–995 (2005)
Dawson, S., Ramakrishnan, C.R., Warren, D.S.: Practical program analysis using general purpose logic programming systems. In: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pp. 117–126. ACM Press, New York (1996)
d. Volder, K.: Aspect-oriented logic meta-programming. In: Cointe, P. (ed.) Reflection 1999. LNCS, vol. 1616, pp. 250–272. Springer, Heidelberg (1999)
Dijkstra, E.W., Scholten, C.S.: Predicate Calculus and Program Semantics. Texts and Monographs in Computer Science. Springer, Heidelberg (1990)
Eichberg, M.: Open Integrated Development and Analysis Environments. PhD thesis, Technische Universität Darmstadt (2007), http://elib.tu-darmstadt.de/diss/000808/
Eichberg, M., Kahl, M., Saha, D., Mezini, M., Ostermann, K.: Automatic incrementalization of prolog based static analyses. In: Hanus, M. (ed.) PADL 2007. LNCS, vol. 4354, pp. 109–123. Springer, Heidelberg (2007)
Eichberg, M., Mezini, M., Ostermann, K.: Pointcuts as functional queries. In: Chin, W.-N. (ed.) APLAS 2004. LNCS, vol. 3302, pp. 366–381. Springer, Heidelberg (2004)
EZLegacy. EZ SourceTM. Product description on company website at, http://www.ezlegacy.com (2007)
Gallaire, H., Minker, J.: Logic and Databases. Plenum Press, New York (1978)
Gybels, K., Brichau, J.: Arranging language features for more robust pattern-based crosscuts. In: 2nd International Conference on Aspect-Oriented Software Development, pp. 60–69. ACM Press, New York (2003)
Hajiyev, E.: CodeQuest: Source Code Querying with Datalog. MSc Thesis, Oxford University Computing Laboratory (September 2005), http://progtools.comlab.ox.ac.uk/projects/codequest/
Hajiyev, E., Verbaere, M., de Moor, O.: CodeQuest: scalable source code queries with Datalog. In: Thomas, D. (ed.) ECOOP 2006. LNCS, vol. 4067, pp. 2–27. Springer, Heidelberg (2006)
Janzen, D., de Volder, K.: Navigating and querying code without getting lost. In: 2nd International Conference on Aspect-Oriented Software Development, pp. 178–187 (2003)
Jarzabek, S.: Design of flexible static program analyzers with PQL. IEEE Transactions on Software Engineering 24(3), 197–215 (1998)
Javey, S., Mitsui, K., Nakamura, H., Ohira, T., Yasuda, K., Kuse, K., Kamimura, T., Helm, R.: Architecture of the XL C++ browser. In: CASCON 1992: Proceedings of the 1992 conference of the Centre for Advanced Studies on Collaborative research, pp. 369–379. IBM Press (1992)
JFreeChart. Website with documentation and downloads (2007), http://www.jfree.org/jfreechart/
Kaldewaij, A.: The Derivation of Algorithms. Prentice-Hall, Englewood Cliffs (1990)
Kniesel, G., Hannemann, J., Rho, T.: A comparison of logic-based infrastructures for concern detection and extraction. In: LATE R 2007 – Linking Aspect Technology and Evolution. ACM, New York (2007), http://www.cs.uni-bonn.de/~gk/papers/knieselHannemannRho-late07.pdf
Lakos, J.: Large-Scale C++ Software Design. Addison-Wesley, Reading (1996)
Lam, M.S., Whaley, J., Livshits, V.B., Martin, M.C., Avots, D., Carbin, M., Unkel, C.: Context-sensitive program analysis as database queries. In: Proceedings of PODS, pp. 1–12. ACM Press, New York (2005)
Lhoták, O., Hendren, L.: Jedd: A BDD-based relational extension of Java. In: Programming Language Design and Implementation (PLDI), pp. 158–169 (2004)
Linton, M.A.: Implementing relational views of programs. In: Henderson, P.B. (ed.) Software Development Environments (SDE), pp. 132–140 (1984)
Liu, M., Dobbie, G., Ling, T.W.: A logical foundation for deductive object-oriented databases. ACM Transactions on Database Systems 27(1), 117–151 (2002)
Martin, R.C.: Agile Software Development, Principles, Patterns and Practices. Prentice-Hall, Englewood Cliffs (2002)
McCormick, E., De Volder, K.: JQuery: finding your way through tangled code. In: Companion to OOPSLA, pp. 9–10. ACM Press, New York (2004)
Metallect. IQ server. Product description on company website at, http://www.metallect.com/what-we-offer/technology/ (2007)
MicroFocus. Application portfolio management. Product description on company website at, http://www.microfocus.com/Solutions/APM/ (2007)
Morgan, C., De Volder, K., Wohstadter, E.: A static aspect language for checking design rules. In: De Moor, O. (ed.) Aspect-Oriented Software Development (AOSD 2007), pp. 63–72 (2007)
Nystrom, N., Clarkson, M.R., Myers, A.C.: Polyglot: An extensible compiler framework for Java. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 138–152. Springer, Heidelberg (2003)
Ostermann, K., Mezini, M., Bockish, C.: Expressive pointcuts for increased modularity. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 214–240. Springer, Heidelberg (2005)
Paul, S., Prakash, A.: Querying source code using an algebraic query language. IEEE Transactions on Software Engineering 22(3), 202–217 (1996)
Relativity. Application analyzerTM. Product description on company website at, http://www.relativity.com/pages/applicationanalyzer.asp (2007)
Reps, T.W.: Demand interprocedural program analysis using logic databases. In: Ramakrishnan, R. (ed.) Applications of Logic Databases. International Series in Engineering and Computer Science, vol. 296, pp. 163–196. Kluwer, Dordrecht (1995)
The Software Revolution. Janus technologyTM. Product description on company website (2007), http://www.softwarerevolution.com/
Rho, T., Kniesel, G., Appeltauer, M., Linder, A.: LogicAJ (2006), http://roots.iai.uni-bonn.de/research/logicaj/people
Semmle Ltd. Company website with free downloads, documentation, and discussion forums (2007), http://semmle.com
Semmle Ltd. Installation instructions for this tutorial (2007), http://semmle.com/gttse-07
Smacchia, P.: NDepend. Product description on company website at, http://www.ndepend.com (2007)
Spinellis, D.D.: Code Quality: the Open Source Perspective. Addison-Wesley, Reading (2007)
Ullman, J.D.: A comparison between deductive and object-oriented database systems. In: 2nd International Conference on Deductive and Object-Oriented Databases. Springer Lecture Notes in Computer Science, pp. 263–277 (1991)
van Gelder, A., Ross, K.A., Schlipf, J.S.: The well-founded semantics for general logic programs. Journal of the ACM 38(3), 620–650 (1991)
Whaley, J., Avots, D., Carbin, M., Lam, M.S.: Using datalog and binary decision diagrams for program analysis. In: Yi, K. (ed.) APLAS 2005. LNCS, vol. 3780, pp. 97–118. Springer, Heidelberg (2005)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
de Moor, O. et al. (2008). .QL: Object-Oriented Queries Made Easy. In: Lämmel, R., Visser, J., Saraiva, J. (eds) Generative and Transformational Techniques in Software Engineering II. GTTSE 2007. Lecture Notes in Computer Science, vol 5235. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-88643-3_3
Download citation
DOI: https://doi.org/10.1007/978-3-540-88643-3_3
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-88642-6
Online ISBN: 978-3-540-88643-3
eBook Packages: Computer ScienceComputer Science (R0)