A declarative approach for Java code instrumentation

Source instrumentation plays an important role in dynamic program analysis. However, current instrumentation implementations require programmers to write ad hoc rules that are often too complex to use and maintain. To address this complexity, we divide the task of source instrumentation into two steps: first, the source points are queried, into which code fragments should be planted; secondly, the code fragments including contextual information are generated and planted into source code through the queried points. According to this idea, we present a new method based on declarative code queries, which makes it easier to specify instrumentations using contextual information collected from expressive code queries. The JIns language provided by our method is constructed following an SQL-like style, which is well known and widely used by programmers. We evaluate the method in terms of the reduced complexity of instrumentation specifications for several common instrumentation tasks.

[1]  Slinger Jansen,et al.  Reducing Maintenance Effort through Software Operation Knowledge: An Eclectic Empirical Evaluation , 2011, 2011 15th European Conference on Software Maintenance and Reengineering.

[2]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[3]  Dirk Beyer,et al.  Relational programming with CrocoPat , 2006, ICSE.

[4]  Michael W. Godfrey,et al.  Query Technologies and Applications for Program Comprehension (QTAPC 2008) , 2008, 2008 16th IEEE International Conference on Program Comprehension.

[5]  Richard C. Holt Grokking Software Architecture , 2008 .

[6]  Alessandro Orso,et al.  InsECTJ: a generic instrumentation framework for collecting dynamic information within Eclipse , 2005, eclipse '05.

[7]  Jakob Engblom,et al.  The worst-case execution-time problem—overview of methods and survey of tools , 2008, TECS.

[8]  M.J. Suarez-Cabal,et al.  SQLMutation: A tool to generate mutants of SQL database queries , 2006, Second Workshop on Mutation Analysis (Mutation 2006 - ISSRE Workshops 2006).

[9]  Harish Patil,et al.  Pin: building customized program analysis tools with dynamic instrumentation , 2005, PLDI '05.

[10]  Hausi A. Müller,et al.  Rigi: a system for programming-in-the-large , 1988, Proceedings. [1989] 11th International Conference on Software Engineering.

[11]  Jurriaan Hage,et al.  A Comparative Study of Code Query Technologies , 2011, 2011 IEEE 11th International Working Conference on Source Code Analysis and Manipulation.

[12]  Javier Tuya,et al.  Mutating database queries , 2007, Inf. Softw. Technol..

[13]  Phyllis G. Frankl,et al.  JDAMA: Java database application mutation analyser , 2011, Softw. Test. Verification Reliab..

[14]  Gregor Kiczales,et al.  Aspect-oriented programming , 2001, ESEC/FSE-9.

[15]  Laurie Hendren,et al.  Soot: a Java bytecode optimization framework , 2010, CASCON.

[16]  Mingsong Chen,et al.  Automatic test case generation for UML activity diagrams , 2006, AST '06.

[17]  Jianhua Zhao,et al.  Time-leverage point detection for time sensitive software maintenance , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).

[18]  James R. Cordy,et al.  The TXL source transformation language , 2006, Sci. Comput. Program..

[19]  Bart Du Bois,et al.  Supporting Reengineering Scenarios with FETCH: an Experience Report , 2008, Electron. Commun. Eur. Assoc. Softw. Sci. Technol..

[20]  Richard C. Holt WCRE 1998 Most Influential Paper: Grokking Software Architecture , 2008, 2008 15th Working Conference on Reverse Engineering.

[21]  WilhelmReinhard,et al.  The worst-case execution-time problemoverview of methods and survey of tools , 2008 .