Skip to main content

Guarded Program Transformations Using JTL

  • Conference paper
Objects, Components, Models and Patterns (TOOLS EUROPE 2008)

Part of the book series: Lecture Notes in Business Information Processing ((LNBIP,volume 11))

Included in the following conference series:

  • 385 Accesses

Abstract

There is a growing research interest in employing the logic paradigm for making queries on software in general, and OOP software in particular. We describes a side-effect-free technique of using the paradigm for the general task of program transformation. Our technique offers a variety of applications, such as implementing generic structures (without erasure) in Java, a Lint-like program checker, and more. By allowing the transformation target to be a different language than the source (program translation), we show how the language can be employed for tasks like the generation of database schemas or XML DTDs that match Java classes.

The technique is an extension of JTL (Java Tools Language, [12]), which is a high-level abstraction over Datalog. We discuss the JTL-to-Datalog compilation process, and how the program transformation extension can be added to JTL without deviating from the logic paradigm, and specifically without introducing side-effects to logic programs.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

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.

Similar content being viewed by others

References

  1. Ajtai, M., Gurevich, Y.: Datalog vs. First-Order Logic. In: FOCS 1989 (1989)

    Google Scholar 

  2. Allen, E., Bannet, J., Cartwright, R.: A first-class approach to genericity. In: OOPSLA 2003 (2003)

    Google Scholar 

  3. Ancona, D., Lagorio, G., Zucca, E.: Jam—designing a Java extension with mixins. ACM Trans. Prog. Lang. Syst. 25(5), 641–712 (2003)

    Article  Google Scholar 

  4. Balzer, R., Goldman, N.M., Wile, D.S.: On the transformational implementation approach to programming. In: ICSE 1976 (1976)

    Google Scholar 

  5. Bracha, G., Cook, W.R.: Mixin-based inheritance. In: OOPSLA 1990(1990)

    Google Scholar 

  6. Bracha, G., Odersky, M., Stoutamire, D., Wadler, P.: Making the future safe for the past: Adding genericity to the Java programming language. In: OOPSLA 1998 (1998)

    Google Scholar 

  7. Brichau, J., Kellens, A., Gybels, K., Mens, K., Hirschfeld, R., D’Hondt, T.: Application-specific models and pointcuts using a logic meta language. In: ESUG 2006 (2006)

    Google Scholar 

  8. Bryant, A., et al.: Explicit programming. In: AOSD 2002 (2002)

    Google Scholar 

  9. Christensen, A.S., Møller, A., Schwartzbach, M.I.: Precise analysis of string expressions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  10. Cohen, S., Gil, J.Y., Zarivach, E.: Datalog programs over infinite databases, revisited. In: Arenas, M., Schwartzbach, M.I. (eds.) DBPL 2007. LNCS, vol. 4797. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  11. Cohen, T.: Applying Aspect-Oriented Software Development to Middleware Frameworks. PhD thesis, The Technion — Israel Institute of Technology (2007)

    Google Scholar 

  12. Cohen, T., Gil, J.Y., Maman, I.: JTL—the Java Tools Language. In: OOPSLA 2006 (2006)

    Google Scholar 

  13. Cohen, T., Gil, J.Y., Maman, I.: JTL and the annoying subtleties of precise μ-pattern definitions. Int. Workshop on Design Pattern Detection for Rev. Eng. (2006)

    Google Scholar 

  14. De Volder, K.: Type-Oriented Logic Meta Programming. PhD thesis, Vrije Universiteit Brussel (1998)

    Google Scholar 

  15. De Volder, K., D’Hondt, T.: Aspect-oriented logic meta programming. In: Int. Conf. on Reflection (1999)

    Google Scholar 

  16. Dijkstra, E.W.: Guarded commands, non-determinancy and a calculus for the derivation of programs. In: Bauer, F.L., Samelson, K. (eds.) Lang. Hierarchies and Interfaces (1975)

    Google Scholar 

  17. Filman, R.E., Havelund, K.: Realizing aspects by transforming for events. In: ASE 2002 (2002)

    Google Scholar 

  18. Fradet, P., Südholt, M.: An aspect language for robust programming. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628. Springer, Heidelberg (1999)

    Google Scholar 

  19. Gybels, K., Kellens, A.: An experiment in using inductive logic programming to uncover pointcuts. In: European Interactive Workshop on Aspects in Software (2004)

    Google Scholar 

  20. Hajiyev, E., Verbaere, M., de Moor, O.: CodeQuest. In: Thomas, D. (ed.) ECOOP 2006. LNCS, vol. 4067, Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  21. Huang, S.S., Smaragdakis, Y.: Class Morphing: Expressive and Safe Static Reflection. In: PLDI 2008 (2008)

    Google Scholar 

  22. Janzen, D., De Volder, K.: Navigating and querying code without getting lost. In: AOSD 2003 (2003)

    Google Scholar 

  23. Kiczales, G., et al.: Aspect-Oriented Programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  24. Knuth, D.E.: Structured programming with goto statements. ACM Comp. Surv. 6(4) (1974)

    Google Scholar 

  25. Lammel, R.: Declarative aspect-oriented programming. In: Partial Evaluation and Semantic-Based Program Manipulation (1999)

    Google Scholar 

  26. Lopez-Herrejon, R., et al.: A disciplined approach to aspect composition. In: PEPM 2006 (2006)

    Google Scholar 

  27. Meijer, E., Beckman, B., Bierman, G.: LINQ. In: SIGMOD 2006 (2006)

    Google Scholar 

  28. Minamide, Y., Tozawa, A.: XML validation for context free grammars. In: Kobayashi, N. (ed.) APLAS 2006. LNCS, vol. 4279. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  29. Minsky, N.: Towards alias-free pointers. In: Cointe, P. (ed.) ECOOP 1996. LNCS, vol. 1098. Springer, Heidelberg (1996)

    Google Scholar 

  30. Minsky, N., Leichter, J.: Law-governed Linda as a coord. model. ECOOP 1994 workshops (1994)

    Google Scholar 

  31. Ostermann, K., et al.: Expressive pointcuts for increased modularity. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586. Springer, Heidelberg (2005)

    Google Scholar 

  32. Ramakrishnan, R., et al.: Safety of recursive Horn clauses with infinite relations. In: PODS 1987 (1987)

    Google Scholar 

  33. Rho, T., et al.: LogicAJ (2006), http://roots.iai.uni-bonn.de/research/logicaj/

  34. Stroustrup, B., Reis, G.D.: Concepts—design choices for template argument checking. ISO/IEC JTC1/SC22/WG21 no. 1522 (2003)

    Google Scholar 

  35. van Wijngaarden, J., Visser, E.: Program transformation mechanics. Technical Report UU-CS-2003-048, Utrecht University (2003)

    Google Scholar 

  36. Visser, E.: Stratego. Rewriting Techniques and Applications (2001)

    Google Scholar 

  37. Visser, E.: A survey of strategies in program transformation systems. ENTCS 57 (2001)

    Google Scholar 

  38. Zloof, M.M.: Query By Example. In: Proc. of the Nat. Comp. Conf. (1975)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Richard F. Paige Bertrand Meyer

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Cohen, T., Gil, J.(., Maman, I. (2008). Guarded Program Transformations Using JTL. In: Paige, R.F., Meyer, B. (eds) Objects, Components, Models and Patterns. TOOLS EUROPE 2008. Lecture Notes in Business Information Processing, vol 11. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-69824-1_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-69824-1_7

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-69823-4

  • Online ISBN: 978-3-540-69824-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics