Font Size: a A A

Design And Implementation Of A Python-like Programming Language XD-M

Posted on:2022-08-10Degree:MasterType:Thesis
Country:ChinaCandidate:Y T GuFull Text:PDF
GTID:2518306605973099Subject:Master of Engineering
Abstract/Summary:PDF Full Text Request
The correctness and reliability of software and hardware systems is of importance,and a small bug in system may result in significant property and security losses.Besides software testing,formal verification is important for improving the correctness and reliability of software and hardware systems.Temporal logic is often used for formal verification and has been widely used.MSVL(Modeling,Simulation and Verification Language),which is a programming language independently developed by the laboratory,is derived from Projection Temporal Logic(PTL).MSVL has modeling,simulation and verification functions,which can improve the correctness and reliability of software and hardware systems.Python is a powerful interpretive programming language,with the characteristics of flexibility,interactivity and extensibility.Simple syntax which is easy to learn and use is one of the reasons for its widespread use.In contrast,MSVL has low interactivity,and the syntax is complex.However,Python has problems of low efficiency and reliability,flexible dynamic typing can lead to runtime errors.Though the active open source community provides a large number of powerful open source libraries,it also introduces potential bugs.This paper mainly studies the design and implementation of a Python-like programming language XD-M.The main contributions are as follows:1.The key point of XD-M is the design of its interpreter.The framework of XD-M interpreter is designed.Development environment that makes program easy to port to Windows or Linux is chosen.The lexical and syntax is designed,which rules the programming style of XD-M.Based on MSVL and with reference to Python,a programming style like Python that uses simple variables without engaging in type declarations is implemented,the implementation of assignment,struct,built-in functions and basic statements is introduced in detail.2.The key problems of the underlying implementation of XD-M interpreter are solved,the key problems of assignment,struct,built-in functions and external import statements are described in the form of syntax tree,and their solution is explained in detail.3.Program examples for solving Order-4 Magic Square and constructing a balanced binary tree are respectively written in XD-M.The usability and practicality of XD-M and its interpreter is illustrated through simulation,modeling and verification of the two programs.
Keywords/Search Tags:MSVL, Temporal Logic, Python, Interpreter, Programming Language
PDF Full Text Request
Related items