Abstract
The paper presents a target analyzable language used for verification of real-world production GNU C programs (Linux kernel modules). The language represents an extension of the existing intermediate language used by the Jessie plugin for the Frama-C static analysis framework. Compared to the original Jessie, the extension is fully compatible with the C semantics of arrays, initially supports discriminated unions and prefix (hierarchical) structure pointer casts and provides a limited, but reasonable support for low-level pointer casts (reinterpretations of the underlying bytes of memory). The paper describes the approaches to translation of the original C code into the analyzable intermediate language and of the intermediate language into Why3ML i.e. the input language of the Why3 deductive verification platform.
Similar content being viewed by others
References
Gomes Carla, P., Kautz, H., Sabharwal, A., and Selman, B., Satisfiability Solvers, 2008.
Kroening D. and Strichman O., Decision Procedures: An Algorithmic Point of View, 1st edition, Springer Publishing Company, Incorporated, 2008.
Reynolds, J.C., Separation logic: A logic for shared mutable data structures, Proc. 17th Annual IEEE Symposium on Logic in Computer Science. LICS’ 02, Washington, DC, USA: IEEE Computer Society, 2002, pp. 55–74. URL: http://dl.acm.org/citation.cfmid=645683.664578.
Cormac Flanagan, Rustan, K., Leino, M., Lillibridge, M., et al., Extended static checking for Java, Proc. ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation, PLDI’ 02. New York, NY, USA: ACM, 2002, pp. 234–245. URL: http://doi.acm.org/10.1145/512529.512558http://doi.acm.org/10.1145/512529.512558.
Barnett, M., Leino, K., Rustan, M., and Schulte, W., The spec# programming system: An overview, Proc. 2004 International Conference on Construction and Analysis of Safe, Secure, and Interoperable Smart Devices, CASSIS’04. Berlin, Heidelberg: Springer-Verlag, 2005, pp. 49–69. URL: http://dx.doi.org/10.1007/978-3-540-30569-9-3.
Cohen, E., Dahlweid, M., Hillebrand, M., et al., Vcc: A practical system for verifying concurrent C, Proc. 22nd International Conference on Theorem Proving in Higher Order Logics, TPHOLs’ 09. Berlin, Heidelberg: Springer-Verlag, 2009, pp. 23–42. URL: http://dx.doi.org/10.1007/978-3-642-03359-9-2.
Cuoq, P., Kirchner, F., Kosmatov, N., et al., Frama-C: A software analysis perspective, Proc. 10th International Conference on Software Engineering and Formal Methods, SEFM’12. Berlin, Heidelberg: Springer-Verlag, 2012, pp. 233–247. URL: http://dx.doi.org/10.1007/978-3-642-33826-7-16.
Moy, Ya., Automatic modular static safety checking for C programs, PhD Thesis, Université Paris-Sud., 2009. URL: http://www.lri.fr/~marche/moy09phd.pdf.
Talpin, J.-P. and Jouvelot, P., Polymorphic type, region and effect inference, Journal of Functional Programming, 1992, vol. 2, pp. 245–271.
Tofte, M. and Talpin, J.-P., Region-based memory management, Information and Computation, 1997, vol. 132, no. 2, pp. 109–176. URL: http://www.sci-encedirect.com/science/article/pii/S0890540196926139.
Hubert Thierry and Marchée Claude, Separation analysis for deductive verification, Heap Analysis and Verification (HAV’07), Braga, Portugal, 2007, pp. 81–93. URL: http://www.lri.fr/~marche/hubert07hav.pdf.
Moy Yannick and Marché Claude, Modular inference of subprogram contracts for safety checking, Journal of Symbolic Computation, 2010, vol. 45, pp. 1184–1211.
Burstall Rodney, M., Some techniques for proving correctness of programs which alter data structures, Machine Intelligence, 1972, vol. 7, nos. 23–50, p. 3.
Bornat, R., Proving pointer programs in hoare logic, Proc. 5th International Conference on Mathematics of Program Construction, MPC’ 00. London, UK, UK: Springer-Verlag, 2000, pp. 102–126. URL: http://dl.acm.org/citation.cfmid=648085.747307.
Moy Yannick, Union and cast in deductive verification, Proc. C/C++ Verification Workshop. Technical Report ICIS-R07015, Radboud University Nijmegen, 2007, pp. 1–16. URL: http://www.lri.fr/~moy/Publis/moy07ccpp.pdf.
Marché Claude, Jessie: An intermediate language for Java and C verification, Proc. 2007 Workshop on Programming Languages Meets Program Verification, PLPV’ 07. New York, NY, USA: ACM, 2007, pp. 1–2. URL: http://doi.acm.org/10.1145/1292597.1292598.
Condit, J., Harren, M., McPeak, S., et al., Ccured in the real world, Proc. ACM SIGPLAN 2003 Conference on Programming Language Design and Implementation, PLDI’ 03. New York, NY, USA: ACM, 2003, pp. 232–244. URL: http://doi.acm.org/10.1145/781131.781157.
Cohen, E., Moskal, M., Tobies, S., and Schulte W., A precise yet efficient memory model for C, Electron. Notes Theor. Comput. Sci., 2009, vol. 254, pp. 85–103. URL: http://dx.doi.org/10.1016/j.entcs.2009.09.061.
Bjarne, S., Points-to analysis in almost linear time, Proc. 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL’ 96. New York, NY, USA: ACM, 1996, pp. 32–41. URL: http://doi.acm.org/10.1145/237721.237727.
Filliatre, J.-C. and Paskevich, A., Why3: Where programs meet provers, Proc. 22nd European Conference on Programming Languages and Systems, ESOP’13. Berlin, Heidelberg: Springer-Verlag, 2013, pp. 125–128. URL: http://dx.doi.org/10.1007/978-3-642-37036-6-8.
Dijkstra Edsger, W., Guarded commands, nondeterminacy, and formal derivation of programs, Communications of the ACM, 1975, vol. 18, no. 8, pp. 453–457.
Filliatre, J.-C. and Marché, C., The why/krakatoa/caduceus platform for deductive program verification, in CAV’ 07, 2007, pp. 173–177.
Filliatre, J.-C. and Marché, C., Multi-prover verification of C programs, Proc. 6th International Conference on Formal Engineering Methods, Davies, J., Wolfram, S., and Barnett, M., Eds., vol. 3308 of Lecture Notes in Computer Science, Seattle, WA, USA: Springer, 2004, pp. 15–29. URL: http://www.lri.fr/~filliatr/ftp/publis/caduceus.ps.gz.
Khoroshilov, A., Mutilin, V., Novikov, E., Shved, P., and Strakh, A., Towards an open framework for C verification tools Benchmarking, Proc. 8th International Andrei Ershov Memorial Conference, PSI 2011, Novosibirsk, Russia, June 27–July 1, 2011, Revised Selected Papers, pp. 179–192. URL: http://dx.doi.org/10.1007/978-3-642-29709-0-17.
Author information
Authors and Affiliations
Corresponding author
Additional information
Original Russian Text © M.U. Mandrykin, A.V. Khoroshilov, 2015, published in Programmirovanie, 2015, Vol. 41, No. 4.
The article was translated by the authors.
Rights and permissions
About this article
Cite this article
Mandrykin, M.U., Khoroshilov, A.V. High-level memory model with low-level pointer cast support for Jessie intermediate language. Program Comput Soft 41, 197–207 (2015). https://doi.org/10.1134/S0361768815040040
Received:
Published:
Issue Date:
DOI: https://doi.org/10.1134/S0361768815040040