Abstract
This paper presents an instrumentation technique to exercise the exceptional behavior of Java programs using the Java Pathfinder model checker. First, programs statements that are potentially able to throw exceptions are identified, and then a set of Java instructions are inserted into programs source code to throw exceptions, producing an instrumented program. Java Pathfinder is applied over this instrumented code to perform multiple executions of the system under verification and cover the program exceptional behavior. Additionally, our technique proposes a prototype of a new Java Pathfinder class to verify and test Java exceptions.
Access provided by Autonomous University of Puebla. Download to read the full chapter text
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Ammann, P., Offutt, J.: Introduction to Software Testing, 1st edn. Cambridge University Press, New York (2008)
Artho, C., Sommer, C., Honiden, S.: Model Checking Networked Programs in the Presence of Transmission Failures. In: Proceedings of the First Joint IEEE/IFIP Symposium on Theoretical Aspects of Software Engineering, TASE 2007, pp. 219–228. IEEE Computer Society, Washington, DC (2007)
Baier, C., Katoen, J.-P.: Principles of Model Checking (Representation and Mind Series). The MIT Press (2008)
Cabral, B., Marques, P.: Exception Handling: A Field Study in Java and .NET. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 151–175. Springer, Heidelberg (2007)
Dúulaigh, K.O., Power, J.F., Clarke, P.J.: Measurement of Exception-Handling Code: An Exploratory Study. In: 5th International Workshop on Exception Handling, Zurich, Switzerland (June 9, 2012)
Fisher, M.: An Introduction to Practical formal Methods Using Temporal Logic, 1st edn. Wiley (2011)
Fraser, G., Wotawa, F., Ammann, P.E.: Testing with model checkers: a survey. Softw. Test. Verif. Reliab. 19, 215–261 (2009)
Ji, C., Chen, Z., Xu, B., Wang, Z.: A New Mutation Analysis Method for Testing Java Exception Handling. In: 2012 IEEE 36th Annual Computer Software and Applications Conference, vol. 2, pp. 556–561 (2009)
Li, X., Hoover, H.J., Rudnicki, P.: Towards Automatic Exception Safety Verification. In: Misra, J., Nipkow, T., Sekerinski, E. (eds.) FM 2006. LNCS, vol. 4085, pp. 396–411. Springer, Heidelberg (2006)
Martins, A.L., Hanazumi, S., de Melo, A.C.V.: Testing Java Exceptions: An Instrumentation Technique. In: Proceedings of the 2014 IEEE 38th Annual Computer Software and Applications Conference Workshops, COMPSACW 2014, IEEE Computer Society, Väasteråas (to appear, 2014)
Mathur, A.P.: Foundations of Software Testing, 1st edn. Addison-Wesley Professional (2008)
Nagar, P., Soni, N.: Optimizing Program-States using Exception-handling Constructs in Java. International Journal of Engineering Science & Advanced Technology 2(2), 192–199 (2012)
NASA, What is JPF, http://babelfish.arc.nasa.gov/trac/jpf/wiki/intro/what_is_jpf (accessed: November 25, 2012)
Oracle. What Is an Exception? http://docs.oracle.com/javase/tutorial/essential/exceptions/definition.html (accessed: November 25, 2012)
Sebesta, R.W.: Concepts Programming Languages (7th ed.). Addison-Wesley Longman Publishing Co., Inc., Boston (2005)
Sinha, S., Harrold, M.J.: Analysis of Programs with Exception-Handling Constructs. In: ICSM 1998: Proceedings of the International Conference on Software Maintenance, p. 348. IEEE Computer Society, USA (1998)
Sinha, S., Harrold, M.J.: Analysis and Testing of Programs with Exception Handling Constructs. IEEE Trans. Softw. Eng. 26(9), 849–871 (2000)
Staats, M.: Towards a Framework for Generating Tests to Satisfy Complex Code Coverage in Java Pathfinder. In: Proceedings of NASA Formal Methods Symposium 2009, p. 116 (2009)
Zhang, P., Elbaum, S.: Amplifying tests to validate exception handling code. In: Proceedings of the 2012 International Conference on Software Engineering, ICSE 2012, pp. 595–605. IEEE Press, Piscataway (2012)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer International Publishing Switzerland
About this paper
Cite this paper
Martins, A.L., Hanazumi, S., de Melo, A.C.V. (2014). Exercising Java Exceptions Using Java Pathfinder and Program Instrumentation. In: Murgante, B., et al. Computational Science and Its Applications – ICCSA 2014. ICCSA 2014. Lecture Notes in Computer Science, vol 8579. Springer, Cham. https://doi.org/10.1007/978-3-319-09144-0_46
Download citation
DOI: https://doi.org/10.1007/978-3-319-09144-0_46
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-09143-3
Online ISBN: 978-3-319-09144-0
eBook Packages: Computer ScienceComputer Science (R0)