1. Using static analysis to support variability implementation decisions in C++
- Author
-
Samer Al Masri, Xiaoli Liang, Matthew Gaudet, Robert W. Young, and Sarah Nadi
- Subjects
Source code ,Computer science ,business.industry ,media_common.quotation_subject ,020207 software engineering ,02 engineering and technology ,Static analysis ,computer.software_genre ,020204 information systems ,0202 electrical engineering, electronic engineering, information engineering ,Compiler ,Architecture ,Software engineering ,business ,computer ,Class hierarchy ,media_common ,Garbage collection ,Compile time - Abstract
Eclipse OMR is an open-source C++ framework for building robust language runtimes. The OMR toolkit includes a dynamic Just-In-Time (JIT) compiler, a garbage collector, a platform abstraction library, and a set of developer tooling capabilities. To support the diverse languages and architectures targeted by the framework, OMR's variability implementation uses a combination of build-system variability and static polymorphism. That is, all implementation classes that depend on the selected language and architecture are decided at compile time. However, OMR developers now realize that the current variability design decision, specifically the static polymorphism implementation, has its drawbacks. They are considering using dynamic polymorphism instead of static polymorphism. Before making such a fundamental design change, however, it is crucial to collect function information and overload/override statistics about the current variability in the code base.In this paper, we present OMRStatistics, a static analysis tool that we built for OMR developers to help them collect this information. Specifically, OMRStatistics (1) visualizes the class hierarchy from OMR's current static polymorphic implementation, (2) visualizes the function overloads and overrides with their respective locations in the source code, (3) collects important information about the classes and functions, and (4) stores all the collected information in a database for further analysis. Our tool OMRStatistics allows OMR developers to make better design decisions on which variability extension points should be switched from static polymorphism to dynamic polymorphism.
- Published
- 2018
- Full Text
- View/download PDF