Automatic code generation method based on Esterel
-
摘要: 嵌入式系统开发与传统软件开发有着很大不同.嵌入式系统具有内核小、专用性强、高时效性、高可靠性、目标平台复杂等特点,这就对系统设计者提出更高的要求.面对目前嵌入式系统开发过程中的这些问题,尤其针对开发过程复杂,程序自动化程度不高等问题,提出一种基于Esterel代码自动生成的方法.该方法主要利用Esterel语言来对目标系统进行建模,实现将同一个Esterel模型编译为多个目标平台的代码.通过操作系统(OS)抽象层的设计,使系统开发人员不用关心目标平台相关的实现细节,更加容易进行多目标平台程序设计,从而实现嵌入式系统的程序设计自动化.通过实验表明,Esterel模型可以正确、高效地编译为多目标平台的代码,实现目标平台代码的自动生成.Abstract: Embedded systems development is much different from the traditional software development. Embedded system has the characteristics of small kernel, strong specificity, high reliability, high timeliness and complex target platforms, such that it requires higher designing criteria. Considering these problems existed in development process of embedded system, an automatic code generation method based on Esterel was proposed especially aiming at problems of complex development process, low-level automation of system, etc. The method employed the Esterel language to construct the target system that can be compiled to codes for multiple target platforms. Based on the design of operating system (OS) abstract layer, developers did not need to care about the implementation details for target platforms, which made it easier for the design of multiple target platforms, and achieved the automatic program design of embedded system. The experiments illustrate that the Esterel model can be compiled to codes correctly and efficiently for multiple target platforms, which implement the automatic code generation for target platforms.
-
Key words:
- Esterel /
- automatic code generation /
- embedded system /
- multiple platform /
- abstract layer
-
[1] Wagner F,Schmuki R,Wolstenholme P,et al.Modeling software with finite state machines:a practical approach[M].Boca Raton:Auerbach Publications,2006:123-144. [2] Samek M. Practical UML statecharts in C/C++ event-driven programming for embedded systems[M].Burlington:Newnes,2008:3-52. [3] Wasowski A. On efficient program synthesis from statecharts[C]// ACM SIGPLAN Conference on Languages,Compilers,and Tools for Embedded Systems.New York:ACM,2003:163-170. [4] Krüger I H,Mathew R,Meisinger M,et al.From scenarios to aspects:exploring product lines[C]//Proceeding of the 4th International Workshop on Scenarios and State Machines:Models,Algorithms and Tools.New York:ACM,2005:1083188. [5] Krüger I H,Mathew R,Meisinger M.Efficient exploration of service-oriented architectures using aspects[C]//Proceeding of the 28th International Conference on Software Engineering.Piscataway,NJ:IEEE Press,2006:62-71. [6] Maoz S,Harel D,Kleinbort A.A compiler for multimodal scenarios:transforming LSCs into aspectJ[J].ACM Transactions on Software Engineering and Methodology,2011,20(4):1757-1770. [7] Maoz S,Harel D.From multi-modal scenarios to code:compiling LSCs into aspectJ[C]//Proceedings of the 14th ACM SIGSOFT International Symposium on Foundations of Software Engineering.New York:ACM,2006:219-230. [8] Caspi P,Pilaud D,Halbwachs N,et al.LUSTRE:a declarative language for programming synchronous systems[C]//14th Symposium on Principles of Programming Languages(POPL'87).New York:ACM,1987:178-188. [9] Berry G,Gonthier G.The Esterel synchronous programming language:design,semantics,implementation[J].Science of Computer Programming,1992,19(2):87-152. [10] Hanxleden R V. SyncCharts in C:a proposal for light-weight,deterministic concurrency[C]//Proceedings of the 7th ACM International Conference on Embedded Software.New York:ACM,2009:225-234. [11] Han G,Natale M D,Zeng H,et al.Optimizing the implementation of real-time Simulink models onto distributed automotive architectures[J].Journal of Systems Architecture,2013,59(10): 1115-1127. [12] Edwards S A. Compiling Esterel into sequential code[C]//Proceedings of the 37th Annual Design Automation Conference.New York:ACM,2000:322-327. [13] Prochnow S,Traulsen C,Hanxleden R V.Synthesizing safe state machines from Esterel[J].ACM SIGPLAN Notices,2006,41(7): 113-124. [14] Halbwachs N,Raymond P,Ratel C.Generating efficient code from data-flow programs[J].Lecture Notes in Computer Science,1991,528(10):207-218. [15] Gérard A,Guatto A,Pasteur C,et al.A modular memory optimization for synchronous data-flow languages:application to arrays in a lustre compiler[C]//Proceedings of the 13th ACM SIGPLAN/SIGBED International Conference on Languages,Compilers,Tools and Theory for Embedded Systems.New York:ACM,2012:51-60. [16] Biernacki D,Colao J,Hamon G,et al.Clock-directed modular code generation for synchronous data-flow languages[J].ACM SIGPLAN Notices,2008,43(7):121-130. [17] 王友瑞,石伟,王志英,等.基于同步EDA工具的异步电路设计流程[J].计算机研究与发展,2012,49(9):2027-2035. Wang Y R,Shi W,Wang Z Y,et al.A novel flow for asynchronous circuit design using synchronous EDA tools[J].Journal of Computer Research and Development,2012,49(9):2027-2035(in Chinese). [18] 吴建国,刘明业,孙元.VHDL语言中断言语句及其综合方法研究[J].计算机学报,1998,21(10):929-932. Wu J G,Liu M Y,Sun Y.Research on assert statement in VHDL and its synthesis methods[J].Chinese Journal of Computers,1998,21(10):929-932(in Chinese). [19] 孙熙,庄磊,刘文,等.一种可定制的自主构件运行支撑框架[J].软件学报,2008,19(6):1340-1349. Sun X,Zhuang L,Liu W,et al.A customizable running support framework for autonomous components[J].Journal of Software,2008,19(6):1340-1349(in Chinese). [20] 接钧靖,史庭训,焦文品,等.自主构件自适应策略的在线定制及动态评估[J].软件学报,2012,23(4):802-815. Jie J J,Shi T X,Jiao W P,et al.Autonomous components whose adaptation policies can be customized online and evaluated dynamically[J].Journal of Software,2012,23(4):802-815(in Chinese). [21] 刘静,何积丰,缪淮扣.模型驱动架构中模型构造与集成策略[J].软件学报,2006,17(6):1411-1422. Liu J,He J F,Miao H K.Strategy for model construction and integration in MDA[J].Journal of Software,2006,17(6):1411-1422(in Chinese). [22] 丁博,王怀民,史殿习,等.一种支持软件可信演化的构件模型[J].软件学报,2011,22(1):17-27. Ding B,Wang H M,Shi D X,et al.Component model supporting trustworthiness-oriented software evolution[J].Journal of Software,2011,22(1):17-27(in Chinese). [23] 许静,司冠南,杨巨峰,等.一个网构软件可信实体模型及基于评估的信任度量[J].中国科学:信息科学,2013,43(1): 108-125. Xu J,Si G N,Yang J F,et al.An internetware dependable entity model and trust measurement based on evaluation[J].Scientia Sinica:Informationis,2013,43(1):108-123(in Chinese). [24] 焦莉,陆维明. 基于共享位置的Petri网系统综合与保性[J].计算机学报,2007,30(3):352-360. Jiao L,Lu W M.Synthesis and property-preservation of Petri net systems based on shared places[J].Chinese Journal of Computers,2007,30(3):352-360(in Chinese). [25] 胡军,于笑丰,张岩,等.基于场景规约的构件式系统设计分析与验证[J].计算机学报,2006,29(4):513-525. Hu J,Yu X F,Zhang Y,et al.Checking component-based designs for scenario-based specifications[J].Chinese Journal of Computers,2006,29(4):513-525(in Chinese). [26] 初佃辉,孟凡超,战德臣,等.基于有限自动机的多层次构件行为匹配模型[J].软件学报,2011,22(11):2668-2683. Chu D H,Meng F C,Zhan D C,et al.Multi-level component behavior matching model based on finite automata[J].Journal of Software,2011,22(11):2668-2683(in Chinese).
点击查看大图
计量
- 文章访问数: 905
- HTML全文浏览量: 102
- PDF下载量: 621
- 被引次数: 0