Skip to main content

Verification of Java Bytecode Using Analysis and Transformation of Logic Programs

  • Conference paper
Practical Aspects of Declarative Languages (PADL 2007)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 4354))

Included in the following conference series:

Abstract

State of the art analyzers in the Logic Programming (LP) paradigm are nowadays mature and sophisticated. They allow inferring a wide variety of global properties including termination, bounds on resource consumption, etc. The aim of this work is to automatically transfer the power of such analysis tools for LP to the analysis and verification of Java bytecode (jvml). In order to achieve our goal, we rely on well-known techniques for meta-programming and program specialization. More precisely, we propose to partially evaluate a jvml interpreter implemented in LP together with (an LP representation of) a jvml program and then analyze the residual program. Interestingly, at least for the examples we have studied, our approach produces very simple LP representations of the original jvml programs. This can be seen as a decompilation from jvml to high-level LP source. By reasoning about such residual programs, we can automatically prove in the CiaoPP system some non-trivial properties of jvml programs such as termination, run-time error freeness and infer bounds on its resource consumption. We are not aware of any other system which is able to verify such advanced properties of Java bytecode.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Barras, B., et al.: The Coq proof assistant reference manual: Version 6.1. Technical Report RT-0203 (1997), citeseer.ist.psu.edu/barras97coq.html

  2. Bueno, F., Cabeza, D., Carro, M., Hermenegildo, M., López, P., Puebla, G. (eds.): The Ciao System (v1.13), http://www.clip.dia.fi.upm.es/Software/Ciao/

  3. Cousot, P., Cousot, R.: Abstract Interpretation: a Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. In: Proc. of POPL 1977, pp. 238–252 (1977)

    Google Scholar 

  4. Debray, S., López, P., Hermenegildo, M., Lin, N.: Estimating the Computational Cost of Logic Programs. In: LeCharlier, B. (ed.) SAS 1994. LNCS, vol. 864, pp. 255–265. Springer, Heidelberg (1994)

    Google Scholar 

  5. Früwirth, T., Shapiro, E., Vardi, M.Y., Yardeni, E.: Logic programs as types for logic programs. In: Proc. LICS 1991, pp. 300–309 (1991)

    Google Scholar 

  6. Futamura, Y.: Partial evaluation of computation process - an approach to a compiler-compiler. Systems, Computers, Controls 2(5), 45–50 (1971)

    Google Scholar 

  7. Gallagher, J.: Transforming logic programs by specializing interpreters. In: Proc. of the 7th. European Conference on Artificial Intelligence (1986)

    Google Scholar 

  8. Henriksen, K.S., Gallagher, J.P.: Analysis and specialisation of a pic processor. In: SMC (2), pp. 1131–1135. IEEE, Los Alamitos (2004)

    Google Scholar 

  9. Hermenegildo, M., Puebla, G., Bueno, F., López, P.: Integrated Program Debugging, Verification, and Optimization Using Abstract Interpretation. Science of Computer Programming 58(1–2), 115–140 (2005)

    Article  MATH  MathSciNet  Google Scholar 

  10. Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice Hall, New York (1993)

    MATH  Google Scholar 

  11. Leuschel, M.: On the power of homeomorphic embedding for online termination. In: Levi, G. (ed.) SAS 1998. LNCS, vol. 1503, pp. 230–245. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  12. Lindholm, T., Yellin, F.: The Java Virtual Machine Specification. A-W (1996)

    Google Scholar 

  13. Peralta, J.C., Gallagher, J., Sağlam, H.: Analysis of imperative programs through analysis of CLP. In: Levi, G. (ed.) SAS 1998. LNCS, vol. 1503, pp. 246–261. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  14. Pichardie, D.: Bicolano (Byte Code Language in cOq), http://www-sop.inria.fr/everest/personnel/David.Pichardie/bicolano/main.html

  15. Puebla, G., Albert, E., Hermenegildo, M.: Abstract Interpretation with Specialized Definitions. In: Yi, K. (ed.) SAS 2006. LNCS, vol. 4134, Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  16. Puebla, G., Bueno, F., Hermenegildo, M.: An Assertion Language for CLP. In: Deransart, P., Małuszyński, J. (eds.) DiSCiPl 1999. LNCS, vol. 1870, pp. 23–61. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  17. Ross, B.J.: The partial evaluation of imperative programs using prolog. In: META, pp. 341–363 (1988)

    Google Scholar 

  18. Vaucheret, C., Bueno, F.: More Precise yet Efficient Type Inference for Logic Programs. In: Hermenegildo, M.V., Puebla, G. (eds.) SAS 2002. LNCS, vol. 2477, pp. 102–116. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Albert, E., Gómez-Zamalloa, M., Hubert, L., Puebla, G. (2006). Verification of Java Bytecode Using Analysis and Transformation of Logic Programs. In: Hanus, M. (eds) Practical Aspects of Declarative Languages. PADL 2007. Lecture Notes in Computer Science, vol 4354. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-69611-7_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-69611-7_8

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-69608-7

  • Online ISBN: 978-3-540-69611-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics