International Conference on Current Trends in Theory and Practice of Informatics

SOFSEM 2016: Theory and Practice of Computer Science pp 217-228 | Cite as

Run-Time Checking Multi-threaded Java Programs

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9587)

Abstract

Assertion checking traditionally focused on state-based properties. In a multi-threaded environment, approaches based on shared-state require complex locking mechanisms to ensure that specifications are checked atomically (in the same state). In addition to this increased complexity, locks also negatively affect performance.

In this paper, we extend both the underlying theory and the practical implementation of SAGA, a run-time checker for single-threaded Java programs, to multi-threading, while avoiding locks.

References

  1. 1.
    Aftandilian, E., Guyer, S.Z., Vechev, M.T., Yahav, E.: Asynchronous assertions. In: Proceedings of the 26th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2011, Part of SPLASH 2011, Portland, OR, USA, pp. 275–288 (2011)Google Scholar
  2. 2.
    Araujo, W., Briand, L.C., Labiche, Y.: Enabling the runtime assertion checking of concurrent contracts for the java modeling language. In: Proceedings of the 33rd International Conference on Software Engineering, ICSE 2011, Waikiki, Honolulu, HI, USA, pp. 786–795 (2011)Google Scholar
  3. 3.
    Bodden, E., Havelund, K.: Racer: effective race detection using AspectJ. In: Proceedings of the ACM/SIGSOFT International Symposium on Software Testing and Analysis, ISSTA 2008, Seattle, WA, USA, pp. 155–166 (2008)Google Scholar
  4. 4.
    Cohen, E., Moskal, M., Schulte, W., Tobies, S.: Local verification of global invariants in concurrent programs. In: Touili, T., Cook, B., Jackson, P. (eds.) CAV 2010. LNCS, vol. 6174, pp. 480–494. Springer, Heidelberg (2010) CrossRefGoogle Scholar
  5. 5.
    de Boer, F.S., de Gouw, S., Johnsen, E.B., Kohn, A., Wong, P.Y.H.: Run-time assertion checking of data- and protocol-oriented properties of java programs: an industrial case study. In: Chiba, S., Tanter, É., Bodden, E., Maoz, S., Kienzle, J. (eds.) Transactions on AOSD XI. LNCS, vol. 8400, pp. 1–26. Springer, Heidelberg (2014) CrossRefGoogle Scholar
  6. 6.
    Hurlin, C.: Specifying and checking protocols of multithreaded classes. In: ACM Symposium on Applied Computing (SAC 2009), pp. 587–592. ACM Press (2009)Google Scholar
  7. 7.
    Kandziora, J., Huisman, M., Bockisch, Ch., Zaharieva-Stojanovski, M.: Run-time assertion checking of JML annotations in multithreaded applications with e-OpenJML. In: Proceedings of the 17th Workshop on Formal Techniques for Java-Like Programs, FTfJP 2015, Prague, Czech Republic, pp. 8:1–8:6. ACM, New York (2015)Google Scholar
  8. 8.
    Klint, P., van der Storm, T., Vinju, J.: Rascal: a domain specific language for source code analysis and manipulation. In: Walenstein, A., Schupp, S. (eds.) Proceedings of the IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM 2009), pp. 168–177 (2009)Google Scholar
  9. 9.
    Knuth, D.E.: Semantics of context-free languages. Math. Syst. Theory 2(2), 127–145 (1968)MATHMathSciNetCrossRefGoogle Scholar
  10. 10.
    Luo, Q., Rosu, G.: EnforceMOP: a runtime property enforcement system for multithreaded programs. In: International Symposium on Software Testing and Analysis, ISSTA 2013, Lugano, Switzerland, pp. 156–166 (2013)Google Scholar
  11. 11.
    Mizuno, M.: A structured approach for developing concurrent programs in Java. Inf. Process. Lett. 69(5), 233–238 (1999)MATHCrossRefGoogle Scholar
  12. 12.
    Möller, M., Olderog, E.-R., Rasch, H., Wehrheim, H.: Integrating a formal method into a software engineering process with UML and Java. Formal Asp. Comput. 20(2), 161–204 (2008)MATHCrossRefGoogle Scholar
  13. 13.
    Nonaka, Y., Ushijima, K., Serizawa, H., Murata, S., Cheng, J.: A run-time deadlock detector for concurrent Java programs. In: 8th Asia-Pacific Software Engineering Conference (APSEC 2001), Macau, China, pp. 45–52 (2001)Google Scholar
  14. 14.
    Parr, T.: The Definitive ANTLR Reference. Pragmatic Bookshelf, Lewisville (2007)Google Scholar
  15. 15.
    Rodríguez, E., Dwyer, M.B., Flanagan, C., Hatcliff, J., Leavens, G.T., Robby: Extending JML for modular specification and verification of multi-threaded programs. In: Gao, X.-X. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 551–576. Springer, Heidelberg (2005)Google Scholar
  16. 16.
    Rosu, G., Sen, K.: An instrumentation technique for online analysis of multithreaded programs. Concurrency Comput. Pract. Experience 19(3), 311–325 (2007)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2016

Authors and Affiliations

  1. 1.CWIAmsterdamThe Netherlands
  2. 2.SDLAmsterdamThe Netherlands
  3. 3.Leiden UniversityLeidenThe Netherlands

Personalised recommendations