Advertisement

Certified Memory Usage Analysis

  • David Cachera
  • Thomas Jensen
  • David Pichardie
  • Gerardo Schneider
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3582)

Abstract

We present a certified algorithm for resource usage analysis, applicable to languages in the style of Java byte code. The algorithm verifies that a program executes in bounded memory. The algorithm is destined to be used in the development process of applets and for enhanced byte code verification on embedded devices. We have therefore aimed at a low-complexity algorithm derived from a loop detection algorithm for control flow graphs. The expression of the algorithm as a constraint-based static analysis of the program over simple lattices provides a link with abstract interpretation that allows to state and prove formally the correctness of the analysis with respect to an operational semantics of the program. The certification is based on an abstract interpretation framework implemented in the Coq proof assistant which has been used to provide a complete formalisation and formal verification of all correctness proofs.

Keywords

Program analysis certified memory analysis theorem proving constraint solving 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Aspinall, D., Compagnoni, A.: Heap bounded assembly language. Journal of Automated Reasoning 31(3–4), 261–302 (2003)zbMATHCrossRefGoogle Scholar
  2. 2.
    Barthe, G., Dufay, G., Jakubiec, L., Serpette, B., de Sousa, S.M.: A Formal Executable Semantics of the JavaCard Platform. In: Sands, D. (ed.) ESOP 2001. LNCS, vol. 2028, p. 302. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  3. 3.
    Cachera, D., Jensen, T., Pichardie, D., Rusu, V.: Extracting a data flow analyser in constructive logic. In: Schmidt, D. (ed.) ESOP 2004. LNCS, vol. 2986, pp. 385–400. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  4. 4.
    Casset, L., Burdy, L., Requet, A.: Formal Development of an embedded verifier for Java Card Byte Code. In: Proc. of IEEE Int. Conference on Dependable Systems & Networks (DSN) (2002)Google Scholar
  5. 5.
    Crary, K., Weirich, S.: Resource bound certification. In: Proc. 27th ACM Symp. on Principles of Programming Languages (POPL 2000), pp. 184–198. ACM Press, New York (2000)Google Scholar
  6. 6.
    Filliâtre, J.-C., Marché, C.: Multi-Prover Verification of C Programs. In: Davies, J., Schulte, W., Barnett, M. (eds.) ICFEM 2004. LNCS, vol. 3308, pp. 15–29. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  7. 7.
    Hofmann, M.: A type system for bounded space and functional in-place update. Nordic Journal of Computing 7(4), 258–289 (2000)zbMATHMathSciNetGoogle Scholar
  8. 8.
    Hofmann, M., Jost, S.: Static prediction of heap space usage for first-order functional programs. In: Proc. of 30th ACM Symp. on Principles of Programming Languages (POPL 2003), pp. 185–197. ACM Press, New York (2003)Google Scholar
  9. 9.
    Klein, G., Nipkow, T.: Verified Bytecode Verifiers. Theoretical Computer Science 298(3), 583–626 (2002)CrossRefMathSciNetGoogle Scholar
  10. 10.
    Leroy, X.: On-card bytecode verification for Java card. In: Attali, S., Jensen, T. (eds.) E-smart 2001. LNCS, vol. 2140, pp. 150–164. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  11. 11.
    Marlet, R.: Syntax of the JCVM language to be studied in the SecSafe project. Technical Report SECSAFE-TL-005, Trusted Logic SA (May 2001)Google Scholar
  12. 12.
    Morrisett, G., Walker, D., Crary, K., Glew, N.: From System F to typed assembly language. ACM Trans. Program. Lang. Syst. 21(3), 527–568 (1999)CrossRefGoogle Scholar
  13. 13.
    Pichardie, D.: Coq sources of the development, http://www.irisa.fr/lande/pichardie/MemoryUsage/
  14. 14.
    Schneider, G.: A constraint-based algorithm for analysing memory usage on Java cards. Technical Report RR-5440, INRIA (December 2004)Google Scholar
  15. 15.
    Siveroni, I.: Operational semantics of the Java Card Virtual Machine. J. Logic and Algebraic Programming 58(1-2) (2004)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • David Cachera
    • 1
  • Thomas Jensen
    • 2
  • David Pichardie
    • 1
  • Gerardo Schneider
    • 2
    • 3
  1. 1.IRISA/ENS Cachan (Bretagne)BruzFrance
  2. 2.IRISA/CNRSRennes cedexFrance
  3. 3.Dept. of InformaticsUniv. of OsloOsloNorway

Personalised recommendations