Advertisement

Efficient Runtime Assertion Checking of Assignable Clauses with Datagroups

  • Hermann Lehner
  • Peter Müller
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6013)

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.

Keywords

Proof Obligation Method Invocation Runtime Overhead Memory Overhead Method Execution 
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

  1. 1.
    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)Google Scholar
  2. 2.
    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)Google Scholar
  3. 3.
    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)CrossRefGoogle Scholar
  4. 4.
    Cheon, Y.: A Runtime Assertion Checker for the Java Modeling Language. PhD thesis, Iowa State University (2003)Google Scholar
  5. 5.
  6. 6.
    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
  7. 7.
    Leino, K.R.M.: Data groups: Specifying the modification of extended state. In: OOPSLA, pp. 144–153 (1998)Google Scholar
  8. 8.
    Leino, K.R.M., Poetzsch-Heffter, A., Zhou, Y.: Using data groups to specify and check side effects. In: PLDI, pp. 246–257 (2002)Google Scholar
  9. 9.
    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)zbMATHGoogle Scholar
  10. 10.
    Spoto, F., Poll, E.: Static analysis for JML’s assignable clauses. In: Ghelli, G. (ed.) FOOL (2003)Google Scholar
  11. 11.
    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)CrossRefGoogle Scholar
  12. 12.
    Ye, C.: Improving JML’s assignable clause analysis. Technical report, Iowa State University (2006)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Hermann Lehner
    • 1
  • Peter Müller
    • 1
  1. 1.ETH ZurichSwitzerland

Personalised recommendations