Font Size: a A A

An Empirical Study Of The Key C++ Language Features Based On Open-source Software

Posted on:2017-04-26Degree:DoctorType:Dissertation
Country:ChinaCandidate:D WuFull Text:PDF
GTID:1108330485965710Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
An increasing number of open-source software provides abundant experimental resource for language researchers. It has become an important way to understand the use trend of programming languages by quantitatively analyzing the open-source software with techniques such as software measurement, data mining, and statistical analysis.C++ is one of the most important programming languages, which is widely used to develop large-scale and complex open-source software systems. However, little has been done on C++ emprical research. In other words, there are few researchers who conduct quantitative experiments to understand the actual use of C++ in the process of software development, making it difficult for people to compare C++ with other languages in terms of their programming methods, programming efficiency, and software quality. Moreover, without empirical data, people cannot understand the use trend and the common problems of C++ language features.In other to fill this gap, we perform an in-depth empirical study to investigate the actual use of C++ language features in open-source software. To be specific, we first employ program understanding tools to analyze the open-source code, and get semantic information of target programs. Then, we use software metric techniques to quantize the semantic information. Finally, we perform quantitative analysis on the experimental data and get statistical results. Based on the empirical results, we not only compare C++ with Java/C# in terms of their object-oriented features, but also uncover many interesting findings about templates, concurrency constructs, and standard libraries. To be specific, this paper contains the following parts:(1) To compare the object-oriented features of C++, C#, and Java, we use 23 object-oriented metrics to investigate 78 groups of open-source programs. The experimental result shows the difference among the three languages in terms of their class size, complexity, coupling, cohesion, inheritance, encapsulation, polymorphism, and reusability. The findings of this study give empirical evidence to evaluate the object-oriented features of C++.(2) To understand the implementation of C++ generic programs, we quantitatively analyze the the use of new template features, the use of STL, the developers’ embracement of templates, and the benefit of templates. By analyzing the software data of 50 open-source software systems, comprising 570 million lines of C++ code, we uncover the main problems of template usage, including the misuses of new template features, the overuse of user-defined templates and generic function-like macros. The empirical findings are helpful for understanding the actual use templates and they give actionable information for programmers to use templates in an efficient way.(3) To know the implementation of C++ concurrent programs, we quantitatively investigate the usage of concurrency constructs, the management of synchronization, the relationship between standard concurrency constructs and third-party concurrency constructs, and the factors affecting the use concurrency constructs. By analyzing 492 concurrent software systems, comprising 131 million lines of C++ code, we find the common patterns and problems of the practical use of concurrency constructs, including the misuse of promise objects, the lack of exception handlers in concurrent code, and the deficiency of thread-safe data structures. Based on the empirical results, we give salutary suggestions for language designers, language learners, and developers to help them design, understand, and use concurrency constructs.(4) To examine the the influence of C++ libraries on software development, we make an investigation into the use of the C++ Standard Library. By analyzing 30 open-source software systems, including 379 historical revisions and 150 million lines of C++ code, we find out the most commonly used C++ library, the difference between new libraries and traditional libraries, the tendency of the use of deprecated libraries, and the factors that affect the use of C++ libraries. Based on the experimental result, we uncover the the common patterns and problems with respect to the use of standard library, such as the underuse of new library components and the overuse of deprecated library components. The findings of this study are helpful for programmers to understand and use C++ libraries.
Keywords/Search Tags:C++, Programming Language, Empirical Study, Open-source Software, Object-oriented Programming, Generic Programming, concurrent Programming, Language Library
PDF Full Text Request
Related items