The Design and Implementation of Automata-based Testing Environments for Multi-thread Java Programs

Java 다중 스레드 프로그램을 위한 오토마타 기반 테스팅 환경의 설계 및 구현

  • 서희석 (한국과학기술원 전자전산학과) ;
  • 정인상 (한성대학교 컴퓨터공학부) ;
  • 김병만 (금오공과대학) ;
  • 권용래 (한국과학기술원 전자전산학과)
  • Published : 2002.12.01

Abstract

Classical deterministic testing controls the execution of concurrent programs based on the equivalence between specifications and programs. However, it is not directly applicable to a situation in which synchronization sequences, being valid but infeasible, are taken into account. To resolve this problem, we had proposed automata-based deterministic testing in our previous works, where a concurrent program is executed according to one of the sequences accepted by the automaton recognizing all sequences semantically equivalent to a given sequence. In this paper, we present the automata-based testing environment for Java multi-thread programs, and we design and implement "Deterministic Executor" in the testing environment. "Deterministic Executor" transforms a Java multi-thread program by applying automata-based deterministic testing, the transformed program presents testing results. "Deterministic Executor" uses "Automata Generator", which generates an equivalent automaton of a test sequence, and "Replay Controller", which controls the execution of programs according to the sequence accepted by the automaton. By illustrating automata-based testing procedures with a gas station example, we show how the proposed approach does works in a Java multi-threaded program.roach does works in a Java multi-threaded program.

고전적인 결정적 테스팅 방법은 명세와 프로그램의 동치 관계를 기반으로 병행 프로그램의 수행 경로를 제어한다. 따라서, 주어진 시퀀스를 직접 구현하지 않고, 그와 의미적으로 동일한 다른 시퀀스를 구현한 프로그램에 대해서는 결정적 테스팅 방법을 적용하기 어렵다. 이를 해결하기 위해서, 우리는 테스트 시퀀스와 의미적으로 동일한 모든 시퀀스들을 허용하는 동치 집합 오토마타를 이용한 오토마타 기반 테스팅 방법을 제안하였었다. 이 논문에서는 Java 다중 스레드 프로그램에 대한 오토마타 기반 테스팅 환경을 제안하고, 테스팅 환경 내의 테스트 수행 지원 도구를 설계하고 구현하는 방법을 제안한다. 테스트 수행 지원 도구에서는 주어진 Java 다중 스레드 프로그램을 오토마타 기반의 결정적 테스팅 방법이 적용된 프로그램으로 변환하고, 이 변환된 프로그램을 수행함으로써 테스트의 결과를 알 수 있다. 이를 위해서 테스트 수행 지원 도구 내에서 동치 집합 오토마타를 생성하는 오토마타 생성기와 프로그램의 수행을 제어하기 위한 재연 제어기를 설계하고 구현한다. 그리고, 가스 충전소 예제를 이용하여 오토마타 기반의 결정적 테스팅의 과정 및 효과를 기술한다.

Keywords

References

  1. R. N. Taylor, D. L. Levine, and C. D. Kelly, 'Structural Testing of Concurrent Programs', IEEE Transactions on Software Engineering, vol. 18, no. 3, pp. 206-215, Mar. 1992 https://doi.org/10.1109/32.126769
  2. K. C. Tai, 'Testing Concurrent Programs', Proceedings of 9th International Computer Software and Applications Conference (COMSAC'85), pp. 310-317, 1985
  3. R. H. Carver and K. C. Tai, 'Replay and Testing for Concurrent Programs', IEEE Software, pp, 66-74, Mar. 1991 https://doi.org/10.1109/52.73751
  4. P. A. Emrath, S. Ghosh and D. A. Padua, 'Detecting Nondeterminacy in Parallel Programs'. IEEE Software, pp. 69-77, Jan. 1992 https://doi.org/10.1109/52.108783
  5. 정인상, 'Java 다중 스레드 프로그램의 결정적 수행을 위한 프로그램 변환 방법', 정보과학회 논문지, 제27권, 제6호, pp.607-617, Jun. 1999
  6. T. J. LeBlanc and J. M. Mellor-Crummey, 'Debugging Parallel Programs with Instant Replay', IEEE Transaction on Computers, vol. C-36, no. 4, pp. 471-482, 1987 https://doi.org/10.1109/TC.1987.1676929
  7. K. C. Tai, R. H. Carver, and E. E. Obaid, 'Debugging Concurrent Ada Programs by Deterministic Execution', IEEE Transaction on Software Engineering, vol. 17, no. 1, pp. 45-63, Jan. 1991 https://doi.org/10.1109/32.67578
  8. H. W. Sohn, D. C. Kung, and P. Hsia, 'State-based Reproducible Testing for CORBA Applications', Proceedings of the International Symposium on Software Engineering for Parallel and Distributed Systems, pp, 24-35, 1999 https://doi.org/10.1109/PDSE.1999.779736
  9. X. Cai and J. Chen, 'Control of Nondeterminism in Testing Distributed Multithreaded Programs', Proceedings of 1st Asia-Pacific Conference on Quality Software, pp. 29-38, 2000 https://doi.org/10.1109/APAQ.2000.883775
  10. G. V. Bochmann and A Petrenko, 'Protocol Testing: Review of Methods and Relevance for Software Testing', Proceedings of International Symposium on Software Testing and Analysis, pp. 109-124, 1994 https://doi.org/10.1145/186258.187153
  11. R. H. Carver and K. C. Tai, 'Use of Sequencing Constraints for Specification-based Testing of Concurrent Programs', IEEE Transactions on Software Engineering, vol. 24, no. 6, pp, 471-490, Jun. 1998 https://doi.org/10.1109/32.689403
  12. I. S. Chung, H. S. Kim, H. S. Bae, Y. R. Kwon, and B. S. Lee, 'Testing of Concurrent Programs Based on Message Sequence Charts', Proceedings of International Symposium on Software Engineering for Parallel and Distributed Systems (PDSE 99), pp. 72-82, May 1999 https://doi.org/10.1109/PDSE.1999.779740
  13. I. S. Chung and B. M. Kim, 'Yet Another Approach to Deterministic Execution Testing for Distributed Programs', Proceedings of the IASTED International Conference on Software Engineering and Applications, pp.55-60, 2000
  14. I. S. Chung, B. M. Kim, and H. S. Kim, 'A New Approach to Deterministic Execution Testing For Concurrent Programs', International Workshop on Distributed System Validation and Verification, pp. E-59 E-66, 2000
  15. 정인상, 김병만, 김현수, '오토마타기반의 병행 프로그램을 위한 결정적 수행 테스팅 방법', 정보과학회 논문지, 제28권, 제10호, Oct. 2001
  16. D. Helmbold and D. Luckham, 'Debugging Ada Tasking Programs', IEEE Software, vol. 2, no. 2, pp. 47-57, Mar. 1985 https://doi.org/10.1109/MS.1985.230351