Abstract
Locating potential execution errors in software is gaining more attention due to the economical and social impact of software crashes. For this reason, many software engineers are now in need of automatic debugging tools in their development environments. Fortunately, the work on formal method technologies during the past 25 years has produced a number of techniques and tools that can make the debugging task almost automatic, using standard computer equipment and with a reasonable response time. In particular, verification techniques like model-checking that were traditionally employed for formal specifications of the software can now be directly employed for real source code. Due to the maturity of model-checking technology, its application to real software is now a promising and realistic approach to increase software quality. There are already some successful examples of tools for this purpose that mainly work with self-contained programs (programs with no system-calls). However, verifying software that uses external functionality provided by the operating system via API s is currently a challenging trend. In this paper, we propose a method for using the tool spin to verify C software systems that use services provided by the operating system thorough a given API. Our approach consists in building a model of the underlying operating system to be joined with the original C code in order to obtain the input for the model checker spin. The whole modeling process is transparent for the C programmer, because it is performed automatically and without special syntactic constraints in the input C code. Regarding verification, we consider optimization techniques suitable for this application domain, and we guarantee that the system only reports potential (non-spurious) errors. We present the applicability of our approach focusing on the verification of distributed software systems that use the API Socket and the network protocol stack TCP/IP for communications. In order to ensure correctness, we define and use a formal semantics of the API to conduct the construction of correct models.
Similar content being viewed by others
References
Ball, T., Cook, B., Levin, V., Rajamani, S.K.: SLAM and static driver verifier: technology transfer of formal methods inside microsoft. In: IFM, Springer, Heidelberg (2004)
Ball, T., Mjumdar, R., Millstein, T., Rajamani, S.K.: Automatic predicate abstraction of C programs. In: Proceedings of the SIGPLAN ’01 Conference on Programming Language Design and Implementation (2001)
Ball, T., Podelski, A., Rajamani, S.K.: Boolean and cartesian abstractions for model checking C programs. In: TACAS 01: Tools and Algorithms for Construction and Analysis of Systems. LNCS, vol. 2031, pp. 268–283. Springer, Heidelberg (2001)
Bosnacki, D.: Enhancing state space reduction techniques for model checking. Ph.D. Thesis, Eindhoven University of Technology (2001)
Camara, P., Gallardo, M.M., Merino, P., Sanan, D.: Model checking software with well-defined APIs: the socket case. In: FMICS 05: Tenth International Workshop on Formal Methods for Industrial Critical Systems, pp. 17–26. ACM Press, London (2005)
Camara, P., Gallardo, M.M., Merino, P.: Abstract matching for software model checking. In: SPIN 06: 13th International SPIN Workshop on Model Checking of Software. LNCS, vol. 3925. Springer, Heidelberg (2006)
Clarke, E., Kroening, D., Lerda, F.: A tool for checking ANSI-C programs. In: TACAS. LNCS, vol. 2988, pp. 168–176. Springer, Heidelberg (2004)
Gallardo M.M., Merino P., Pimentel E.: A generalized semantics of promela for abstract model checking. Formal Asp. Comput. 16, 166–193 (2004)
Gallardo M.M., Martinez J., Merino P., Pimentel E.: αSPIN: a tool for abstract model checking. Int. J. Softw. Tools Technol. Trans. 5(2–3), 165–184 (2004)
Garavel, H.: OPEN/CAESAR: an open software architecture for verification, simulation, and testing. In: Proceedings of the First International Conference on Tools and Algorithms for the Construction and Analysis of Systems TACAS’98. LNCS, vol. 1384, pp 68–84 (1998)
Godefroid, P.: Model checking for programming languages using verisoft. In: Proceedings of the 24th ACM Symposium on Principles of Programming Languages (1997)
Holzmann, G.J.: The model checker SPIN. IEEE Trans. SE 23(5) (1997)
Holzmann G.J.: SPIN Model Checker, The: Primer and Reference Manual. Addison-Wesley, Reading (2004)
Holzmann, G.J., Joshi, R.: Model-driven software verification. In: SPIN, pp. 76–91 (2004)
Holzmann, G.J., Smith, M.: Software model checking. Extracting verification models from source code. In: Invited Paper. Proc. PSTV/FORTE99 Pulb. Kluwer, Dordrecht (1999)
Havelund, K.: Thomas Pressburger. Model checking Java programs using Java PathFinder. In: International Journal on Software tools for Technology Transfer (STTT) (1999)
Java Compiler Compiler: The Java Parser Generator. Online documentation for Version 0.7.1. Sun Microsystems. Available at http://www.sun.com/suntest/JavaCC
Corbett, J., Dwyer, M., Hatcliff, J., Pasareanu, C., Robby, Laubach, S., Zheng, H.: Bandera: extracting finitestate models from java source code. In: Proc. of the 22nd Int. Conf. on Software Engineering. ACM Press, London (2000)
Mikac, J., Caspi, P.: Flush: a system development tool based on Scade/Lustre. Int. J. Softw. Tools Technol. Transf. (STTT) (2009)
Musuvathi, M., Park, D.W., Chou, A., Engler, D.R., Dill, D.L.: CMC: a pragmatic approach to checking real code. In: Procosc. of the Fifth Symposium on Operating Systems Design and Implementation (2002)
Raffelt, H., Steffen, B., Berg, T.: LearnLib: a library for automata learning and experimentation. Int. J. Softw. Tools Technol. Transf. (STTT) (2009)
Stoller, S.D.: Model-checking multi-threaded distributed java programs. In: Proc. 11th International Conference on Automated Deduction. LNAI, vol. 607, pp. 748–752 (1992)
Visser, W., Havelund, K., Brat, G., Park, S.: Model checking programs. In: Proc. of the 15th Int. Conf. on Automated Software Engineering, pp. 3–12. IEEE Comp. Society (2000)
Wijs, A., van de Pol, J., Bortnik, E.: Solving scheduling problems by untimed model checking: the clinical chemical analyser case study. Int. J. Softw. Tools Technol. Transf. (STTT) (2009)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
de la Cámara, P., del Mar Gallardo, M., Merino, P. et al. Checking the reliability of socket based communication software. Int J Softw Tools Technol Transfer 11, 359–374 (2009). https://doi.org/10.1007/s10009-009-0112-7
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10009-009-0112-7