Skip to main content

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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)

    Chapter  Google Scholar 

  2. Afrati, F.N.: On inheritance in object oriented datalog. In: International Workshop on Issues and Applications of Database Technology (IADT), pp. 280–289 (1998)

    Google Scholar 

  3. 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

  4. 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)

    Chapter  Google Scholar 

  5. 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)

    Google Scholar 

  6. Balbin, I., Ramamohanarao, K.: A generalization of the differential approach to recursive query evaluation. Journal of Logic Programming 4(3), 259–262 (1987)

    Article  MathSciNet  MATH  Google Scholar 

  7. 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)

    Google Scholar 

  8. 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)

    Article  Google Scholar 

  9. BluePhoenix. IT discovery. Product description available from company (2004), http://www.bphx.com/Discovery.cfm

  10. 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)

    Google Scholar 

  11. Cast. Application intelligence platform. Product description on company website at, http://www.castsoftware.com (2007)

  12. Checkstyle. Eclipse-cs: Eclipse checkstyle plug-in. Documentation and download at, http://eclipse-cs.sourceforge.net/ (2007)

  13. Chen, Y., Nishimoto, M., Ramamoorthy, C.V.: The C information abstraction system. IEEE Transactions on Software Engineering 16(3), 325–334 (1990)

    Article  Google Scholar 

  14. Chidamber, S.R., Kemerer, C.F.: A metrics suite for object-oriented design. IEEE Transactions on Software Engineering 20(6), 476–493 (1994)

    Article  Google Scholar 

  15. 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)

    Chapter  Google Scholar 

  16. 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)

    Google Scholar 

  17. Crew, R.F.: ASTLOG: A language for examining abstract syntax trees. In: USENIX Conference on Domain-Specific Languages, pp. 229–242 (1997)

    Google Scholar 

  18. 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)

    Article  Google Scholar 

  19. 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)

    Google Scholar 

  20. d. Volder, K.: Aspect-oriented logic meta-programming. In: Cointe, P. (ed.) Reflection 1999. LNCS, vol. 1616, pp. 250–272. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  21. Dijkstra, E.W., Scholten, C.S.: Predicate Calculus and Program Semantics. Texts and Monographs in Computer Science. Springer, Heidelberg (1990)

    Book  MATH  Google Scholar 

  22. Eichberg, M.: Open Integrated Development and Analysis Environments. PhD thesis, Technische Universität Darmstadt (2007), http://elib.tu-darmstadt.de/diss/000808/

  23. 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)

    Chapter  Google Scholar 

  24. 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)

    Chapter  Google Scholar 

  25. EZLegacy. EZ SourceTM. Product description on company website at, http://www.ezlegacy.com (2007)

  26. Gallaire, H., Minker, J.: Logic and Databases. Plenum Press, New York (1978)

    MATH  Google Scholar 

  27. 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)

    Google Scholar 

  28. Hajiyev, E.: CodeQuest: Source Code Querying with Datalog. MSc Thesis, Oxford University Computing Laboratory (September 2005), http://progtools.comlab.ox.ac.uk/projects/codequest/

  29. 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)

    Google Scholar 

  30. 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)

    Google Scholar 

  31. Jarzabek, S.: Design of flexible static program analyzers with PQL. IEEE Transactions on Software Engineering 24(3), 197–215 (1998)

    Article  Google Scholar 

  32. 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)

    Google Scholar 

  33. JFreeChart. Website with documentation and downloads (2007), http://www.jfree.org/jfreechart/

  34. Kaldewaij, A.: The Derivation of Algorithms. Prentice-Hall, Englewood Cliffs (1990)

    MATH  Google Scholar 

  35. 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

    Google Scholar 

  36. Lakos, J.: Large-Scale C++ Software Design. Addison-Wesley, Reading (1996)

    Google Scholar 

  37. 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)

    Google Scholar 

  38. Lhoták, O., Hendren, L.: Jedd: A BDD-based relational extension of Java. In: Programming Language Design and Implementation (PLDI), pp. 158–169 (2004)

    Google Scholar 

  39. Linton, M.A.: Implementing relational views of programs. In: Henderson, P.B. (ed.) Software Development Environments (SDE), pp. 132–140 (1984)

    Google Scholar 

  40. 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)

    Article  Google Scholar 

  41. Martin, R.C.: Agile Software Development, Principles, Patterns and Practices. Prentice-Hall, Englewood Cliffs (2002)

    Google Scholar 

  42. McCormick, E., De Volder, K.: JQuery: finding your way through tangled code. In: Companion to OOPSLA, pp. 9–10. ACM Press, New York (2004)

    Google Scholar 

  43. Metallect. IQ server. Product description on company website at, http://www.metallect.com/what-we-offer/technology/ (2007)

  44. MicroFocus. Application portfolio management. Product description on company website at, http://www.microfocus.com/Solutions/APM/ (2007)

  45. 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)

    Google Scholar 

  46. 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)

    Chapter  Google Scholar 

  47. 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)

    Chapter  Google Scholar 

  48. Paul, S., Prakash, A.: Querying source code using an algebraic query language. IEEE Transactions on Software Engineering 22(3), 202–217 (1996)

    Article  Google Scholar 

  49. Relativity. Application analyzerTM. Product description on company website at, http://www.relativity.com/pages/applicationanalyzer.asp (2007)

  50. 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)

    Chapter  Google Scholar 

  51. The Software Revolution. Janus technologyTM. Product description on company website (2007), http://www.softwarerevolution.com/

  52. Rho, T., Kniesel, G., Appeltauer, M., Linder, A.: LogicAJ (2006), http://roots.iai.uni-bonn.de/research/logicaj/people

  53. Semmle Ltd. Company website with free downloads, documentation, and discussion forums (2007), http://semmle.com

  54. Semmle Ltd. Installation instructions for this tutorial (2007), http://semmle.com/gttse-07

  55. Smacchia, P.: NDepend. Product description on company website at, http://www.ndepend.com (2007)

  56. Spinellis, D.D.: Code Quality: the Open Source Perspective. Addison-Wesley, Reading (2007)

    Google Scholar 

  57. 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)

    Google Scholar 

  58. 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)

    MathSciNet  MATH  Google Scholar 

  59. 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)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics