skip to main content
10.1145/3278186.3278188acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
research-article

Extending equivalence transformation based program generator for random testing of C compilers

Published:05 November 2018Publication History

ABSTRACT

This paper proposes a method of reinforcing random program generation for automated testing of C compilers. Although program generation based on equivalence transformation is a promising method for detecting deep bugs in compilers, the range of syntax it can cover has been narrower than the production rule based methods. While the conventional method based on equivalence transformation can only generate programs with scalar variables, assign statements, if and for statements, the proposed method attempts to extend them to handle arrays, structures, unions, as well as while and switch statements and function calls. A random test system, Orange4, extended with the proposed method has detected bugs in the latest development versions of GCC-8.0.0 and LLVM/Clang-6.0 which had been missed by the existing test methods.

References

  1. Free Software Foundation. {n. d.}. Installing GCC: Testing. Retrieved July 26, 2018 from http://gcc.gnu.org/install/test.htmlGoogle ScholarGoogle Scholar
  2. T. Fukumoto, K. Morimoto, and N. Ishiura. 2012. Accelerating regression test of compilers by test program merging. In in Proc. the Workshop on Synthesis And System Integration of Mixed Information Technologies (SASIMI 2012). 42–47.Google ScholarGoogle Scholar
  3. Plum Hall. {n. d.}. The Plum Hall Validation Suite for C. Retrieved July 26, 2018 from http://www.plumhall.com/stec.htmlGoogle ScholarGoogle Scholar
  4. A. Hashimoto and N. Ishiura. 2016. Detecting Arithmetic Optimization Opportunities for C Compilers by Randomly Generated Equivalent Programs. In IPSJ Trans. System LSI Design Methodology, Vol. 9. 21–29.Google ScholarGoogle ScholarCross RefCross Ref
  5. Y. Hibino, H. Ikeo, and N. Ishiura. 2017. CF3: Test Suite for Arithmetic Optimization of C Compilers (letter). In IEICE Transactions on Fundamentals of Electronics, Communications and Computer Sciences, Vol. E100-A. 1511–1512.Google ScholarGoogle Scholar
  6. M. Iwatsuji, A. Hashimoto, and N. Ishiura. 2016. Detecting Missed Arithmetic Optimization in C Compilers by Differential Random Testing (short paper). In in Proc. the Workshop on Synthesis And System Integration of Mixed Information Technologies (SASIMI 2016). 2–3.Google ScholarGoogle Scholar
  7. V. Le, C. Sun, and Z. Su. 2015. Finding Deep Compiler Bugs via Guided Stochastic Program Mutation. In Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2015). 386–399. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. V. Le, C. Sun, and Z. Su. 2015. Randomized Stress-Testing of Link-Time optimizers. In Proceedings of the 2015 International Symposium on Software Testing and Analysis (ISSTA 2015). 327–337. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. C. Lindig. 2005. Random testing of C calling conventions. In Proceedings of the sixth international symposium on Automated analysis-driven debugging (AADEBUG’05). 3–12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Eriko Nagai, Atsushi Hashimoto, and Nagisa Ishiura. 2014. Reinforcing Random Testing of Arithmetic Optimization of C Compilers by Scaling up Size and Number of Expressions. In IPSJ Transactions on System LSI Design Methodology, Vol. 7. 91–100.Google ScholarGoogle ScholarCross RefCross Ref
  11. Kazuhiro Nakamura and Nagisa Ishiura. 2016. Random Testing of C Compilers Based on Test Program Generation by Equivalence Transformation. In Proceedings of Asia and Pacific Conference on Circuits and Systems (APCCAS2016). 676–679.Google ScholarGoogle ScholarCross RefCross Ref
  12. J. Regehr, Y. Chen, P. Cuoq, E. Eide, C. Ellison, and X. Yang. 2012. Test-Case Reduction for C Compiler Bugs. In Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2012). 335–346. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. C. Sun, V. Le, and Z. Su. 2016. Finding compiler bugs via live code mutation. In Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2016). 849–863. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Extending equivalence transformation based program generator for random testing of C compilers

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          A-TEST 2018: Proceedings of the 9th ACM SIGSOFT International Workshop on Automating TEST Case Design, Selection, and Evaluation
          November 2018
          66 pages
          ISBN:9781450360531
          DOI:10.1145/3278186

          Copyright © 2018 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 5 November 2018

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

          Upcoming Conference

          FSE '24

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader