Abstract
In this paper, we show that one can “deep-embed” the Java bytecode language, a fairly complicated language with a rich semantics, into the first order logic of ACL2 by modeling a realistic JVM. We show that with proper support from a semi-automatic theorem prover in that logic, one can reason about the correctness of Java programs. This reasoning can be done in a direct and intuitive way without incurring the extra burden that has often been associated with hand proofs, or proofs that make use of less automated proof assistance. We present proofs for two simple Java programs as a showcase.
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
Boyer, R.S., Yu, Y.: Automated proofs of object code for a widely used microprocessor. Journal of the ACM 43(1), 166–192 (1996)
Clavel, M., Durán, F., Eker, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Quesada, J.: A Maude Tutorial. SRI International (2000)
Crow, J., Owre, S., Rushby, J., Shankar, N., Srivas, M.: A tutorial introduction to PVS. In: Workshop on Industrial-Strength Formal Specification Techniques, Boca Raton, FL (April 1995)
Alves-Foss, J. (ed.): Formal Syntax and Semantics of Java. LNCS, vol. 1523. Springer, Heidelberg (1999)
Klein, G., Nipkow, T., von Oheimb, D., Pusch, C., Nieto, L.P.: Project Bali, Available from http://isabelle.in.tum.de/bali/ (May 2004)
Liu, H., Moore, J.S.: Supplement: proof scripts, etc., http://coldice.csres.utexas.edu/~hbl/tphol2004/ (February 2004)
Hoare, C.A.R.: An axiomatic basis for computer programming. Commun. ACM 12(10), 576–580 (1969)
Huisman, M., Jacobs, B.: Java program verification via a Hoare logic with abrupt termination. In: Maibaum, T. (ed.) FASE 2000. LNCS, vol. 1783, p. 284. Springer, Heidelberg (2000)
Attali, I., Caromel, D., Russo, M.: A formal executable semantics for java. In: Proceedings of Formal Underpinnings of Java Workshop, OOPSLA 1998 (1998)
Gosling, J., Joy, B., Steele Jr., G.L., Bracha, G.: The Java Language Specification, 2nd edn. Addison-Wesley Publisher, Reading (2000)
Moore, J.S., Krug, R., Liu, H., Porter, G.: Formal models of Java at the JVM level: A survey from the ACL2 perspective. In: Workshop on Formal Techniques for Java Programs, ECOOP 2001 (2001)
Liu, H.: J S. Moore. Executable JVM model for analytical reasoning: a study. In: Proceedings of the 2003 workshop on Interpreters, Virtual Machines and Emulators, pp. 15–23. ACM Press, New York (2003)
Kaufmann, M., Manolios, P., Moore, J.S.: Computer-aided Reasoning: An approach. Kluwer Academic Publishers, Dordrecht (2000)
Meseguer, J.: Rewriting logic based semantics and analysis of concurrent programs. Talk at UT-Austin (February 2004)
Moore, J.S.: Inductive assertions and operational semantics. In: Geist, D., Tronci, E. (eds.) CHARME 2003. LNCS, vol. 2860, pp. 289–303. Springer, Heidelberg (2003)
Moore, J.S.: Proving theorems about Java and the JVM with ACL2. In: Broy, M., Pizka, M. (eds.) Models, Algebras and Logic of Engineering Software, pp. 227–290. IOS Press, Amsterdam (2003), http://www.cs.utexas.edu/users/moore/publications/marktoberdorf-03
Nipkow, T. (ed.): Java Bytecode Verification, vol. 30(3-4) (2003)
Paulson, L.C.: Isabelle: a generic theorem prover. Springer, Heidelberg (1994)
Plotkin, G.: A structural approach to operational semantics. Technical report, University of Aarhus, Denmark (1981)
Stärk, R.F., Schmid, J., Börger, E.: Java and the Java Virtual Machine: Definition, Verification, Validation. Springer, Heidelberg (2001)
University of Nijmegen Security of System Group. LOOP project, http://www.cs.kun.nl/~bart/LOOP/
Connected Limited Device Configuration (CLDC) Specification 1.1, http://jcp.org/en/jsr/detail?id=139
Lindholm, T., Yellin, F.: The Java Virtual Machine Specification, 2nd edn. Addison-Wesley Publisher, Reading (1999)
Nipkow, T., Oheimb, D., Pusch, C.: μJava: Embedding a programming language in a theorem prover. In: Bauer, F.L., Steinbrüggen, R. (eds.) Foundations of Secure Computation. NATO Science Series F: Computer and Systems Sciences, vol. 175 (2000)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Liu, H., Moore, J.S. (2004). Java Program Verification via a JVM Deep Embedding in ACL2. In: Slind, K., Bunker, A., Gopalakrishnan, G. (eds) Theorem Proving in Higher Order Logics. TPHOLs 2004. Lecture Notes in Computer Science, vol 3223. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30142-4_14
Download citation
DOI: https://doi.org/10.1007/978-3-540-30142-4_14
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-23017-5
Online ISBN: 978-3-540-30142-4
eBook Packages: Springer Book Archive