期刊文献+

基于分支标记的数据流模型的代码生成方法 被引量:2

Code Generation Method of Data Flow Model Based on Branch Marking
下载PDF
导出
摘要 模型驱动开发以其低错误率、易仿真、易验证的特点,在嵌入式软件开发中被广泛应用.近年来,基于模型的嵌入式软件开发方法及相应工具也在逐渐发展和完善.数据流模型是各种建模工具中使用最为频繁的语义模型,然而,各种工具对于数据流模型的代码生成能力却参差不齐,特别是对于数据分支组件的支持,当前主流的建模工具都采用各种方式来回避复杂的分支建模及对应的代码生成.但是,分支建模是非常重要的,使用分支组件可以更清晰地表现出数据流的数据传递逻辑.为了解决复杂分支建模带来的代码生成难题,针对具有复杂分支组合的数据流模型.提出了一种基于分支调度标记的代码生成方法.在所提出的算法中,首先通过拓扑排序确定模型的调度顺序,再根据不同分支的影响对组件进行分支标记;之后,根据组件的分支标记构造一个基于控制流的代码生成位置表;最后,即可根据代码生成位置表进行各种主流语言的代码生成.通过构造4个具有复杂分支的数据流模型实例进行代码生成,并在生成代码行数和运行时间等方面与Simulink和Ptolemy进行对比,进一步说明该代码生成方法在复杂分支组合情况下的通用性以及所做工作的价值和意义. Model-driven development is widely used in embedded software development because it has a low error rate while it is easy to simulate and verify.In recent years,model-based embedded software development methods and their corresponding tools are also gradually developing and improving.Data flow model is the most frequently used semantic model among all kinds of modeling tools.Nonetheless,the code generation ability of various tools for data flow model is uneven,especially for the branching actors.It is well known that current mainstream modeling tools adopt various ways to avoid complex branch modeling and the generation of its corresponding code.However,branch modeling is very important,and it makes the data transfer logic of the data flow more clearly by using branch actors.In order to solve the problem of code generation caused by complex branch modeling,this study proposed a code generation method based on branch schedule marking for data flow model aimed at complex branch combinations.As for the algorithm proposed in this study,firstly,the scheduling order of the model was determined by topological sorting.Secondly,a code generation location table based on control flow was constructed according to the branch marks which marked by the influence of different branches.Finally,code generation of various mainstream languages could be carried out in terms of the code generation location table.By constructing four instances of data flow models with complex branches for code generation and comparing them with Simulink and Ptolemy in terms of lines of code generation and elapsed time,this study further illustrates the universality of proposed code generation methods in complex branch combinations and the value and significance of this work.
作者 苏卓 王东艳 杨镒箫 张明睿 姜宇 孙家广 SU Zhuo;WANG Dong-Yan;YANG Yi-Xiao;ZHANG Ming-Rui;JIANG Yu;SUN Jia-Guang(School of Software,Tsinghua University,Beijing 100084,China;Key Laboratory for Information System Security,Ministry of Education(Tsinghua University),Beijing 100084,China;School of Electronics Engineering and Computer Science,Peking University,Beijing 100871,China)
出处 《软件学报》 EI CSCD 北大核心 2021年第6期1647-1662,共16页 Journal of Software
基金 国家自然科学基金(62022046,U1911401,61802223) 科技部重点研发计划(2019YFB1706200) 华为清华可信研究项目(20192000794)。
关键词 模型驱动开发 数据流 代码生成 分支 嵌入式系统 model-driven development data flow code generation branch embedded system
  • 相关文献

参考文献2

二级参考文献93

  • 1Fersman E,Pettersson P,Wang Y.Timed automata with asynchronous processes:Schedulability and decidability.In:Proc.of the TACAS 2002.Berlin:Springer-Verlag,2002.67-82.
  • 2Harbour MG,García JJG,Gutiérrez JCP,Moyano JMD.MAST:Modeling and analysis suite for real-time applications.In:Proc.of the 13th Euromicro Conf.on Real-Time Systems.Washington:IEEE Computer Society Press,2001.125-134.
  • 3Jürjens J.Towards development of secure systems using UMLsec.In:Proc.of the 4th Int'l Conf.on Fundamental Approaches to Software Engineering.London:Springer-Verlag,2001.187-200.
  • 4Bodeveix JP,Cavallero R,Chemouil D,Filali M,Rolland JF.A mapping from AADL to Java-RTSJ.In:Proc.of the 5th Int'l Workshop on Java Technologies for Real-Time and Embedded Systems.New York:ACM Press,2007.165-174.
  • 5Jahier E,Halbwachs N,Raymond P,Nicollin X,Lesens D.Virtual execution of AADL models via a translation into synchronous programs.In:Proc.of the 7th ACM & IEEE Int'l Conf.on Embedded Software.New York:ACM Press,2007.134-143.
  • 6Hamid I,Zalila B,Najm E,Hugues J.Automatic framework generation for hard real-time applications.Innovations in Systems and Software Engineering:A NASA Journal,2008,4(1):107-122.[doi:10.1007/s11334-008-0044-5].
  • 7Zalila B,Pautet L,Hugues J.Towards automatic middleware generation.In:Proc.of the 11th IEEE Int'l Symp.on Object-Oriented Real-Time Distributed Computing.Washington:IEEE Computer Society Press,2008.221-228.
  • 8Vergnaud T,Hugues J,Pautet L,Kordon F.PolyORB:A schizophrenic middleware to build versatile reliable distributed applications.In:Proc.of the 9th Int'l Conf.on Reliable Software Technologies Ada-Europe 2004.Berlin:Springer-Verlag,2004.106-119.
  • 9The assert-project final report.2007.http://www.assert-project.net.
  • 10OMG.Systems Modeling Language V1.0.2007.http://www.omg.org/cgi-bin/doc-formal/2007-09-01.

共引文献84

同被引文献18

引证文献2

二级引证文献2

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部