RV 2013: Runtime Verification pp 269-284 | Cite as
Optimizing Nop-shadows Typestate Analysis by Filtering Interferential Configurations
Abstract
Nop-shadows Analysis (NSA) is an efficient static typestate analysis, which can be used to eliminate unnecessary monitoring instrumentations for runtime monitors. In this paper, we propose two optimizations to improve the precision of NSA. Both of the optimizations filter interferential configurations when determining whether a monitoring instrumentation is necessary. We have implemented our optimization methods in Clara and conducted extensive experiments on the DaCapo benchmark. The experimental results indicate that the optimized NSA can further remove unnecessary instrumentations after the original NSA in more than half of the cases, without a significant overhead. In addition, for two cases, all the instrumentations are removed, which implies the program is proved to satisfy the typestate property.
Keywords
Typestate Analysis Runtime Monitoring Static Analysis Nop-shadows AnalysisPreview
Unable to display preview. Download preview PDF.
References
- 1.Clara, http://www.bodden.de/clara/
- 2.Allan, C., Avgustinov, P., Christensen, A.S., Hendren, L., Kuzins, S., Lhoták, O., De Moor, O., Sereni, D., Sittampalam, G., Tibble, J.: Adding trace matching with free variables to aspectj. ACM SIGPLAN Notices 40(10), 345–364 (2005)CrossRefGoogle Scholar
- 3.Bierhoff, K., Aldrich, J.: Modular typestate checking of aliased objects. In: 22nd Annual ACM SIGPLAN Conference on Object-oriented Programming Systems and Applications (OOPSLA), pp. 301–320. ACM, New York (2007)CrossRefGoogle Scholar
- 4.Blackburn, S.M., Garner, R., Hoffmann, C., Khang, A.M., McKinley, K.S., Bentzur, R., Diwan, A., Feinberg, D., Frampton, D., Guyer, S.Z., Hirzel, M., Hosking, A., Jump, M., Lee, H., Moss, J.E.B., Phansalkar, A., Stefanović, D., VanDrunen, T., von Dincklage, D., Wiedermann, B.: The dacapo benchmarks: Java benchmarking development and analysis. In: 21st Annual ACM SIGPLAN Conference on Object-oriented Programming Systems, Languages, and Applications (OOPSLA), pp. 169–190. ACM, New York (2006)CrossRefGoogle Scholar
- 5.Bodden, E.: J-lo-a tool for runtime-checking temporal assertions. Master’s thesis, RWTH Aachen university (2005)Google Scholar
- 6.Bodden, E.: Verifying Finite-state Properties of Large-scale Programs. Ph.D. thesis, McGill University (2009)Google Scholar
- 7.Bodden, E.: Efficient hybrid typestate analysis by determining continuation-equivalent states. In: 32nd International Conference on Software Engineerin (ICSE), pp. 5–14. IEEE, ACM, New York (2010)Google Scholar
- 8.Bodden, E., Lam, P., Hendren, L.: Finding programming errors earlier by evaluating runtime monitors ahead-of-time. In: 16th ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE), pp. 36–47. ACM, New York (2008)CrossRefGoogle Scholar
- 9.Bodden, E., Lam, P., Hendren, L.: Object representatives: A uniform abstraction for pointer information. In: International Conference on Visions of Computer Science: BCS International Academic Conference (VoCS), pp. 391–405. British Computer Society, Swinton (2008)Google Scholar
- 10.Bodden, E., Lam, P., Hendren, L.: Clara: A framework for partially evaluating finite-state runtime monitors ahead of time. In: Barringer, H., et al. (eds.) RV 2010. LNCS, vol. 6418, pp. 183–197. Springer, Heidelberg (2010)CrossRefGoogle Scholar
- 11.Chen, F., Roşu, G.: Mop: An efficient and generic runtime verification framework. In: 22nd Annual ACM SIGPLAN Conference on Object-oriented Programming Systems and Applications (OOPSLA), pp. 569–588. ACM, New York (2007)CrossRefGoogle Scholar
- 12.Dwyer, M.B., Purandare, R.: Residual dynamic typestate analysis exploiting static analysis: Results to reformulate and reduce the cost of dynamic analysis. In: 22nd IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 124–133. ACM, New York (2007)Google Scholar
- 13.Fink, S., Yahav, E., Dor, N., Ramalingam, G., Geay, E.: Effective typestate verification in the presence of aliasing. In: 15th International Symposium on Software Testing and Analysis (ISSTA), pp. 133–144. ACM, New York (2006)Google Scholar
- 14.Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C., Loingtier, J.M., Irwin, J.: Aspect-oriented Programming. Springer (1997)Google Scholar
- 15.Krüger, I.H., Lee, G., Meisinger, M.: Automating software architecture exploration with m2aspects. In: International Workshop on Scenarios and State Machines: Models, Algorithms, and Tools (SCESM), pp. 51–58. ACM, New York (2006)Google Scholar
- 16.Maoz, S., Harel, D.: From multi-modal scenarios to code: Compiling lscs into aspectj. In: 14th ACM SIGSOFT International Symposium on Foundations of Software Engineering (SIGSOFT/FSE), pp. 219–230. ACM, New York (2006)CrossRefGoogle Scholar
- 17.Masuhara, H., Kiczales, G., Dutchyn, C.: A compilation and optimization model for aspect-oriented programs. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 46–60. Springer, Heidelberg (2003)CrossRefGoogle Scholar
- 18.Naeem, N.A., Lhotak, O.: Typestate-like analysis of multiple interacting objects. In: 23rd ACM SIGPLAN Conference on Object-oriented Programming Systems Languages and Applications (OOPSLA), pp. 347–366. ACM, New York (2008)CrossRefGoogle Scholar
- 19.Pradel, M., Jaspan, C., Aldrich, J., Gross, T.R.: Statically checking api protocol conformance with mined multi-object specifications. In: 34th International Conference on Software Engineering (ICSE). IEEE Press, Piscataway (2012)Google Scholar
- 20.Purandare, R.: Exploiting Program and Property Structure for Efficient Runtime Monitoring. Ph.D. thesis, University of Nebraska-Lincoln (2011)Google Scholar
- 21.Purandare, R., Dwyer, M.B., Elbaum, S.: Monitor optimization via stutter-equivalent loop transformation. In: 25th International Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA), pp. 270–285. ACM, New York (2010)CrossRefGoogle Scholar
- 22.Slaughter, S.A., Harter, D.E., Krishnan, M.S.: Evaluating the cost of software quality. Communications of the ACM 41(8), 67–73 (1998)CrossRefGoogle Scholar
- 23.Strom, R.E., Yemini, S.: Typestate: A programming language concept for enhancing software reliability. IEEE Transactions on Software Engineering 12(1), 157–171 (1986)CrossRefMATHGoogle Scholar