Code Generation Method of Data Flow Model Based on Branch Marking
Author:
Affiliation:

Fund Project:

National Natural Science Foundation of China (62022046, U1911401, 61802223); National Key Research and Development Project (2019YFB1706200); Huawei-Tsinghua Trustworthy Research Project (20192000794)

  • Article
  • | |
  • Metrics
  • |
  • Reference [21]
  • |
  • Related
  • |
  • Cited by
  • | |
  • Comments
    Abstract:

    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.

    Reference
    [1] Christopher H, Edward AL, Liu J, Liu XJ, Steve N, Xiong YH, Zheng HY. Heterogeneous concurrent modeling and design in Java. Vol.1. California:California Univ Berkeley Dept of Electrical Engineering and Computer Science, 2008. 1-34.
    [2] Joseph TB, Soonhoi H, Edward AL. Ptolemy:A framework for simulating and prototyping heterogeneous systems. Readings in Hardware/Software Co-Design, 2002,4(1):527-543.
    [3] Jiang Y, Zhang H, Li Z, Deng YD, Song XY Gu M, Sun JG. Design and optimization of multiclocked embedded systems using formal techniques. IEEE Trans. on Industrial Electronics, 2015,62(2):1270-1278.
    [4] Edward AL, Xiong YH. A behavioral type system and its application in Ptolemy II. Formal Aspects of Computing, 2004,16(3):210-237.
    [5] Yang ZB, Pi L, Hu K, Gu ZH, Ma DF. AADL:An architecture design and analysis language for complex embedded real-time systems. Ruan Jian Xue Bao/Journal of Software, 2010,21(5):899-915(in Chinese with English abstract). http://www.jos.org.cn/1000-9825/3700.htm[doi:10.3724/SP.J.1001.2010.03700]
    [6] Duane AA. A computation model with data flow sequencing[Ph.D. Thesis]. Stanford:Stanford University, 1969.
    [7] Jiang Y, Zhang HH, Zhang HF, Liu H, Song XY, Gu M, Sun JG. Design of mixed synchronous/asynchronous systems with multiple clocks. IEEE Trans. on Parallel and Distributed Systems, 2015,26(8):2220-2232.
    [8] Philip B, Sanjeev K, Edward AL, Liu XJ, Zhao Y. Modeling of sensor nets in Ptolemy II. In:Proc. of the 3rd Int'l Symp. on Information Processing in Sensor Networks. New York:Association for Computing Machinery, 2004.359-368.
    [9] Christopher B, Edward AL, Stavros T. Exploring models of computation with Ptolemy II. In:Proc. of the 8th IEEE/ACM/IFIP Int'l Conf. on Hardware/Software Codesign and System Synthesis. New York:Association for Computing Machinery, 2010. 331-332.
    [10] Johan E, Jörn WJ, Edward AL, Liu J, Liu XJ, Jozsef L, Stephen N, Sonia S, Xiong YH. Taming heterogeneity-the Ptolemy approach. Proc. of the IEEE, 2003,91(1):127-144.
    [11] Jiang Y, Zhang HH, Zhang HF, Zhao XY, Liu H, Sun CN, Song XY, Gu M, Sun JG. Tsmart-Galsblock:A toolkit for modeling, validation, and synthesis of multi-clocked embedded systems. In:Proc. of the 22nd ACM SIGSOFT Int'l Symp. on Foundations of Software Engineering. New York:Association for Computing Machinery, 2014. 711-714.
    [12] Paul LG, Jean-Pierre T, Jean-Christophe LL. Polychrony for system design. Journal of Circuits, Systems, and Computers, 2003,12(3):261-303.
    [13] Jiang Y, Liu H, Song HB, Kong H, Wang R, Guan Y, Lui S. Safety-Assured model-driven design of the multifunction vehicle bus controller. IEEE Trans. on Intelligent Transportation Systems, 2017,19(10):3320-3333.
    [14] Jiang Y, Song HB, Yang YX, Liu H, Gu M, Guan Y, Sun JG, Lui S. Dependable model-driven development of CPS:From stateflow simulation to verified implementation. ACM Trans. on Cyber-Physical Systems, 2019,3(1):Article 12.
    [15] Alejandro C, Juan BP, Mercedes R. MEdit4CEP-Gam:A model-driven approach for user-friendly gamification design, monitoringand code generation in CEP-based systems. Information and Software Technology, 2018,95:238-264.
    [16] Gabriel S, Jose AG, Ricardo T. Code generation using model driven architecture:A systematic mapping study. Journal of Computer Languages, 2020,56:100935.
    [17] Du Y, Guo DH, Chen X, Ren L, Dai GZ. Model-driven visualization generation system. Ruan Jian Xue Bao/Journal of Software, 2016,27(5):1199-1211(in Chinese with English abstract). http://www.jos.org.cn/1000-9825/4959.html[doi:10.13328/j.cnki.jos. 004959]
    [18] Zhou G, Man-Kit L, Edward AL. A code generation frame-work for actor-oriented models with partial evaluation. In:Proc. of the Int'l Conf. on Embedded Software and Systems, Vol.29. Springer-Verlag, 2007. 193-206.
    附中文参考文献:
    [5] 杨志斌,皮磊,胡凯,顾宗华,马殿富.复杂嵌入式实时系统体系结构设计与分析语言:AADL.软件学报,2010,21(5):899-915. http://www.jos.org.cn/1000-9825/3700.htm[doi:10.3724/SP.J.1001.2010.03700]
    [17] 杜一,郭旦怀,陈昕,任磊,戴国忠.一种模型驱动的可视化生成系统.软件学报,2016,27(5):1199-1211. http://www.jos.org.cn/1000-9825/4959.html[doi:10.13328/j.cnki.jos.004959]
    Related
    Cited by
    Comments
    Comments
    分享到微博
    Submit
Get Citation

苏卓,王东艳,杨镒箫,张明睿,姜宇,孙家广.基于分支标记的数据流模型的代码生成方法.软件学报,2021,32(6):1647-1662

Copy
Share
Article Metrics
  • Abstract:2029
  • PDF: 5442
  • HTML: 3042
  • Cited by: 0
History
  • Received:August 26,2020
  • Revised:December 19,2020
  • Online: February 07,2021
  • Published: June 06,2021
You are the first2044634Visitors
Copyright: Institute of Software, Chinese Academy of Sciences Beijing ICP No. 05046678-4
Address:4# South Fourth Street, Zhong Guan Cun, Beijing 100190,Postal Code:100190
Phone:010-62562563 Fax:010-62562533 Email:jos@iscas.ac.cn
Technical Support:Beijing Qinyun Technology Development Co., Ltd.

Beijing Public Network Security No. 11040202500063