引用本文:杨志斌,袁胜浩,谢健,周勇,陈哲,薛垒,Jean-Paul BODEVIX,Mamoun FILALI.一种同步语言多线程代码自动生成工具.软件学报,2019,30(7):1980-2002
【打印本页】   【下载PDF全文】   查看/发表评论  【EndNote】   【RefMan】   【BibTex】
←前一篇|后一篇→ 过刊浏览    高级检索
本文已被:浏览 4096次   下载 8231 本文二维码信息
码上扫一扫!
分享到: 微信 更多
一种同步语言多线程代码自动生成工具
杨志斌1,2, 袁胜浩1, 谢健1, 周勇1, 陈哲1, 薛垒3, Jean-Paul BODEVIX4, Mamoun FILALI4
1.南京航空航天大学 计算机科学与技术学院, 江苏 南京 211106;2.软件新技术与产业化协同创新中心, 江苏 南京 210093;3.上海航天电子技术研究所, 上海 201109;4.IRIT-University of Toulouse, Toulouse 31062, France
摘要:
随着安全关键系统对计算性能要求的日趋提高,能够提供更强计算能力而又减少电子设备的体积、重量和功耗的多核处理器将在安全关键领域得到广泛应用.同步语言能够表达确定性并发行为且具有精确时间语义等特性,适用于安全关键软件的建模和验证.目前,同步语言SIGNAL编译器主要支持串行代码生成,较少关注多线程代码生成.提出一种同步语言SIGNAL多线程代码生成工具.首先将SIGNAL程序转换为经过时钟演算的S-CGA中间程序;之后将S-CGA中间程序转换为时钟数据依赖图以分析依赖关系;然后对时钟数据依赖图进行拓扑排序划分,并针对划分结果提出优化算法和基于流水线方式的任务划分方法;最后将划分结果转换为虚拟多线程结构并进一步生成可执行多线程C/Java代码.通过在多核处理器上的实验,验证了所提方法的有效性.
关键词:  同步语言  同步多时钟卫式动作  多线程代码生成
DOI:10.13328/j.cnki.jos.005754
分类号:TP311
基金项目:国家自然科学基金(61502231);国家重点研发计划(2016YFB1000802);GF基础科研重点项目(JCKY2016203B011);江苏省自然科学基金(BK20150753);中央高校基本科研业务费专项资金(NP2017205);国家自然科学基金委员会-中国民航局民航联合研究基金(U1533130);南京航空航天大学研究生创新基地(实验室)开放基金(kfjj20181603)
Multi-threaded Code Generation Tool for Synchronous Language
YANG Zhi-Bin1,2, YUAN Sheng-Hao1, XIE Jian1, ZHOU Yong1, CHEN Zhe1, XUE Lei3, Jean-Paul BODEVIX4, Mamoun FILALI4
1.School of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics, Nanjing 211106, China;2.Collaborative Innovation Center of Novel Software Technology and Industrialization, Nanjing 210093, China;3.Shanghai Aerospace Electronic Technology Institute, Shanghai 201109, China;4.IRIT-University of Toulouse, Toulouse 31062, France
Abstract:
Multi-core processors are being widely used in safety-critical systems, due to the demands of higher computation performance when designing these systems, and strengths of multi-core processors, such as faster computation and SWaP (size, weight, and power) properties. Synchronous languages are suitable for modeling and verification of safety-critical software due to their abilities, e.g. the description of concurrency behaviors and precise timing semantics. At present, the SIGNAL compiler supports to generate the sequential code from synchronous specification. The existing studies pay a little attention to the generation of parallel code from SIGNAL specification. The paper presents a multi-threaded code generation tool for synchronous language. Firstly, the SIGNAL specification is transformed into the intermediate program S-CGA and is carried out the clock calculus. After that, the S-CGA program is transformed into CDDG (clock data dependency graph). Then, the CDDG is partitioned by topological sort, after which an optimized algorithm and a partition algorithm are respectively proposed based on pipeline-style. Finally, the partition results are transformed to VMT (virtual multi-threaded) code which is then transformed into executable multi-threaded C/Java program. The experiment running on multi-core CPUs is given to verify the effectiveness of the proposed methodology.
Key words:  synchronous language  synchronous clocked guarded action  multi-threaded code generation