Abstract
In the paper, a new three-level approach to the verification of sequential object-oriented programs is presented. It is applied to an expressive subset C#-light of the C# language, which includes all basic sequential constructs of the latter. At the first stage, the C#-light language is translated into the intermediate C#-kernel language. At the second stage, lazy correctness conditions are generated by means of the axiomatic semantics developed for C#-kernel. These conditions are lazy because they may include special functional symbols representing postponed extraction of invariants of labeled statements, as well as postponed invocations of methods and delegates. At the third stage, these conditions are refined with the use of operational semantics algorithms. Such an approach simplifies the axiomatic semantics and makes it possible to uniquely derive correctness conditions. An example of verification of a C#-light program is presented.
Similar content being viewed by others
References
Börger, E., Fruja, N.G., Gervasi, V., and Stärk, R., A High-Level Modular Definition of Semantics of C#, Theoretical Comput. Sci., 2004, no. 336 (2/3).
von Oheimb, D., Hoare Logic for Java in Isabelle/HOL, Concurrency Computation, 2001, vol. 13.
von Oheimb, D. and Nipkow, T., Hoare Logic for Nano-Java: Auxiliary Variables, Side Effects, and Virtual Methods Revisited, Lecture Notes in Computer Science (Proc. of FME 2002), 2002, vol. 2391, pp. 89–105.
Poetzsch-Heffter, A. and Muller, P., A Programming Logic for Sequential Java, Lecture Notes in Computer Science (Proc. ESOP’99), 1999, vol. 1576, pp. 162–176.
Reus, B., Wirsing, M., and Hennicker, R., A Hoare Calculus for Verifying Java Realizations of OCL-constrained Design Models, Lecture Notes in Computer Science (Proc. FASE 2001), 2001, vol. 2029, pp. 300–317.
Apt, K.R. and Olderog, E.R., Verification of Sequential and Concurrent Programs, Springer, 1991.
Pierik, C. and de Boer, F.S., A Syntax-Directed Hoare Logic for Object-oriented Programming Concepts, Lecture Notes in Computer Science, 2003, vol. 2884, pp. 64–78.
C# Language Specification. Standard ECMA-334, 2001. http://www.ecma-international.org/.
Dubranovskii, I.V., Verification of C# Programs: Translation from the C#-light Language to the C#-kernel Language, Preprint of ISI SO RAN, Novosibirsk, 2004, no. 120.
Jacobs, B., Kiniry, J.L., and Warnier, M., Java Program Verification Challenges, Lecture Notes in Computer Science (Proc. FMCO 2002), 2003, vol. 2852, pp. 202–219.
Nepomniaschy, V.A., Anureev, I.S., and Promsky, A.V., Verification-Oriented Language C-light and its Structural Operational Semantics, Lecture Notes in Computer Science (Proc. PSI 2003), 2003, vol. 2890, pp. 103–111.
Nepomniaschy, V.A., Anureev, I.S., Mikhailov, I.N., and Promsky, A.V., Towards Verification of C Programs: C-Light Language and Its Formal Semantics, Programmirovanie, 2002, no. 6, pp. 19–30 [Programming Comput. Software (Engl. Transl.), 2002, vol. 28, no. 6, pp. 314–323].
Nepomniaschy, V.A., Anureev, I.S., and Promsky, A.V., Towards Verification of C Programs: Axiomatic Semantics of the C-kernel Language, Programmirovanie, 2003, no. 6, pp. 65–80 [Programming Comput. Software (Engl. Transl.), 2003, vol. 29, no. 6, pp. 338–350].
Müller, P., Modular Specification and Verification of Object-Oriented Programs, Lecture Notes in Computer Science, 2002, vol. 2262.
Leino, K.R.M., Extended Static Checking: A Ten-Year Perspective, Lecture Notes in Computer Science, 2001, vol. 2000, pp. 157–175.
Huisman, M. and Jacobs, B., Java Program Verification via a Hoare Logic with Abrupt Termination, Lecture Notes in Computer Science (Proc. FASE 2000), 2000, vol. 1783, pp. 284–303.
Huisman, M. and Jacobs, B., Inheritance in Higher Order Logic: Modeling and Reasoning, Lecture Notes in Computer Science (Proc. TPHOLs 2000), 2000, vol. 1869, pp. 301–319.
Jacobs, B. and Poll, E., Java Program Verification at Nijmegen: Development and Perspective, Lecture Notes in Computer Science, 2004, vol. 3233, pp. 134–153.
Author information
Authors and Affiliations
Additional information
Original Russian Text © V.A. Nepomniaschy, I.S. Anureev, I.V. Dubranovskii, A.V. Promsky, 2006, published in Programmirovanie, 2006, Vol. 32, No. 4.
Rights and permissions
About this article
Cite this article
Nepomniaschy, V.A., Anureev, I.S., Dubranovskii, I.V. et al. Towards verification of C# programs: A three-level approach. Program Comput Soft 32, 190–202 (2006). https://doi.org/10.1134/S0361768806040025
Received:
Issue Date:
DOI: https://doi.org/10.1134/S0361768806040025