Title :
Design and Implementation of an Automatic RTPA Code Generator
Author :
Tan, Xinming ; Wang, Yingxu ; Ngolah, Cyprian F.
Author_Institution :
Dept. of Electr. & Comput. Eng., Calgary Univ., Alta.
Abstract :
Real-time process algebra (RTPA) is a mathematics-based notation system for the specification and refinement of realtime and safety-critical systems. This paper presents the work on designing and developing a set of tools that facilitate automatic generation of C++ code from RTPA specifications of system architectures and behaviors. A two-phrase strategy has been employed in the design of the toolkit. In the first phrase, an RTPA specification is lexically and syntactically analyzed and type-checked, which results in a set of abstract syntax trees. In the second phrase, C++ code is generated using the RTPA-to-C++ mapping strategies and patterns when walking down the abstract syntax trees. The RTPA-to-C++ mapping strategies specify both the traditional sequential part of RTPA mapping onto the standard C++ library and the real-time features of RTPA, such as interrupt, concurrency, duration, and event/time-driven dispatch, mapping onto the RTPA run-time library, which provides real-time support and is implemented using real-time kernel techniques. The toolkit implemented includes an RTPA lexer, an RTPA parser, an RTPA type-checker, and an RTPA code-generator. The experimental results show that RTPA specifications can be rigorously checked and corresponding C++ code can be automatically generated from RTPA specifications using the toolkit. The automatically generated code is executable and effective under the support of the standard C++ library and the specially developed RTPA run-time library
Keywords :
C++ language; formal specification; grammars; process algebra; program compilers; programming language semantics; real-time systems; software libraries; software tools; trees (mathematics); C++ code generation; RTPA lexer; RTPA parser; RTPA run-time library; RTPA specifications; RTPA type-checker; RTPA-to-C++ mapping strategies; abstract syntax trees; automatic RTPA code generator; mathematics-based notation system; real-time process algebra; safety-critical systems; standard C++ library; system architectures; two-phrase strategy; Algebra; Code standards; Concurrent computing; Kernel; Legged locomotion; Real time systems; Runtime library; Software engineering; Software libraries; Standards development; RTPA; Software engineering; code generator; descriptive mathematics; formal methods;
Conference_Titel :
Electrical and Computer Engineering, 2006. CCECE '06. Canadian Conference on
Conference_Location :
Ottawa, Ont.
Print_ISBN :
1-4244-0038-4
Electronic_ISBN :
1-4244-0038-4
DOI :
10.1109/CCECE.2006.277743