According to the website of the Chinese Academy of Sciences, recently, the Software Engineering Technology Research and Development Center of the Institute of Software, Chinese Academy of Sciences has made research progress in dependency analysis and inference in Python program construction, and proposed knowledge-driven Python program dependency inference methods and tools to help developers Improve code reuse efficiency, reduce Python program construction and running errors caused by missing dependencies and incorrect dependency versions, and play a supporting role in improving application construction automation capabilities in the integration of development and operation.
According to reports, the Python language is widely used in scientific computing, etc., and developers often improve development efficiency through code reuse. However, the running environment of Python programs is complex and depends on Python packages, system libraries and specific versions of the Python interpreter. Lack of program dependencies or incompatible dependency versions can lead to program build failures and running errors.
To address this problem, the study proposes a knowledge-driven Python program dependency inference method, which includes two stages: knowledge graph construction and program dependency inference. In the knowledge graph construction stage, this method collects a large amount of multi-source heterogeneous data, extracts and fuses knowledge, and builds a Python domain knowledge graph. In the program dependency inference stage, the method is based on the domain knowledge graph and infers the multi-level dependencies of the target Python program through program analysis and constraint solving methods.
Based on the above methods, this research developed PyEGo: a knowledge-driven Python program dependency inference tool. Experimental results show that the dependency inference success rate of the PyEGo tool is 1.5-4.5 times that of existing methods, which greatly improves the accuracy and execution efficiency of program construction.
▲ Schematic diagram of Python program dependency analysis method
The above is the detailed content of Chinese Academy of Sciences Software Institute has made progress in building dependency analysis of Python programs: helping developers improve code reuse efficiency. For more information, please follow other related articles on the PHP Chinese website!