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.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Barras, B., et al.: The Coq proof assistant reference manual: Version 6.1. Technical Report RT-0203 (1997), citeseer.ist.psu.edu/barras97coq.html
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/
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)
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)
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)
Futamura, Y.: Partial evaluation of computation process - an approach to a compiler-compiler. Systems, Computers, Controls 2(5), 45–50 (1971)
Gallagher, J.: Transforming logic programs by specializing interpreters. In: Proc. of the 7th. European Conference on Artificial Intelligence (1986)
Henriksen, K.S., Gallagher, J.P.: Analysis and specialisation of a pic processor. In: SMC (2), pp. 1131–1135. IEEE, Los Alamitos (2004)
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)
Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice Hall, New York (1993)
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)
Lindholm, T., Yellin, F.: The Java Virtual Machine Specification. A-W (1996)
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)
Pichardie, D.: Bicolano (Byte Code Language in cOq), http://www-sop.inria.fr/everest/personnel/David.Pichardie/bicolano/main.html
Puebla, G., Albert, E., Hermenegildo, M.: Abstract Interpretation with Specialized Definitions. In: Yi, K. (ed.) SAS 2006. LNCS, vol. 4134, Springer, Heidelberg (2006)
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)
Ross, B.J.: The partial evaluation of imperative programs using prolog. In: META, pp. 341–363 (1988)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)