Lei Xu
Current Organizations / Institutes
The organizations/institutes from the scholar's latest article
Previous Organizations / Institutes
The organizations / institutes from the scholar's other articles in the past ten years
Research Subjects
Lei Xu has a total of 39 co-authors. Here are the top co-authors by number of shared publications:
- Baowen Xu
Nanjing University, Nanjing, China
5 shared publications - Qiang Zhang
Department of Computer Science and Technology, State Key Laboratory for Novel Software Technology Nanjing University Nanjing Jiangsu China
3 shared publications Hang Zhou
Nanjing University
2 shared publicationsXiaojin Liu
Department of Computer Science and Technology, Nanjing University, Nanjing, China
2 shared publicationsXincheng He
Nanjing University
2 shared publications- Xincheng He
Jiangnan University, School of Artificial Intelligence and Computer Science/School of Software, Wuxi, China
2 shared publications
Latest Publications
- Open Access
- 7 October 2026
- Published by Association for Computing Machinery (ACM)
- p. 2997-3009
HyBinMAS: LLM-Powered Hybrid Analysis for Function Name Recovery of Stripped Binaries
- 7 October 2026
- Published by Association for Computing Machinery (ACM)
- p. 2997-3009
Open AccessHyBinMAS: LLM-Powered Hybrid Analysis for Function Name Recovery of Stripped Binaries
- Open Access
- 5 February 2026
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
From Stochastic to Semantic: Advanced Attribute-Guided Compiler Testing
Compiler testing is critically important, as compilers serve as the foundational infrastructure in system software development. A comprehensive exploration of the compilation space is essential for uncovering bugs in compilers. Existing methods primarily involve the utilization of various compilation options alongside test programs as inputs for stress-testing compilers. However, these compilation options are typically applied uniformly across all program elements-such as functions and variables, by default, limiting the ability to thoroughly explore the compilation space. In programming languages like C and C++, attributes such as the __attribute__((always_inline)) directive provide a mechanism for programmers to specify additional information for specific code elements to the compiler. These attributes allow for precise control over the compilation process, such as enforcing constraints and customizing optimization passes for particular elements. This flexibility in specifying attributes offers opportunities to investigate previously unexamined areas within compilers. Unfortunately, few studies have leveraged attributes for compiler testing. To this end, we propose Atlas, an attribute-guided approach that strategically inserts attributes into test programs to facilitate a more thorough exploration of the compilation space. Our key insight is that attributes specified for individual program elements can provide a more flexible means of exploring the compilation space. Our extensive experiments on GCC and LLVM demonstrate the superiority of Atlas over baseline testing techniques that do not employ attributes, particularly in terms of bug detection and code coverage. Furthermore, Atlas has led to the discovery of 97 unique bugs in GCC and LLVM, 73 of which have already been confirmed or fixed, showcasing its practical utility
- 5 February 2026
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
Open AccessFrom Stochastic to Semantic: Advanced Attribute-Guided Compiler Testing
Compiler testing is critically important, as compilers serve as the foundational infrastructure in system software development. A comprehensive exploration of the compilation space is essential for uncovering bugs in compilers. Existing methods primarily involve the utilization of various compilation options alongside test programs as inputs for stress-testing compilers. However, these compilation options are typically applied uniformly across all program elements-such as functions and variables, by default, limiting the ability to thoroughly explore the compilation space. In programming languages like C and C++, attributes such as the __attribute__((always_inline)) directive provide a mechanism for programmers to specify additional information for specific code elements to the compiler. These attributes allow for precise control over the compilation process, such as enforcing constraints and customizing optimization passes for particular elements. This flexibility in specifying attributes offers opportunities to investigate previously unexamined areas within compilers. Unfortunately, few studies have leveraged attributes for compiler testing. To this end, we propose Atlas, an attribute-guided approach that strategically inserts attributes into test programs to facilitate a more thorough exploration of the compilation space. Our key insight is that attributes specified for individual program elements can provide a more flexible means of exploring the compilation space. Our extensive experiments on GCC and LLVM demonstrate the superiority of Atlas over baseline testing techniques that do not employ attributes, particularly in terms of bug detection and code coverage. Furthermore, Atlas has led to the discovery of 97 unique bugs in GCC and LLVM, 73 of which have already been confirmed or fixed, showcasing its practical utility
- 5 September 2023
- Published by Wiley in Software: Practice and Experience
- Vol. 54 (2) , 225-256
Python meets JIT compilers: A simple implementation and a comparative evaluation
- 5 September 2023
- Published by Wiley in Software: Practice and Experience
- Vol. 54 (2) , 225-256
Python meets JIT compilers: A simple implementation and a comparative evaluation
- 7 August 2023
- Published by World Scientific Pub Co Pte Ltd in International Journal of Software Engineering and Knowledge Engineering
- Vol. 33 (10) , 1567-1597
Python API Misuse Mining and Classification Based on Hybrid Analysis and Attention Mechanism
APIs play a crucial role in contemporary software development, streamlining implementation and maintenance processes. However, improper API usage can result in significant issues such as unexpected outcomes, security vulnerabilities and system crashes. To detect API misuses, current methods primarily rely on comparing established API usage patterns with target points for automated detection, mainly based on pre-validated datasets. Nonetheless, there is a scarcity of publicly available datasets on API misuses and their corresponding fixes, which hinders data-driven research. Moreover, most existing techniques concentrate on statically typed languages, such as Java and C, with only a few addressing dynamic languages like Python effectively, due to difficulties in handling dynamic features. Therefore, it is essential to identify Python API misuses and their fixes automatically and promptly. In this paper, we introduce HatPAM, a Hybrid Analysis and Attention-based Python API-Misuse Miner, which (a) provides a method for automatically mining true-positive commits related to Python API-misuse fixes from GitHub and (b) presents the subsequent processing for classifying Python API misuses in true-positive cases. Particularly, HatPAM applies hybrid static analysis and introduces a structure-based attention mechanism to examine syntax, semantics and structural features in Python code context, and considers the consistency between code and developers’ natural intent to significantly reduce false-positive cases. Evaluation on six popular Python projects reveals that HatPAM outperforms various state-of-the-art baselines, achieving up to 92.2% Precision, 86.7% Recall and 89.3% F1-score, indicating its capability to identify and classify Python API-misuse commits.
- 7 August 2023
- Published by World Scientific Pub Co Pte Ltd in International Journal of Software Engineering and Knowledge Engineering
- Vol. 33 (10) , 1567-1597
Python API Misuse Mining and Classification Based on Hybrid Analysis and Attention Mechanism
APIs play a crucial role in contemporary software development, streamlining implementation and maintenance processes. However, improper API usage can result in significant issues such as unexpected outcomes, security vulnerabilities and system crashes. To detect API misuses, current methods primarily rely on comparing established API usage patterns with target points for automated detection, mainly based on pre-validated datasets. Nonetheless, there is a scarcity of publicly available datasets on API misuses and their corresponding fixes, which hinders data-driven research. Moreover, most existing techniques concentrate on statically typed languages, such as Java and C, with only a few addressing dynamic languages like Python effectively, due to difficulties in handling dynamic features. Therefore, it is essential to identify Python API misuses and their fixes automatically and promptly. In this paper, we introduce HatPAM, a Hybrid Analysis and Attention-based Python API-Misuse Miner, which (a) provides a method for automatically mining true-positive commits related to Python API-misuse fixes from GitHub and (b) presents the subsequent processing for classifying Python API misuses in true-positive cases. Particularly, HatPAM applies hybrid static analysis and introduces a structure-based attention mechanism to examine syntax, semantics and structural features in Python code context, and considers the consistency between code and developers’ natural intent to significantly reduce false-positive cases. Evaluation on six popular Python projects reveals that HatPAM outperforms various state-of-the-art baselines, achieving up to 92.2% Precision, 86.7% Recall and 89.3% F1-score, indicating its capability to identify and classify Python API-misuse commits.
- Open Access
- 16 December 2022
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Architecture and Code Optimization
- Vol. 20 (1) , 1-25
RegCPython: A Register-based Python Interpreter for Better Performance
Interpreters are widely used in the implementation of many programming languages, such as Python, Perl, and Java. Even though various JIT compilers emerge in an endless stream, interpretation efficiency still plays a critical role in program performance. Does a stack-based interpreter or a register-based interpreter perform better? The pros and cons of the pair of architectures have long been discussed. The stack architecture is attractive for its concise model and compact bytecode, but our study finds that the register-based interpreter can also be implemented easily and that its bytecode size only grows by a small margin. Moreover, the latter turns out to be appreciably faster. Specifically, we implemented an open source Python interpreter named RegCPython based on CPython v3.10.1. The former is register based, while the latter is stack based. Without changes in syntax, Application Programming Interface, and Application Binary Interface, RegCPython is excellently compatible with CPython, as it does not break existing syntax or interfaces. It achieves a speedup of 1.287 on the most favorable benchmark and 0.977 even on the most unfavorable benchmark. For all Python-intensive benchmarks, the average speedup reaches 1.120 on x86 and 1.130 on ARM. Our evaluation work, which also serves as an empirical study, provides a detailed performance survey of both interpreters on modern hardware. It points out that the register-based interpreters are more efficient mainly due to the elimination of machine instructions needed, while changes in branch mispredictions and cache misses have a limited impact on performance. Additionally, it confirms that the register-based implementation is also satisfactory in terms of memory footprint, compilation cost, and implementation complexity.
- 16 December 2022
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Architecture and Code Optimization
- Vol. 20 (1) , 1-25
Open AccessRegCPython: A Register-based Python Interpreter for Better Performance
Interpreters are widely used in the implementation of many programming languages, such as Python, Perl, and Java. Even though various JIT compilers emerge in an endless stream, interpretation efficiency still plays a critical role in program performance. Does a stack-based interpreter or a register-based interpreter perform better? The pros and cons of the pair of architectures have long been discussed. The stack architecture is attractive for its concise model and compact bytecode, but our study finds that the register-based interpreter can also be implemented easily and that its bytecode size only grows by a small margin. Moreover, the latter turns out to be appreciably faster. Specifically, we implemented an open source Python interpreter named RegCPython based on CPython v3.10.1. The former is register based, while the latter is stack based. Without changes in syntax, Application Programming Interface, and Application Binary Interface, RegCPython is excellently compatible with CPython, as it does not break existing syntax or interfaces. It achieves a speedup of 1.287 on the most favorable benchmark and 0.977 even on the most unfavorable benchmark. For all Python-intensive benchmarks, the average speedup reaches 1.120 on x86 and 1.130 on ARM. Our evaluation work, which also serves as an empirical study, provides a detailed performance survey of both interpreters on modern hardware. It points out that the register-based interpreters are more efficient mainly due to the elimination of machine instructions needed, while changes in branch mispredictions and cache misses have a limited impact on performance. Additionally, it confirms that the register-based implementation is also satisfactory in terms of memory footprint, compilation cost, and implementation complexity.
- 1 March 2022
- Published by Elsevier in Science of Computer Programming
- Vol. 215, 102759
Quantifying the interpretation overhead of Python
- 1 March 2022
- Published by Elsevier in Science of Computer Programming
- Vol. 215, 102759
Quantifying the interpretation overhead of Python
- 16 September 2019
- Published by Springer Nature
- p. 690-703
Mining Core Contributors in Open-Source Projects
- 16 September 2019
- Published by Springer Nature
- p. 690-703
Mining Core Contributors in Open-Source Projects
- 16 September 2019
- Published by Springer Nature
- p. 239-250
Semantic Web Service Discovery Based on LDA Clustering
- 16 September 2019
- Published by Springer Nature
- p. 239-250
Semantic Web Service Discovery Based on LDA Clustering
- 16 September 2019
- Published by Springer Nature
- p. 638-643
Transferring Java Comments Based on Program Static Analysis
- 16 September 2019
- Published by Springer Nature
- p. 638-643
Transferring Java Comments Based on Program Static Analysis