Lay summary
As software systems grow in complexity and execution platforms become more and more sophisticated, it becomes harder and harder for a software engineer to understand, tune, or debug programs. Existing program analysis tools offer limited support, in part because there is a big gap between the abstractions provided by tools and the abstractions employed by software engineers. In this project, we explore a new approach to developing program analysis tools with considerably less programming effort. Our research will address the question: Can we raise the abstraction level for writing dynamic analysis tools, allowing software engineers to rapidly develop custom analysis tools, impairing neither expressiveness nor tool performance?

Program analysis for object-oriented programming languages is difficult. On the one hand, the use of polymorphism, reflection, and dynamic code loading limits the applicability of static analysis in modern object-oriented programming languages. So dynamic program analysis is becoming increasingly important as it supports a wide range of software engineering tasks such as profiling, debugging, testing, program comprehension, and reverse engineering. On the other hand, dynamic program analysis is poorly supported by tools. Writing dynamic analysis tools requires in-depth expert knowledge of low-level techniques such as program instrumentation, and as a result, the process is tedious, time-consuming, and error-prone. Consequently, most software engineers do not write custom dynamic analysis tools but rely on a limited number of tools provided by third parties. Sometimes, the available analysis tools do not exactly meet the requirements of the software engineer, who may need to explore a specific feature of an application.

Aspect-oriented programming (AOP) gives the programmer a powerful toolset to modify a program, but AOP systems may incur high execution overhead and at the same time overload the user with considerable details. The principal problem is that there is big gap between the (fixed) abstractions provided by the AOP languages and the (flexible) abstractions employed during program analysis. Some of the abstractions address a level that is too low (access to variables or fields whereas a programmer wants to analyze basic blocks or call chains), or there is no appropriate abstraction altogether (e.g., when investigating the timing behavior on a multicore system).

To overcome these limitations, in this project we investigate the design and implementation of Gottardo, a novel domain-specific language (DSL) that is based on the modification mechanisms found in AOP and offers dedicated new features that are essential for the development of a wide range of efficient dynamic analysis tools. A DSL allows the user to customize analysis and offers an opportunity to restrict the collection of dynamic behavior and performance data to those parameters that are needed for a specific task. We focus on dynamic analysis for the Java Virtual Machine (JVM), because of its maturity and availability for a wide range of hardware platforms and operating systems. As many modern object-oriented programming languages such as Java, Scala, or JRuby rely on the JVM as execution platform, a wide range of applications and middleware - from application servers to applications on embedded devices - will benefit from the results of our research.

We will study how to raise the level of abstraction in the formulation of analysis tasks to significantly reduce the effort of tool development. In particular, we will investigate DSL constructs for formulating queries relating state and behavior of program executions, for validating program behavior based on abstract, formal models, for composing program behavior visualizations for program understanding, for differential performance analysis, and for analyzing the behavior of distributed applications. These high-level language constructs will provide further opportunities for automatically optimizing and parallelizing the analysis.

The goal of this research is to study how to enable developers to formulate their own dynamic analyses, using a common language that is expressive enough to cover many of the questions about the behavior and performance of modern programs, simple enough for developers to learn, and efficient enough to be useful for debugging and performance analysis. As this project will elaborate new foundations for dynamic program analysis and promises a substantial advance over the current state-of-the-art in the field, a collaborative approach to research is essential in order to leverage the complementary expertise of three Swiss research groups that have long track records in the field. Thanks to this tightly coordinated joint effort, the project promises innovations with high impact in academic research, in industrial development, and in education.