Library usage analysis in the C++ codebase of Fedora Linux 37

dc.contributor.authorDeng, Jiachao
dc.contributor.supervisorAdams, Michael D.
dc.date.accessioned2024-11-06T21:52:27Z
dc.date.available2024-11-06T21:52:27Z
dc.date.issued2024
dc.degree.departmentDepartment of Electrical and Computer Engineering
dc.degree.levelMaster of Applied Science MASc
dc.description.abstractC++ source code analysis is conducted at scale. A framework is proposed for analyzing the C++ codebase of operating systems that employ the dnf package manager, such as Fedora Linux and Red Hat Enterprise Linux. The framework can run an arbitrary static analysis tool over software packages that contain C++ code from compatible operating systems. In order to evaluate the effectiveness of the framework and to better understand how the C++ language is used in practice, a C++ analysis tool is developed to study library usage with a fine level of granularity, considering instances of uses of types, type aliases, member/non-member functions, variables, and enumerators. Our framework, combined with the C++ library usage analysis tool, is used to analyze 2 379 software packages from the codebase of Fedora Linux 37. The number of packages analyzed is two to three orders of magnitude larger than that of previous C++ research. We applied our library usage analysis tool to nearly 400 million lines of C++ code across these packages. Leveraging the Clang compiler front-end libraries, our tool extracts information from correctly parsed C++ code, which is an improved approach compared to many existing studies. As a result, the tool provides an accurate collection of library usage instances from C++ software. Numerous observations are made regarding various aspects of library usage that can facilitate improved teaching of C++, aid in the refinement of C++ libraries, and help guide the future evolution of the C++ standard. For example, our analysis reveals that C++ programmers rarely use some C++ standard library algorithms designed for specialized purposes or combined operations. These algorithms often appear in less than 1% of all C++ software packages investigated. We suggest that the standard library exercise caution when adopting infrequently needed algorithms to maintain a streamlined interface. Such observations summarize current trends in C++ library usage and provide recommendations for improving the C++ language and its libraries.
dc.description.scholarlevelGraduate
dc.identifier.urihttps://hdl.handle.net/1828/20734
dc.languageEnglisheng
dc.language.isoen
dc.rightsAvailable to the World Wide Web
dc.subjectC++
dc.subjectLibrary usage
dc.subjectSource-code analysis
dc.subjectFedora Linux
dc.subjectDNF package manager
dc.subjectClang
dc.titleLibrary usage analysis in the C++ codebase of Fedora Linux 37
dc.typeThesis

Files

Original bundle
Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
jcdeng-thesis.pdf
Size:
588.6 KB
Format:
Adobe Portable Document Format
License bundle
Now showing 1 - 1 of 1
No Thumbnail Available
Name:
license.txt
Size:
1.62 KB
Format:
Item-specific license agreed upon to submission
Description: