DOI QR코드

DOI QR Code

Test Suit Generation System for Retargetable C Compilers

재겨냥성 C 컴파일러를 위한 테스트 집합 생성 시스템

  • 우균 (부산대학교 정보컴퓨터공학부) ;
  • 배정호 (부산대학교 컴퓨터공학과) ;
  • 장한일 (슈어소프트테크 소프트웨어 시험자동화연구소) ;
  • 이윤정 (부산대학교 U-Port 사업단) ;
  • 채흥석 (부산대학교 정보컴퓨터공학부)
  • Published : 2009.08.31

Abstract

With the increasing adoption of embedded processors, the need of developing compilers for the embedded processors with timely manner is also growing. Retargeting has been adopted as a viable approach to constructing new compilers by modifying the back-end of an existing compiler. This paper proposes a test suite generation system for testing retargetable C compilers. The proposed system generates the test suite using the grammar coverage concept. Generally, the size of the test suite satisfying the grammar coverage of the source language is very large. Hence, the proposed system also provides the facility to reduce the size of the test suite. According to the experimental result, the reduced test suite can detect 75% of the compiler faults detected by the original test suite though the size of the reduced test suite is only 10% of that of the original test suite in average. This result indicates that the reduction technique proposed in this paper can be effectively used in the prior phase of the development procedure of the embedded compilers.

임베디드 프로세서 사용이 증가함에 따라 임베디드 프로세서를 위한 컴파일러를 시기 적절히 개발해야 할 필요성이 증가하고 있다. 컴파일러 후단부를 수정하여 새로운 컴파일러를 구성하는 재겨냥 기법이 이에 적합한 기법으로 채택되고 있다. 이 논문에서는 재겨냥성 C 컴파일러를 테스트하기 위한 테스트 집합 생성 시스템을 제안한다. 제안한 시스템은 문법 커버리지 개념을 이용하여 테스트 집합을 생성한다. 일반적으로 원시 프로그래밍 언어의 문법을 이용하여 테스트 집합을 생성하면 방대한 크기의 테스트 집합이 얻어진다. 그러나 신속히 컴파일러를 출시해야하는 상황에서는 방대한 테스트 집합 크기가 문제가 될 수 있다. 이에 이 논문에서 제안한 시스템은 중간 코드를 고려하여 테스트 집합을 축약하는 기능을 탑재하고 있다. 실험 결과에 따르면, 비록 축약된 테스트 집합 크기는 원본 테스트 집합 크기의 평균 10%에 불과하지만 원본 테스트 집합이 검출할 수 있는 컴파일러 오류의 75% 정도를 검출할 수 있음을 알 수 있었다. 이는 본 논문에서 제시한 축약 기법이 임베디드 컴파일러 개발 초기 단계에서 효과적으로 사용될 수 있음을 의미한다.

Keywords

References

  1. P. Marwedel. Tree-Based Mapping of Algorithms to Predefined Structures. In IEEE/ACM International Conference on CAD, pp.586-593, 1993
  2. R. Leupers and P. Marwedel. Retargetable Generation of Code Selectors from HDL Processor Models. In European Design and Test Conference, pp.140-144, 1997
  3. G. Araujo, S. Malik, and M. T.-C. Lee. Using Register-Transfer Paths in Code Generation for Heterogeneous Memory-Register Architectures. In Design Automation Conference, pp.591-596, 1996 https://doi.org/10.1145/240518.240630
  4. D. Lanneer, J. Van Praet, A. Kifli, K. Schoofs, W. Geurts, F. Thoen, and G. Goossens. Chess: Retargetable Code Generation for Embedded DSP Processors, In Proceedings on Code Generation for Embedded Processors, pp.85-102, 1994
  5. S. Hanono, S. Devadas. Instruction selection, resource allocation, and scheduling in the AVIV retargetable code generator, In Proceedings of the 35th annual conference on Design automation, pp.510-515, 1998
  6. 장한일, 우균, 채흥석, 중간표현을 이용한 재목적 컴파일러의 효율적인 테스트 방법, 한국정보과학회 2006 가을 학술발표논문집 제33권 제2호(B), pp.575-579, 2006
  7. Gyun Woo, Heung Seok Chae, and Hanil Jang, An Intermediate Representation Approach to Reducing Test Suites for Retargeted Compilers, In Proceedings of 12th Ada-Europe International Conference on Reliable Software Technologies, pp.100-113, 2007 https://doi.org/10.1007/978-3-540-73230-3_8
  8. A. S. Boujarwah and K. Saleh. Compiler Test Case Generation Methods: a Survey and Assessment. Information and Software Technology, 39(9): 617-625, 1997 https://doi.org/10.1016/S0950-5849(97)00017-7
  9. Boris Beizer. Software Testing Techniques. John Wiley & Sons, Inc., New York, NY, USA, 1990
  10. A. Gargantini and E. Riccobene. ASM-based Testing: Coverage Criteria and Automatic Test Sequence. Journal of Universal Computer Science, 7(11): 1050-1067, 2001
  11. Keith W. Miller. A Modest Proposal for Software Testing. IEEE Software, 18(2): 98-100, 2001 https://doi.org/10.1109/MS.2001.10012
  12. P. Purdom. A Sentence Generator for Testing Parsers. BIT Numerical Mathematics, 12(3): 366-375, 1972 https://doi.org/10.1007/BF01932308
  13. Alexey Kalinov, Alexander Kossatchev, Alexandre Petrenko, Mikhail Posypkin, and Vladimir Shishkov. Coverage-Driven Automated Compiler Test Suite Generation. Electronic Notes Theoretical Computational Science, 82(3), 2003 https://doi.org/10.1016/S1571-0661(05)82625-8
  14. R. A. DeMillo, R. J. Lipton, and F.G. Sayward. Hints on Test Data Selection: Help for the Practicing Programmer. IEEE Computer, 11(4): 34-41, 1978 https://doi.org/10.1109/C-M.1978.218136
  15. Richard G. Hamlet. Testing Programs with the Aid of a Compiler. IEEE Transactions on Software Engineering, 3(4): 279-290, 1977 https://doi.org/10.1109/TSE.1977.231145
  16. Alexander Kossatchev and Mikhail Posypkin. Survey of Compiler Testing Methods. Programming and Computer Software, 31(1):10-19, 2005 https://doi.org/10.1007/s11086-005-0008-6
  17. John Hannan and Frank Pfenning. Compiler Verification in LF. In Andre Scedrov, editor, In Proceedings of the Seventh Annual IEEE Symposium on Logic in Computer Science, pp.407-418. 1992
  18. Jorg Harm and Ralf Lammel. Two-Dimensional Approximation Coverage. Informatica (Slovenia), 24(3), 2000
  19. Ralf Lammel. Grammar Testing. In Proceedings on Fundamental Approaches to Software Engineering (FASE) 2001, volume 2029 of LNCS, pp.201-216. 2001 https://doi.org/10.1007/3-540-45314-8_15
  20. Sergey V. Zelenov, Sophia A. Zelenova, Alexander Kossatchev, and Alexandre Petrenko. Test Generation for Compilers and Other Formal Text Processors. Programming and Computer Software, 29(2): 104-111, 2003 https://doi.org/10.1023/A:1022904917707
  21. A. Kalinov, A. Kossatchev, A. Petrenko, M. Posypkin, and V. Shishkov. Using ASM Specifications for Compiler Testing, Lecture Notes in Computer Science, volume 2589, p. 415, 2003 https://doi.org/10.1007/3-540-36498-6_29
  22. A. Kalinov, A. Kossatchev, M. Posypkin, and V. Shishkov. Using ASM Specifiation for Automatic Test Suite Generation for mpC Parallel Programming Language Compiler, In Proceedings of the Fourth International Workshop on Action Semantics, pp.99-109, 2002
  23. Clara Jaramillo, Rajiv Gupta, and Mary Lou Soffa. Comparison Checking: An Approach to Avoid Debugging of Optimized Code. In ESEC / SIGSOFT FSE, pp. 268-284, 1999
  24. Tim S. McNerney. Verifying the Correctness of Compiler Transformations on Basic Blocks Using Abstract Interpretation. SIGPLAN Notices, 26(9): 106-115, June, 1991 https://doi.org/10.1145/115866.115877
  25. George C. Necula. Translation Validation for an Optimizing Compiler. ACM SIGPLAN Notices, 35(5): 83-94, 2000 https://doi.org/10.1145/358438.349314
  26. Mark Hennessy and James F. Power. An Analysis of Rule Coverage as a Criterion in Generating Minimal Test Suites for Grammar-Based Software. In ASE '05: Proceedings of the 20th IEEE/ACM international Conference on Automated software engineering, pp.104-113, 2005 https://doi.org/10.1145/1101908.1101926
  27. James A. Jones and Mary Jean Harrold. Test-Suite Reduction and Prioritization for Modified Condition/Decision Coverage. IEEE Transactions on Software Engineering, 29(3): 195-209, 2003 https://doi.org/10.1109/TSE.2003.1183927