Automated Systematic Testing of Open Distributed Programs

  • Koushik Sen
  • Gul Agha
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3922)

Abstract

We present an algorithm for automatic testing of distributed programs, such as Unix processes with inter-process communication, Web services, etc. Specifically, we assume that a program consists of a number of asynchronously executing concurrent processes or actors which may take data inputs and communicate using asynchronous messages. Because of the large numbers of possible data inputs as well as the asynchrony in the execution and communication, distributed programs exhibit very large numbers of potential behaviors. Our goal is two fold: to execute all reachable statements of a program, and to detect deadlock states. Specifically, our algorithm uses simultaneous concrete and symbolic execution, or concolic execution, to explore all distinct behaviors that may result from a program’s execution given different data inputs and schedules. The key idea is as follows. We use the symbolic execution to generate data inputs that may lead to alternate behaviors. At the same time, we use the concrete execution to determine, at runtime, the partial order of events in the program’s execution. This enables us to improve the efficiency of our algorithm by avoiding many tests which would result in equivalent behaviors. We describe our experience with a prototype tool that we have developed as a part of our Java program testing tool jCUTE.

References

  1. 1.
    Agha, G.: Actors: A Model of Concurrent Computation. MIT Press, Cambridge (1986)Google Scholar
  2. 2.
    Agha, G., Mason, I.A., Smith, S.F., Talcott, C.L.: A foundation for actor computation. Journal of Functional Programming 7, 1–72 (1997)MathSciNetCrossRefMATHGoogle Scholar
  3. 3.
    Alur, R., Brayton, R.K., Henzinger, T.A., Qadeer, S., Rajamani, S.K.: Partial-order reduction in symbolic state space exploration. In: Grumberg, O. (ed.) CAV 1997. LNCS, vol. 1254, pp. 340–351. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  4. 4.
    Babaoglu, O., Marzullo, K.: Consistent global states of distributed systems: Fundamental concepts and mechanisms. In: Distributed Systems, pp. 55–96 (1993)Google Scholar
  5. 5.
    Chandy, K.M., Lamport, L.: Distributed snapshots: determining global states of distributed systems. ACM Trans. Comput. Syst. 3(1), 63–75 (1985)CrossRefGoogle Scholar
  6. 6.
    Dwyer, M.B., Hatcliff, J., Ranganath, V.P.: Exploiting object escape and locking information in partial-order reductions for concurrent object-oriented programs. Form. Methods Syst. Des. 25(2–3), 199–240 (2004)CrossRefMATHGoogle Scholar
  7. 7.
    Fidge, C.J.: Partial orders for parallel debugging. In: Proceedings of the Workshop on Parallel and Distributed Debugging (WPDD), pp. 183–194. ACM, New York (1988)Google Scholar
  8. 8.
    Flanagan, C., Godefroid, P.: Dynamic partial-order reduction for model checking software. In: Proc. of the 32nd Symposium on Principles of Programming Languages (POPL 2005), pp. 110–121 (2005)Google Scholar
  9. 9.
    Garg, V.K., Chase, C.M.: Distributed algorithms for detecting conjunctive predicates. In: Proceedings of the 15th International Conference on Distributed Computing Systems (ICDCS 1995), p. 423. IEEE, Los Alamitos (1995)CrossRefGoogle Scholar
  10. 10.
    Godefroid, P.: Partial-Order Methods for the Verification of Concurrent Systems. LNCS, vol. 1032. Springer, Heidelberg (1996)MATHGoogle Scholar
  11. 11.
    Godefroid, P.: Model Checking for Programming Languages using VeriSoft. In: 24th ACM Symposium on Principles of Programming Languages, pp. 174–186 (1997)Google Scholar
  12. 12.
    Godefroid, P., Klarlund, N., Sen, K.: DART: Directed automated random testing. In: Proc. of the ACM SIGPLAN 2005 Conference on Programming Language Design and Implementation (PLDI) (2005)Google Scholar
  13. 13.
    Holzmann, G.J.: The model checker Spin. IEEE Trans. on Software Engineering 23(5), 279–295 (1997)CrossRefGoogle Scholar
  14. 14.
    King, J.C.: Symbolic Execution and Program Testing. Communications of the ACM 19(7), 385–394 (1976)MathSciNetCrossRefMATHGoogle Scholar
  15. 15.
    Lei, Y., Tai, K.-C.: Efficient reachability testing of asynchronous message-passing programs. In: 8th International Conference on Engineering of Complex Computer Systems (ICECCS), p. 35 (2002)Google Scholar
  16. 16.
    Myers, G.J.: The Art of Software Testing. Wiley, Chichester (1979)Google Scholar
  17. 17.
    Pasareanu, C.S., Dwyer, M.B., Visser, W.: Finding feasible counter-examples when model checking abstracted Java programs. In: Margaria, T., Yi, W. (eds.) ETAPS 2001 and TACAS 2001. LNCS, vol. 2031, pp. 284–298. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  18. 18.
    Peled, D.: All from one, one for all: on model checking using representatives. In: 5th Conference on Computer Aided Verification, pp. 409–423 (1993)Google Scholar
  19. 19.
    Sen, K., Agha, G.: Automated systematic testing of open distributed programs. Technical Report UIUCDCS-R-2005-2647, UIUC (2005)Google Scholar
  20. 20.
    Sen, K., Agha, G.: Concolic testing of multithreaded programs and its application to testing security protocols. Technical Report UIUCDCS-R-2006-2676, UIUC (2006)Google Scholar
  21. 21.
    Sen, K., Marinov, D., Agha, G.: CUTE: A concolic unit testing engine for C. In: 5th joint meeting of the European Software Engineering Conference and ACM SIGSOFT Symposium on the Foundations of Software Engineering (ESEC/FSE 2005), ACM, New York (2005)Google Scholar
  22. 22.
    Stoller, S.D.: Model-Checking Multi-Threaded Distributed Java Programs. In: Havelund, K., Penix, J., Visser, W. (eds.) SPIN 2000. LNCS, vol. 1885, pp. 224–244. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  23. 23.
    Valmari, A.: Stubborn sets for reduced state space generation. In: 10th International Conference on Applications and Theory of Petri Nets, pp. 491–515 (1991)Google Scholar
  24. 24.
    Visser, W., Pasareanu, C.S., Khurshid, S.: Test input generation with Java PathFinder. In: Proc. 2004 ACM SIGSOFT International Symposium on Software Testing and Analysis, pp. 97–107 (2004)Google Scholar
  25. 25.
    Xie, T., Marinov, D., Schulte, W., Notkin, D.: Symstra: A framework for generating object-oriented unit tests using symbolic execution. In: Proc. of the Tools and Algorithms for the Construction and Analysis of Systems (2005)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Koushik Sen
    • 1
  • Gul Agha
    • 1
  1. 1.Department of Computer ScienceUniversity of Illinois at Urbana-ChampaignUSA

Personalised recommendations