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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Ajtai, M., Gurevich, Y.: Datalog vs. First-Order Logic. In: FOCS 1989 (1989)
Allen, E., Bannet, J., Cartwright, R.: A first-class approach to genericity. In: OOPSLA 2003 (2003)
Ancona, D., Lagorio, G., Zucca, E.: Jam—designing a Java extension with mixins. ACM Trans. Prog. Lang. Syst. 25(5), 641–712 (2003)
Balzer, R., Goldman, N.M., Wile, D.S.: On the transformational implementation approach to programming. In: ICSE 1976 (1976)
Bracha, G., Cook, W.R.: Mixin-based inheritance. In: OOPSLA 1990(1990)
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)
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)
Bryant, A., et al.: Explicit programming. In: AOSD 2002 (2002)
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)
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)
Cohen, T.: Applying Aspect-Oriented Software Development to Middleware Frameworks. PhD thesis, The Technion — Israel Institute of Technology (2007)
Cohen, T., Gil, J.Y., Maman, I.: JTL—the Java Tools Language. In: OOPSLA 2006 (2006)
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)
De Volder, K.: Type-Oriented Logic Meta Programming. PhD thesis, Vrije Universiteit Brussel (1998)
De Volder, K., D’Hondt, T.: Aspect-oriented logic meta programming. In: Int. Conf. on Reflection (1999)
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)
Filman, R.E., Havelund, K.: Realizing aspects by transforming for events. In: ASE 2002 (2002)
Fradet, P., Südholt, M.: An aspect language for robust programming. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628. Springer, Heidelberg (1999)
Gybels, K., Kellens, A.: An experiment in using inductive logic programming to uncover pointcuts. In: European Interactive Workshop on Aspects in Software (2004)
Hajiyev, E., Verbaere, M., de Moor, O.: CodeQuest. In: Thomas, D. (ed.) ECOOP 2006. LNCS, vol. 4067, Springer, Heidelberg (2006)
Huang, S.S., Smaragdakis, Y.: Class Morphing: Expressive and Safe Static Reflection. In: PLDI 2008 (2008)
Janzen, D., De Volder, K.: Navigating and querying code without getting lost. In: AOSD 2003 (2003)
Kiczales, G., et al.: Aspect-Oriented Programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241. Springer, Heidelberg (1997)
Knuth, D.E.: Structured programming with goto statements. ACM Comp. Surv. 6(4) (1974)
Lammel, R.: Declarative aspect-oriented programming. In: Partial Evaluation and Semantic-Based Program Manipulation (1999)
Lopez-Herrejon, R., et al.: A disciplined approach to aspect composition. In: PEPM 2006 (2006)
Meijer, E., Beckman, B., Bierman, G.: LINQ. In: SIGMOD 2006 (2006)
Minamide, Y., Tozawa, A.: XML validation for context free grammars. In: Kobayashi, N. (ed.) APLAS 2006. LNCS, vol. 4279. Springer, Heidelberg (2006)
Minsky, N.: Towards alias-free pointers. In: Cointe, P. (ed.) ECOOP 1996. LNCS, vol. 1098. Springer, Heidelberg (1996)
Minsky, N., Leichter, J.: Law-governed Linda as a coord. model. ECOOP 1994 workshops (1994)
Ostermann, K., et al.: Expressive pointcuts for increased modularity. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586. Springer, Heidelberg (2005)
Ramakrishnan, R., et al.: Safety of recursive Horn clauses with infinite relations. In: PODS 1987 (1987)
Rho, T., et al.: LogicAJ (2006), http://roots.iai.uni-bonn.de/research/logicaj/
Stroustrup, B., Reis, G.D.: Concepts—design choices for template argument checking. ISO/IEC JTC1/SC22/WG21 no. 1522 (2003)
van Wijngaarden, J., Visser, E.: Program transformation mechanics. Technical Report UU-CS-2003-048, Utrecht University (2003)
Visser, E.: Stratego. Rewriting Techniques and Applications (2001)
Visser, E.: A survey of strategies in program transformation systems. ENTCS 57 (2001)
Zloof, M.M.: Query By Example. In: Proc. of the Nat. Comp. Conf. (1975)
Author information
Authors and Affiliations
Editor information
Rights 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)