首页 | 本学科首页   官方微博 | 高级检索  
     

同步语言Lustre的编译前端的设计与实现
引用本文:宋宇婷,孙小祥,冉丹.同步语言Lustre的编译前端的设计与实现[J].计算机技术与发展,2020(2):33-36.
作者姓名:宋宇婷  孙小祥  冉丹
作者单位:南京航空航天大学计算机科学与技术学院
基金项目:国家自然科学基金(U1533130)
摘    要:同步语言Lustre所描述的反应系统通常应用在航空航天、国防建设等领域,对系统的正确性和安全性都要求很高。如果系统在运行时出现了正确性问题,很可能会导致系统崩溃,产生非常严重的后果。系统中的任何一个词法错误或者语法错误都应该受到重视,而且应该被及时纠正。因此,对Lustre语言进行正确的编译是十分重要的。传统的Lustre语言的编译器都采用OCaml语言描述,无法保证所有人员都能够很容易地理解和使用,而且,需要耗费开发人员大量的时间和精力。基于上述问题,提出了一种新型的Lustre语言编译器。新型的Lustre语言编译器前端主要采用C++语言进行描述,并对生成的抽象语法树的结构进行重新定义,简化了编译的过程。该编译前端会对一个经典的Lustre语言模型进行检测,通过对检测的结果进行分析,验证了该编译前端的可行性。

关 键 词:同步语言Lustre  正确性  编译器前端  C++语言  抽象语法树

Design and Implementation of Compiler Front-end of Synchronous Language Lustre
SONG Yu-ting,SUN Xiao-xiang,RAN Dan.Design and Implementation of Compiler Front-end of Synchronous Language Lustre[J].Computer Technology and Development,2020(2):33-36.
Authors:SONG Yu-ting  SUN Xiao-xiang  RAN Dan
Affiliation:(School of Computer Science and Technology,Nanjing University of Aeronautics and Astronautics,Nanjing 211100,China)
Abstract:The reaction system described by Lustre,a synchronous language,is usually applied in aerospace,national defense construction and other fields,which requires high accuracy and security.If the system runs incorrectly,it will probably lead to system crash,with very serious consequences.Any lexical or grammatical errors in the system should be paid attention to and corrected in time.Therefore,it is important to compile Lustre correctly.The traditional Lustre language compilers are described in OCaml language,which cannot be easily understood and used by all people.Moreover,it takes a lot of time and energy for developers.Based on the above problems,a new Lustre language compiler is proposed.The front-end of this Lustre language compiler is mainly described in C++language,and the structure of the abstract syntax tree is redefined to simplify the compilation process.The compiler front-end detects a classical Lustre language model.The feasibility of the compiler front-end is illustrated by analyzing the results of the detection.
Keywords:synchronous language Lustre  correctness  compiler front-end  C++language  abstract syntax tree
本文献已被 维普 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号