Return to search

Toward C++ as a Platform for Language-Oriented Programming: On the Embedding of a Model-Based Real-Time Language

Cyber-physical systems are dynamic physical systems that are controlled by computers for their safe and sound operations (e.g., cars, satellites, robots, elevators, and many others). Consequently, the programs running cyber-physical systems have real-time requirements, which require the programs to compute not only correctly but also timely because dynamic physical systems need to move to correct positions within certain duration to ensure safe and sound operations. To satisfy real-time requirements in better ways, many real-time languages have been proposed in the literature. Nevertheless, the general-purpose non-real-time languages C and C++ have remained the de facto languages to program cyber-physical systems, including Mars rovers and F-35 jet fighters. Given this reality, the better ways to satisfy real-time requirements have been the use of model-based tools (e.g., MATLAB/Simulink) that allow cyber-physical systems to be designed by modeling and simulating them and the resulting models to be translated automatically to C programs. Model-based tools, however, leave the resulting C programs for manual integration with other C/C++ programs, such as legacy/third-party device drivers and libraries. Since manual integration could slip in some inconsistencies, which proved fatal in the maiden flight of Ariane-5 rocket, this work shows how the standard features of C++, which support active libraries, can be used to embed a model-based real-time language, called Tice, as a C++ active library that can be used to declaratively express models of real-time systems that are processable by off-the-shelf standard C++ compilers (e.g., GCC and Clang) that automatically not only translate the models into C/C++ programs but also check both the validity of the models and the consistency of the models with other C/C++ programs. Furthermore, being compilable by off-the-shelf standard C++ compilers also sets Tice apart from other real-time languages already proposed in the literature because the other languages require either their own special compilers/interpreters or non-standard C/C++ compilers. Consequently, while Tice itself either uses no C++ features that are unsuitable for cyber-physical systems (e.g., exception) or uses some in judicious manner (e.g., template instantiations to generate programs), Tice prevents no usage that is permitted by standard C++ compilers. Beside that, as C++ active libraries are indeed ordinary C++ libraries, C++ active libraries are seamlessly composable as ordinary C++ libraries, and therefore, as models play an increasingly important role in software engineering, this work shows the potential of C++ as a platform for language-oriented programming where different languages that express different kinds of models and are embedded as C++ active libraries could be composed seamlessly.

Identiferoai:union.ndltd.org:unitn.it/oai:iris.unitn.it:11572/256168
Date31 March 2020
CreatorsPrastowo, Tadeus
ContributorsPrastowo, Tadeus, Palopoli, Luigi
PublisherUniversità degli studi di Trento, place:Trento
Source SetsUniversità di Trento
LanguageEnglish
Detected LanguageEnglish
Typeinfo:eu-repo/semantics/doctoralThesis
Rightsinfo:eu-repo/semantics/openAccess
Relationfirstpage:1, lastpage:75, numberofpages:75

Page generated in 0.0019 seconds