ABSTRACT
In this paper we address two main questions: how to reason about the correctness of unstructured programs (particularly programs written in ARM Assembly) and how to use a proof-based system to check computational complexity of such programs. We approach the correctness issue by applying a flow sequentialization methodology and a formalized semantics of ARM instructions. An annotated ARM program is turned into a set of purely sequential programs, then each instruction is mapped into the corresponding formalized opcodes and finally Why3's VCGen is employed to generate proper Verification Conditions. Regarding complexity checking, we propose a methodology, based on the sequentialization process, by encoding instructions CPU-cost into their semantics and checking the program's calculated cost against user-supplied cost information (cost properties will be treated as normal functional annotations). Along with the formalization of correctness and complexity reasoning techniques, a prototype tool has been implemented and used to verify both the correctness and complexity of some practical examples.
References
- Jade Alglave, Anthony Fox, Samin Ishtiaq, Magnus O. Myreen, Susmit Sarkar, Peter Sewell, and Francesco Zappa Nardelli. The semantics of power and arm multiprocessor machine code. In Proc. of the 4th workshop on Declarative aspects of multicore programming, pages 13--24, New York, NY, USA, 2009. Google Scholar
Digital Library
- Mike Barnett, K. Leino, and Wolfram Schulte. The spec# programming system: An overview. In Construction and Analysis of Safe, Secure, and Interoperable Smart Devices. 2005. Google Scholar
Digital Library
- Mike Barnett and K. Rustan M. Leino. Weakest-precondition of unstructured programs. SIGSOFT Softw. Eng. Notes, 31(1): 82--87, September 2005. Google Scholar
Digital Library
- Jean-Christophe Filliâtre. One logic to use them all. pages 1--20.Google Scholar
- Jean-Christophe Filliâtre. Formal Verification of MIX Programs. In Journées en l'honneur de Donald E. Knuth, October 2007.Google Scholar
- Jean-Christophe Filliâtre. Deductive Program Verification. Thèse d'habilitation, Université Paris-Sud, December 2011.Google Scholar
- Jean-Christophe Filliâtre. Deductive software verification. International Journal on Software Tools for Technology Transfer (STTT), 13(5): 397--403, August 2011. Google Scholar
Digital Library
- Jean-Christophe Filliâtre and Andrei Paskevich. Why3 --- where programs meet provers. In Proc. of the 22nd European Symposium on Programming, March 2013. Google Scholar
Digital Library
- Jonas B. Jensen, Nick Benton, and Andrew Kennedy. High-level separation logic for low-level code. In Proc. 40th annual ACM symposium on Principles of programming languages, pages 301--314, New York, NY, USA, 2013. Google Scholar
Digital Library
- Xavier Leroy. The CompCert verified compiler, software and commented proof, March 2012.Google Scholar
- ARM Limited. ARM7TDMI Data Sheet, 1995.Google Scholar
- Zhaozhong Ni and Zhong Shao. Certified assembly programming with embedded code pointers. In Proc. 33rd ACM symposium on Principles of programming languages, pages 320--333, 2006. Google Scholar
Digital Library
- François Pottier. Types for complexity-checking, March 2011. Talk given at ENS, Lyon, France.Google Scholar
- Xiaomu Shi, Jean-François Monin, Frédéric Tuong, and Frédéric Blanqui. First steps towards the certification of an arm simulator using compcert. CoRR, abs/1202.6472, 2012. Google Scholar
Digital Library
- Konrad Slind and Michael Norrish. A brief overview of hol4. In TPHOLs, pages 28--32, 2008. Google Scholar
Digital Library
- Reinhard Wilhelm, Jakob Engblom, Andreas Ermedahl, Niklas Holsti, Stephan Thesing, David Whalley, Guillem Bernat, Christian Ferdinand, Reinhold Heckmann, Tulika Mitra, Frank Mueller, Isabelle Puaut, Peter Puschner, Jan Staschulat, and Per Stenström. The worst-case execution-time problem - overview of methods and survey of tools. ACM Trans. Embed. Comput. Syst., 7(3): 36:1--36:53, May 2008. Google Scholar
Digital Library
Index Terms
Complexity checking of ARM programs, by deduction



Comments