Abstract
Runtime assertion checking is useful for debugging programs and specifications. Existing tools check invariants as well as method pre- and postconditions, but mostly ignore assignable (or modifies) clauses, which specify the heap locations a method is allowed to assign to. A way to abstract from implementation details is to specify assignable clauses using datagroups, which represent sets of concrete memory locations.
Efficient runtime checking of assignable clauses with datagroups is difficult because the members of a datagroup may change over time and because datagroups may get very large, especially for recursive data structures. We present the first algorithm to check assignable clauses in the presence of datagroups. The key idea is to compute the set of locations in a datagroup lazily, which requires data structures that reflect when the contents of a datagroup change during the execution of a method. We implemented our approach in a prototypical runtime assertion checker for the Java Modeling Language (Jml); our experiments show that the runtime overhead is moderately small.
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
Ahrendt, W., Baar, T., Beckert, B., Bubel, R., Giese, M., Hähnle, R., Menzel, W., Mostowski, W., Roth, A., Schlager, S., Schmitt, P.H.: The KeY tool. In: SS (2004)
Barnett, M., Leino, K.R.M., Schulte, W.: The Spec# programming system: An overview. In: Barthe, G., Burdy, L., Huisman, M., Lanet, J.-L., Muntean, T. (eds.) CASSIS 2004. LNCS, vol. 3362, pp. 49–69. Springer, Heidelberg (2005)
Cataño, N., Huisman, M.: Chase: A static checker for JML’s assignable clause. In: Zuck, L.D., Attie, P.C., Cortesi, A., Mukhopadhyay, S. (eds.) VMCAI 2003. LNCS, vol. 2575, pp. 26–40. Springer, Heidelberg (2002)
Cheon, Y.: A Runtime Assertion Checker for the Java Modeling Language. PhD thesis, Iowa State University (2003)
ESC/Java2, http://secure.ucd.ie/products/opensource/ESCJava2
Kägi, A., Lehner, H., Müller, P.: A formalization of JML in the Coq proof system. Technical report, ETH Zurich (2009), http://www.pm.inf.ethz.ch/people/lehnerh/jmlcoq
Leino, K.R.M.: Data groups: Specifying the modification of extended state. In: OOPSLA, pp. 144–153 (1998)
Leino, K.R.M., Poetzsch-Heffter, A., Zhou, Y.: Using data groups to specify and check side effects. In: PLDI, pp. 246–257 (2002)
Marché, C., Paulin-Mohring, C., Urbain, X.: The Krakatoa tool for certification of Java/JavaCard programs annotated with JML annotations. JLAP 58, 89–106 (2004)
Spoto, F., Poll, E.: Static analysis for JML’s assignable clauses. In: Ghelli, G. (ed.) FOOL (2003)
van den Berg, J., Jacobs, B.: The LOOP compiler for Java and JML. In: Margaria, T., Yi, W. (eds.) TACAS 2001. LNCS, vol. 2031, pp. 299–312. Springer, Heidelberg (2001)
Ye, C.: Improving JML’s assignable clause analysis. Technical report, Iowa State University (2006)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Lehner, H., Müller, P. (2010). Efficient Runtime Assertion Checking of Assignable Clauses with Datagroups. In: Rosenblum, D.S., Taentzer, G. (eds) Fundamental Approaches to Software Engineering. FASE 2010. Lecture Notes in Computer Science, vol 6013. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-12029-9_24
Download citation
DOI: https://doi.org/10.1007/978-3-642-12029-9_24
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-12028-2
Online ISBN: 978-3-642-12029-9
eBook Packages: Computer ScienceComputer Science (R0)