系统仿真学报 ›› 2016, Vol. 28 ›› Issue (7): 1528-1538.

• 仿真系统与技术 • 上一篇    下一篇

复杂系统建模仿真语言编译器的实现与应用

周文1, 迟鹏2, 李伯虎2, 宋晓1   

  1. 1.北京航空航天大学,北京 100191;
    2.北京仿真中心,北京 100854
  • 收稿日期:2014-10-12 修回日期:2015-03-31 出版日期:2016-07-08 发布日期:2020-06-04
  • 作者简介:周文(1991-),男,湖南,硕士生,研究方向为离散事件仿真系统设计与实现;迟鹏(1985-),男,天津,工程师,研究方向为系统仿真;李伯虎(1938-),男,上海,院士,研究方向为计算机仿真与集成制造。
  • 基金资助:
    国家自然科学基金(61473013)

Implementation and Application of Complex System Modeling and Simulation Language Compiler

Zhou Wen1, Chi Peng2, Li Bohu2, Song Xiao1   

  1. 1. Beihang University, Beijing 100191, China;
    2. Beijing Simulation Center, Beijing 100854, China
  • Received:2014-10-12 Revised:2015-03-31 Online:2016-07-08 Published:2020-06-04

摘要: 仿真语言是实现一体化仿真设计环境的关键技术之一。仿真语言实现的难点是实现其编译器,即自动识别仿真语言语义并将其转换为C++等编程语言。介绍了复杂系统仿真语言(CMSL)的构成及其特性,研究了编译器的结构、工作机理,实现了一个面向CMSL文本的编译器。重点针对离散事件仿真的多层复合模型,提出并实现了一种内嵌于编译器的扁平化方法。利用一个离散系统案例对CMSL的描述能力及编译器的编译功能进行验证,结果表明,CMSL语言具有面向对象和面向组件的特性,其编译器能够编译基于CMSL的仿真文本,并将复合模型扁平化。

关键词: 编译器, 仿真语言, 词法, 语法, 扁平化

Abstract: Simulation language is a key technology of integrated simulation based design software environment. A difficulty of developing simulation language is the compiler that automatically transfers simulation language Semantics to programming language such as C++. The contents and features of CMSL were introduced. And a compiler which could analyze simulation text written in CMSL was implemented. A decouple method for Discrete System was proposed and integrated in the compiler. The features object-oriented and components oriented of CMSL were verified by an example with its ability to describe discrete system.

Key words: compiler, simulation language, lexical, grammar, decouple

中图分类号: