ABSTRACT SYNTAX TREE (AST) AND CONTROL FLOW GRAPH (CFG) CONSTRUCTION OF NOTASI ALGORITMIK - Sofyana Putra, Irfan
Abstract syntax tree (AST) and Control flow graph (CFG) is a representation of a program code that can be used for various things. One of them is the development of an automatic grader system for programming learning. Notasi Algoritmik is a notation used in the Informatics Engineering ITB for the benefit of programming learning, including those related to the evaluation of programming learning. Until this final project was made, there has been no research that discusses how to construct AST and CFG from Notasi Algoritmik, even though it can bring benefits such as being used in the development of an automatic grader system to reduce programming learning evaluation problems which are still done manually. Because of that reason, in this final project a research was conducted to construct AST and CFG from Notasi Algoritmik. AST can be generated from a Notasi Algoritmik text with the process of lexical analysis and syntax analysis. In the lexical analysis stage, a set of tokens is defined that is used in Notasi Algoritmik and in the syntax analysis process, the grammar of Notasi Algoritmik is defined. After the AST is successfully generated, the CFG construction process is carried out using a recursive technique that performs a traversal process on the AST nodes. From the 13 test cases used in the final project, the results show that the AST can be constructed correctly after going through the process of lexical analysis and syntax analysis. Meanwhile, CFG can be generated using only AST and recursive techniques that perform traversal processes on the nodes. With a tool that can be used to generate AST and CFG from Notasi Algoritmik, it is possible to develop automated grader systems using Notasi Algoritmik in the future.