Towards eCos Autoconfiguration by Static Application Analysis

System software product lines such as the embedded real-time operating system eCos are a state-of-the-art solution for application scenarios with a very low hardware resource profile. Being highly configurable at compile time, eCos can be tailored to the application in terms of inclusion or exclusion of fine-grained operating system features. The mandatory manual feature selection is carried out by the developer who knows the functionality essential for the application. This process requires profound knowledge of the feature semantics, is very time-consuming, and, in particular, error-prone - most probably resulting in a resource suboptimal or even dysfunctional operating system variant. The contribution of this article is an approach to automate the eCos configuration process to a major degree, therefore reducing the outlined disadvantages significantly. A thorough examination of configurable eCos features exhibits four feature categories of varying complexity: By applying standard model checking tech- niques and static analysis of the application source code, we show that for at least two feature categories the configuration decisions can be taken automatically. Complementing the approach with configlets - highly eCos specific analysis code - a third category is shown to be also coverable. Index Terms—eCos, Automatic Configuration, Static Analysis, Model Checking, CTL, Software Product Lines Afterwards, an automated product generation process results in an OS library the application can be linked against. This state-of-the-art procedure has proven to be very effective in practice, but also entails a non-negligible problem: In the case of eCos, the sheer number of more than 1.500 configurable features 2 makes the configuration process extremely complex and time-consuming. Our contribution to the automated configuration and tailoring community is an approach to at least partially automate the process by applying standard static analysis and model checking techniques to application source code. We conducted a detailed examination of parts of the eCos 3.0 OS documentation and API in order to determine which conditions hold within an application model if it needs or does not need certain OS features. These conditions, still formulated in plain English, pose a set of requirements for static analysis and model checking. First experiments with our analysis tool prototype seem promising, but also raise new research questions. The remainder of this paper is structured as follows: Section II gives a more detailed overview of the motivating context and our approach. Section III describes our manual examination of eCos features and examples for the resulting feature categories. Section IV outlines the steps necessary for automatic feature need derivation: application analysis, model checking, and result interpretation. Section V revisits the results from the manual feature examination, and summarizes the current state of our analysis tool prototype and preliminary results with eCos test programs. We conclude with a discussion of related work, a summary and an outlook on future work in sections VI and VII.