Please use this identifier to cite or link to this item:
Title: Parsing and semantic analysis of a domain specific language
Authors: Qin, Gemeng
Keywords: DRNTU::Engineering::Computer science and engineering
Issue Date: 2014
Abstract: A domain specific language (DSL) is a computer programming language of limited expressiveness focused on a particular domain. A DSL offers programmers a high level abstraction for them to express their algorithms. In engineering and the sciences, MATLAB is a commonly used domain specific language to quickly prototype algorithms owing to the dynamic nature of the language and its ease of use. However, the dynamic nature of the language comes with additional costs, such as overheads due to late binding. The front-end for MATLAB was developed in this project to translate MATLAB to the intermediate language so that MATLAB can be translated into a static programming language such as C/C++ to reduce the overheads and other costs of the dynamic feature. In this project, stencil computation in MATLAB is analysed as a case study. Since all data types in MATLAB is in a form of an array, the analysis of arrays were performed in the implementation. This report presents how a parser was implemented to parse the MATLAB language and how the constructs are represented internally using an intermediate representation. Certain semantic analysis were also performed to ensure that the user-written codes are well-formed as well as to infer type information from the source code. This involves processes such as type inference of variables in MATLAB, size inference of array and error checking of uninitialized variables, and array type or shape mismatch.
Rights: Nanyang Technological University
Fulltext Permission: restricted
Fulltext Availability: With Fulltext
Appears in Collections:SCSE Student Reports (FYP/IA/PA/PI)

Files in This Item:
File Description SizeFormat 
  Restricted Access
2.31 MBAdobe PDFView/Open

Page view(s) 50

checked on Oct 26, 2020

Download(s) 50

checked on Oct 26, 2020

Google ScholarTM


Items in DR-NTU are protected by copyright, with all rights reserved, unless otherwise indicated.