Home > Research > Publications & Outputs > Taming reflection: aiding static analysis in th...
View graph of relations

Taming reflection: aiding static analysis in the presence of reflection and custom class loaders

Research output: Contribution in Book/Report/Proceedings - With ISBN/ISSNConference contribution/Paperpeer-review

Published

Standard

Taming reflection: aiding static analysis in the presence of reflection and custom class loaders. / Bodden, Eric; Sewe, Andreas; Sinschek, Jan et al.
Proceedings of the 33rd International Conference on Software Engineering (ICSE '11). New York, NY, USA: ACM, 2011. p. 241-250.

Research output: Contribution in Book/Report/Proceedings - With ISBN/ISSNConference contribution/Paperpeer-review

Harvard

Bodden, E, Sewe, A, Sinschek, J, Oueslati, H & Mezini, M 2011, Taming reflection: aiding static analysis in the presence of reflection and custom class loaders. in Proceedings of the 33rd International Conference on Software Engineering (ICSE '11). ACM, New York, NY, USA, pp. 241-250, ICSE 2011 33rd International Conference on Software Engineering, Honolulu, United States, 21/05/11. https://doi.org/10.1145/1985793.1985827

APA

Bodden, E., Sewe, A., Sinschek, J., Oueslati, H., & Mezini, M. (2011). Taming reflection: aiding static analysis in the presence of reflection and custom class loaders. In Proceedings of the 33rd International Conference on Software Engineering (ICSE '11) (pp. 241-250). ACM. https://doi.org/10.1145/1985793.1985827

Vancouver

Bodden E, Sewe A, Sinschek J, Oueslati H, Mezini M. Taming reflection: aiding static analysis in the presence of reflection and custom class loaders. In Proceedings of the 33rd International Conference on Software Engineering (ICSE '11). New York, NY, USA: ACM. 2011. p. 241-250 doi: 10.1145/1985793.1985827

Author

Bodden, Eric ; Sewe, Andreas ; Sinschek, Jan et al. / Taming reflection: aiding static analysis in the presence of reflection and custom class loaders. Proceedings of the 33rd International Conference on Software Engineering (ICSE '11). New York, NY, USA : ACM, 2011. pp. 241-250

Bibtex

@inproceedings{54ae325ac44344f6a8bde62017fe0d51,
title = "Taming reflection: aiding static analysis in the presence of reflection and custom class loaders",
abstract = "Static program analyses and transformations for Java face many problems when analyzing programs that use reflection or custom class loaders: How can a static analysis know which reflective calls the program will execute? How can it get hold of classes that the program loads from remote locations or even generates on the fly? And if the analysis transforms classes, how can these classes be re-inserted into a program that uses custom class loaders?In this paper, we present TamiFlex, a tool chain that offers a partial but often effective solution to these problems. With TamiFlex, programmers can use existing static-analysis tools to produce results that are sound at least with respect to a set of recorded program runs. TamiFlex inserts runtime checks into the program that warn the user in case the program executes reflective calls that the analysis did not take into account. TamiFlex further allows programmers to re-insert offline-transformed classes into a program.We evaluate TamiFlex in two scenarios: benchmarking with the DaCapo benchmark suite and analysing large-scale interactive applications. For the latter, TamiFlex significantly improves code coverage of the static analyses, while for the former our approach even appears complete: the inserted runtime checks issue no warning. Hence, for the first time, TamiFlex enables sound static whole-program analyses on DaCapo. During this process, TamiFlex usually incurs less than 10% runtime overhead.",
keywords = "dynamic class loaders, dynamic class loading, native code, reflection, static analysis, tracing",
author = "Eric Bodden and Andreas Sewe and Jan Sinschek and Hela Oueslati and Mira Mezini",
year = "2011",
doi = "10.1145/1985793.1985827",
language = "English",
isbn = "978-1-4503-0445-0 ",
pages = "241--250",
booktitle = "Proceedings of the 33rd International Conference on Software Engineering (ICSE '11)",
publisher = "ACM",
note = "ICSE 2011 33rd International Conference on Software Engineering ; Conference date: 21-05-2011 Through 28-05-2011",

}

RIS

TY - GEN

T1 - Taming reflection: aiding static analysis in the presence of reflection and custom class loaders

AU - Bodden, Eric

AU - Sewe, Andreas

AU - Sinschek, Jan

AU - Oueslati, Hela

AU - Mezini, Mira

PY - 2011

Y1 - 2011

N2 - Static program analyses and transformations for Java face many problems when analyzing programs that use reflection or custom class loaders: How can a static analysis know which reflective calls the program will execute? How can it get hold of classes that the program loads from remote locations or even generates on the fly? And if the analysis transforms classes, how can these classes be re-inserted into a program that uses custom class loaders?In this paper, we present TamiFlex, a tool chain that offers a partial but often effective solution to these problems. With TamiFlex, programmers can use existing static-analysis tools to produce results that are sound at least with respect to a set of recorded program runs. TamiFlex inserts runtime checks into the program that warn the user in case the program executes reflective calls that the analysis did not take into account. TamiFlex further allows programmers to re-insert offline-transformed classes into a program.We evaluate TamiFlex in two scenarios: benchmarking with the DaCapo benchmark suite and analysing large-scale interactive applications. For the latter, TamiFlex significantly improves code coverage of the static analyses, while for the former our approach even appears complete: the inserted runtime checks issue no warning. Hence, for the first time, TamiFlex enables sound static whole-program analyses on DaCapo. During this process, TamiFlex usually incurs less than 10% runtime overhead.

AB - Static program analyses and transformations for Java face many problems when analyzing programs that use reflection or custom class loaders: How can a static analysis know which reflective calls the program will execute? How can it get hold of classes that the program loads from remote locations or even generates on the fly? And if the analysis transforms classes, how can these classes be re-inserted into a program that uses custom class loaders?In this paper, we present TamiFlex, a tool chain that offers a partial but often effective solution to these problems. With TamiFlex, programmers can use existing static-analysis tools to produce results that are sound at least with respect to a set of recorded program runs. TamiFlex inserts runtime checks into the program that warn the user in case the program executes reflective calls that the analysis did not take into account. TamiFlex further allows programmers to re-insert offline-transformed classes into a program.We evaluate TamiFlex in two scenarios: benchmarking with the DaCapo benchmark suite and analysing large-scale interactive applications. For the latter, TamiFlex significantly improves code coverage of the static analyses, while for the former our approach even appears complete: the inserted runtime checks issue no warning. Hence, for the first time, TamiFlex enables sound static whole-program analyses on DaCapo. During this process, TamiFlex usually incurs less than 10% runtime overhead.

KW - dynamic class loaders, dynamic class loading, native code, reflection, static analysis, tracing

UR - http://www.scopus.com/inward/record.url?scp=79959861450&partnerID=8YFLogxK

U2 - 10.1145/1985793.1985827

DO - 10.1145/1985793.1985827

M3 - Conference contribution/Paper

SN - 978-1-4503-0445-0

SP - 241

EP - 250

BT - Proceedings of the 33rd International Conference on Software Engineering (ICSE '11)

PB - ACM

CY - New York, NY, USA

T2 - ICSE 2011 33rd International Conference on Software Engineering

Y2 - 21 May 2011 through 28 May 2011

ER -