Deterministic Testing of Java Multi-Threaded Programs through Program Transformation

프로그램 변환을 통한 Java 다중 스레드 프로그램의 결정적 테스팅

  • Published : 2000.06.15

Abstract

Concurrent programs, which are composed of threads that can operate concurrently, are intrinsically nondeterministic. Therefore, we can not directly apply classical testing or debugging techniques developed for sequential programs to concurrent programs because of the nonreproducibility due to nondeterminism. In this paper, we present a source tranformation method to guarantee the reproducibility of multi-threaded programs written in Java programming language. Once a mutli-threaded program has been transformed according to the transformation rules, we can force the program's execution to follow the given sequence of synchronized methods repeatedly and reduce the efforts to find the source of the errors. In addition, we present a method for checking the feasibility of the synchronized method sequence to be replayed.

동시에 수행 가능한 여러 개의 스레드들로 구성된 병렬 프로그램은 본질적으로 비결정성을 내포하고 있다. 따라서, 이러한 비결정성에 기인한 비반복성때문에 순차적 프로그램을 위해 개발되었던 기존의 테스팅 테스팅 방법이나 디버깅 방법을 병렬 프로그램에 그대로 적용할 수 없다. 이 논문에서는 Java 다중 스레드 프로그램의 재수행성을 보장하기 위하여 대상이 되는 프로그램을 원시코드 수준에서 변환하는 방법을 제시한다. 일단 변환 규칙에 따라 변경이 된 프로그램은 주어진 동기화 메소드 시퀀스를 강제적으로 반복 수행할 수 있어 오류의 원인을 찾는 노력을 줄일 수 있다. 또한, 재실행하고자 하는 동기화 메소드 시퀀스가 실제 주어진 프로그램에서 수행 가능한지를 판별하는 방법을 제시한다.

Keywords

References

  1. S. M. Shatz and W.K. Cheng, 'A Petri Net Framework for Automated Static Analysis of Ada Tasking Behavior,' Journal of Systems and Software, vol. 8, pp. 343-350, 1988 https://doi.org/10.1016/0164-1212(88)90027-1
  2. R. N. Taylor, 'A General Purpose Algorithm for Analyzing Concurrent Programs,' Communications of ACM, Vol. 26, no. 5, pp. 362-376, 1983 https://doi.org/10.1145/69586.69587
  3. A. Cimitle and U. De Carlini 'Replay-based Debugging of Occam Programs,' Journal of Software Testing, Verfication and Reliability, vol. 3, pp. 83-100, 1993 https://doi.org/10.1002/stvr.4370030204
  4. J. H. Griffin, H. J. Wasserman, and McGarvan, 'A Debugger for Parallel Processes,' Software Practice and Experience, vol. 18, no. 12, pp. 1179-1190, 1988 https://doi.org/10.1002/spe.4380181206
  5. T. J. LeBlanc and J. M. Mellor-Crummey, 'Debugging Parallel Programs with Instant Replay,' IEEE Trans. on Computers, vol. C-36, no. 4, pp. 471-482, 1987
  6. K. C. Tai, R. H. Carver and E. E. Obaid, 'Debugging Concurrent Ada Programs by Deterministic Execution,' IEEE Trans. on Soft. Eng., vol. 17, no. 1, pp. 45-63, January 1991 https://doi.org/10.1109/32.67578
  7. M. Young and R. N. Taylor, 'Combining Static Analysis with Symbolic Execution,' IEEE Trans. on Soft. Eng., vol. 14, no. 10, pp. 1499-1511, 1988 https://doi.org/10.1109/32.6195
  8. H. AboElFotoh, O. Abou-Rabia, and H. Ural, 'A Test Generation Algorithm for Systems Modelled as Nondeterministic FSMs,' IEE Software Eng. Journal, pp. 184-188, July 1993
  9. I. S. Chung, et al., 'Testing of Concurrent Programs based on Message Sequence Charts,' Proc. of Int'l Symp. on Soft. Eng. for Parallel and Distributed Systems, pp. 72-82, May 1999
  10. I. S. Chung, et al., 'Testing of Concurrent Programs After Specification Changes,' Proc. of Int'l Conf. on Software Maintenance, Oxford, England, pp. 199-210, August 1999
  11. J. Grabowski, D. Hogrefe, I. Nussbaumer, and A. Spichiger, 'Test Case Specification Based on MSCs and ASN.1,' Proc. of the Seventh SDL Forum 1995, pp. 307-322, 1995
  12. D. Rosenblum, 'Specifying Concurrent Systems with TSL,' IEEE Software, pp. 52-61, May 1991 https://doi.org/10.1109/52.88944
  13. K. C. Tai and R. H. Carver, 'A Specification-Based Methodology for Testing Concurrent Programs,' Proc. of European Software Eng. Conf., pp. 154-172, 1995
  14. E. Gamma et al., Design Patterns: Elements of Reusable Object-Oriented Software Addison-Wesley, 1995
  15. ITU-T Recommendation Z.120: Message Sequence Chart (MSC), September 1994
  16. I. S. Chung, et al., 'A New Approach to Deterministic Execution Testing for Concurrent Programs,' Proc. of Int'l Workshop on Distributed System Validation and Verfication, Taiwan, pp. E59-E66, March 2000
  17. D. Lea, Concurrent Programming in Java, Addison-Welsely, 1997