Compiler version recognition is essential in the realm of computer tools, not only facilitating comprehension ofthe compilation process but also offering crucial guidance for optimization endeavors. This study delves into an exhaustive exploration of the distinctions among various versions of $\mathbf{C}++$ compilers in GCC when compiling specific program source code. The analysis aims to precisely pinpoint the compiler version being used. To achieve this, we compile the source code in Annex 1 using different versions of C++ compilers in GCC and meticulously scrutinize the differences in compilation outcomes, encompassing aspects such as instruction sequence, optimization strategy, and code structure. Leveraging techniques from software engineering like judgment analysis, disassembly, and static analysis, we identify the distinctive characteristics of the code generated by diverse compilers and highlight the key features that serve as significant discriminators between varying compiler versions. Taking a step further, we introduce a novel model for compiler version recognition that leverages deep learning methodologies. Through the collection of a substantial volume of code samples produced by different compiler versions and employing the decision tree model for training, our model demonstrates exceptional performance on both the training set and the test set. It excels in accurately discerning the code generated by distinct compiler versions.
Research on compiler version recognition based on random forest algorithm
23.10.2024
630740 byte
Aufsatz (Konferenz)
Elektronische Ressource
Englisch