Tal Cohen

Tal Cohen

Research Areas

Authored Publications
Google Publications
Other Publications
Sort By
  • Title
  • Title, descending
  • Year
  • Year, descending
    Guarded Program Transformations Using JTL
    Joseph (Yossi) Gil
    Itay Maman
    TOOLS EUROPE 2008 (LNBIP 11), Springer-Verlag, Berlin, pp. 100-120
    Preview 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), 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. View details
    Three Approaches to Object Evolution
    Yossi Gil
    7th International Conference on the Principles and Practice of Programming in Java, ACM International Proceedings Series(2009)
    Applying Aspect-Oriented Software Development to Middleware Frameworks
    Ph.D. Thesis, The Technion -- Israel Institute of Technology(2007)
    Preview abstract This work presents a suite of related programming constructs and technologies aimed at integrating aspect-oriented programming (AOP) in the middleware frameworks used for enterprise application development. These constructs include shakeins (and the AspectJ2EE language design based on it), JTL (the Java Tools Language), factories, and object evolution. Shakeins are a novel programming construct which, like mixins and generic classes, generates new classes from existing ones in a universal, uniform, and automatic manner: Given a class, a shakein generates a new class which has the same type as the original, but with different data and code implementation. This thesis argues that shakeins are restricted, yet less chaotic, aspects. It further claims that shakeins are well suited for the introduction of AOP into existing middleware applications. To demonstrate the applicability of shakeins to the middleware framework domain, we introduce the AspectJ2EE language which, with the help of shakeins and a new deploy-time weaving mechanism, brings the blessings of AOP to the enterprise Java (J2EE) framework. A unique advantage of AspectJ2EE, which is less general (and hence less complicated) than AspectJ, is that it can be smoothly integrated into J2EE implementations without breaking their architecture. Any aspect-oriented language or framework must provide developers with a mechanism for specifying a set of join points, i.e., program locations that should be modified by relevant aspects. Such “pointcut” specifications are commonly expressed using queries written in a dedicated, declarative language. We present JTL, the Java Tools Language, as a new query language. JTL provides a rich and powerful query-by-example mechanism which minimizes the abstraction gap between queries and the program elements they match. We further show how JTL can be extended to support program transformations, going as far as making JTL an AOP language in its own right. Factories are presented as a new mechanism for controlling object instantiation, overcoming anomalies that can be found in the construction mechanisms of Java, C++, Eiffel and similar object-oriented languages. Factories (not to be confused with the Factory Method or Abstract Factory design patterns) provide classes with a complete control over their instantiation mechanism. In particular, classes can enforce the application of shakeins to all instances, without disturbing existing client code. Finally, we allow shakeins to behave as dynamic aspects, i.e., aspects that can be applied to an object or removed from it at runtime. Because applying a shakein to a class generates a new class, we find that this implies the ability to change an object’s class at runtime—i.e., object reclassification is required. As it turns out, reclassification using shakeins is part of a more general concept, which we call Object Evolution. Object evolution is a restriction of general reclassification by which dynamic changes to an object’s class are monotonic: an object may gain, but never lose, externally-visible properties. We argue that there are many applications of monotonic evolution in practical systems. The monotonicity property makes it easier to maintain static type safety with object evolution than in general object reclassification. View details
    Better Construction with Factories
    Joseph (Yossi) Gil
    Journal of Object Technology, 6(6)(2007)
    Preview abstract The polymorphic nature of object oriented programs means that client code expecting an instance of class C may use instead an instance of a class C' inheriting from C. But, in order to use such a different instance, one must create it, and in order to do so in current languages, must be familiar with the name of creating class. To break this coupling, we propose the novel notion of factories, which are class services (alongside methods and constructors) that manage the instancecreation step of object construction. In making the case for factories we propose a five-dimensional framework for understanding and analyzing the class notion in various programming languages. We show that factories can naturally replace the “creational” design patterns, and describe the design and implementation of a JAVA language extension supporting both supplier-side and client-side factories. Possible implementations in other languages are discussed as well. View details
    Shakeins: Non-Intrusive Aspects for Middleware Frameworks
    Joseph (Yossi) Gil
    Transactions on Aspect-Oriented Software Development, II (Springer LNCS volume 4242)(2006)
    Preview abstract Shakeins are a novel programming construct which, like mixins and generic classes, generates new classes from existing ones in a universal, uniform, and automatic manner: From a given class, a shakein generates a new class which has the same type as the original, but with different data and code implementation. We argue that shakeins are restricted, yet less chaotic, aspects. We further claim that shakeins are well suited for the introduction of aspect-oriented programming (AOP) into existing middleware applications. We introduce the AspectJ2EE language which, with the help of shakeins and a new deploy-time weaving mechanism, brings the blessings of AOP to the J2EE framework. A unique advantage of AspectJ2EE, which is less general (and hence less complicated) than AspectJ, is that it can be smoothly integrated into J2EE implementations without breaking their architecture. View details
    JTL - the Java Tools Language
    Joseph (Yossi) Gil
    Itay Maman
    ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2006), Portland, Oregon, USA
    Preview abstract We present an overview of JTL (the Java Tools Language, pronounced “Gee-tel”), a novel language for querying Java programs. JTL was designed to serve the development of source code software tools for Java, and as a small language to aid programming language extensions to Java. Applications include definition of pointcuts for aspect-oriented programming, fixing type constraints for generic programming, specification of encapsulation policies, definition of micro-patterns, etc. We argue that the JTL expression of each of these is systematic, concise, intuitive and general. JTL relies on a simply-typed relational database for program representation, rather than an abstract syntax tree. The underlying semantics of the language is restricted to queries formulated in First Order Predicate Logic augmented with transitive closure (FOPL*). Special effort was taken to ensure terse, yet readable expression of logical conditions. The JTL pattern public abstract class, for example, matches all abstract classes which are publicly accessible, while class { public clone(); } matches all classes in which method clone is public. To this end, JTL relies on a Datalog-like syntax and semantics, enriched with quantifiers and pattern matching which all but entirely eliminate the need for recursive calls. JTL’s query analyzer gives special attention to the fragility of the “closed world assumption” in examining Java software, and determines whether a query relies on such an assumption. The performance of the JTL interpreter is comparable to that of JQuery after it generated its database cache, and at least an order of magnitude faster when the cache has to be rebuilt. View details
    JTL and the Annoying Subtleties of Precise μ-Pattern Definitions
    Joseph (Yossi) Gil
    Itay Maman
    1st International Workshop on Design Patterns Detection for Reverse Engineering (DPD4RE/WCRE)(2006)
    Preview abstract We describe the lessons learned from our experience in translating the natural language definitions, and the actual Java implementation, of micro-patterns into the declarative, formal, and ready for execution, yet human-readable equivalent in JTL (the Java Tools Language). View details
    The Delegation-Managed Persistence Entity Bean: A composite entity bean for a new generation
    Java Developer's Journal(2004)
    Preview abstract With the introduction of the EJB 2.0 specification, the classic composite entity bean design pattern became outdated overnight. In this article, I present a new pattern that can serve as a proper replacement. This pattern, called Delegation-Managed Persistence bean (DMP bean), allows developers to represent objects that span multiple database tables. DMP beans provide a better solution than the original Composite EJB pattern without making you roll your own persistence mechanism. View details
    AspectJ2EE = AOP + J2EE
    Joseph (Yossi) Gil
    8th European Conference on Object-Oriented Programming (ECOOP 2004)
    Preview abstract J2EE is a middleware architecture augmented with supporting tools for developing large scale client/server and multi-tier applications. J2EE uses Enterprise JavaBeans as its component model. The realization of these components by a J2EE application server can be conceptually decomposed into distinct aspects such as persistence, transaction management, security, and load balancing. However, current servers do not employ aspect-oriented programming in their implementation. In this paper, we describe a new aspect language, AspectJ2EE, geared towards the generalized implementation of J2EE application servers, and applications within this framework. AspectJ2EE can be easily employed to extend the fixed set of services that these servers provide with new services such as logging and performance monitoring. Even tier-cutting concerns like encryption, data compression, and memoization can be added while avoiding the drags of cross-cutting and scattered code. AspectJ2EE is less general (and hence less complicated) than AspectJ, yet demonstrably powerful enough for the systematic development of large scale (and distributed) applications. The introduction of parameterized aspects makes aspects in AspectJ2EE more flexible and reusable than aspects in AspectJ. AspectJ2EE also generalizes the process of binding services to user applications in the application server into a novel deploy-time weaving of aspects. Deploytime weaving is superior to traditional weaving mechanisms, in that it preserves the object model, has a better management of aspect scope, and presents a more understandable and maintainable semantic model. View details
    Towards a Standard Family of Languages for Matching Patterns in Source Code
    Uri Dekel
    Sara Porat
    Proceedings of IEEE International Conference on Software Science, Technology and Engineering (SwSTE '03)(2003)
    Preview abstract This paper makes a case for the definition of a family of languages for expressing patterns over both the structure and semantics of source code. Our proposal is unique in that it attempts to provide a unified solution to the problem of searching for patterns in multiple programming languages, and in that it focuses on the semantics of the program rather than on its syntactic structure, all while striving to ensure simplicity and ease-of-use. We present the motivation and the unique difficulties involved in defining such languages, discuss strategies for dealing with these problems, and propose a prototype family of Code Pattern Languages (CPLs). View details
    Java Q&A: How Do I Correctly Implement the equals() Method?
    Dr. Dobb's Journal(2002)
    Self-Calibration of Metrics of Java Methods
    Joseph (Yossi) Gil
    Proceedings of Technology of Object-Oriented Languages and Systems 37 (TOOLS Pacific 2000)
    Preview abstract Self-calibration is a new technique for the study of internal product metrics, sometime called “observations” and calibrating these against their frequency, or probability of occurring in common programming practice (CPP). Data gathering and analysis of the distribution of observations is an important prerequisite for predicting external qualities, and in particular sofrware complexity. The main virtue of our technique is that it eliminates the use of absolute values in decision-making, and allows gauging local values in comparison with a scale computed from a standard and global database. Method profiles are introduced as a visual means to compare individual projects or categories of methods against the CPP. Although the techniques are general and could in principle be applied to traditional programming languages, the focus of this paper is on object-oriented languages using Java. The techniques are employed in a suite of 17 metrics in a body of circa thirty thousand Java methods. View details