全部 标题 作者
关键词 摘要

OALib Journal期刊
ISSN: 2333-9721
费用:99美元

查看量下载量

相关文章

更多...

Intermediate Representation Using Graph Visualization Software

DOI: 10.4236/jsea.2020.135006, PP. 77-90

Keywords: Recursive Descent Parser, Best First Search, Intermediate Representation, Abstract Syntax Tree, Graph Visualization Software

Full-Text   Cite this paper   Add to My Lib

Abstract:

In this paper, a method to initiate, develop and visualize an abstract syntax tree (AST) in C++ source code is presented. The approach is in chronological order starting with collection of program codes as a string and split into individual characters using regular expression. This will be followed by separating the token grammar using best first search (BFS) algorithm to determine node having lowest value, lastly followed by graph presentation of intermediate representation achieved with the help of graph visualization software (GraphViz) while former is implemented using python programming language version 3. The efficacy of our approach is used in analyzing C++ code and yielded a satisfactory result.

References

[1]  Click, C. and Paleczny, M. (1995) A Simple Graph-Based Intermediate Representation. ACM SIGPLAN Workshop, San Francisco, CA, 35-49.
https://doi.org/10.1145/202530.202534
[2]  Sander, G. (1999) Graph Layout for Applications in Computer Construction. Theoretical Computer Science, Berkeley, CA, 175-214.
https://doi.org/10.1016/S0304-3975(98)00270-9
[3]  Walker, D. (2003) Intermediate Representation. Princeton University, Princeton, NJ, 1-21.
[4]  Vaderna, R., Milosavljevic, G. and Dejanovic, I. (2015) Graph Layout Algorithms and Libararies: Overview and Improvements. Faulty of Technical Sciences, University of Novisad, Serbia.
[5]  Strunk, E.A., Aiello, M.A. and Knight, J.C. (2006) A Survey of Tools for Model Checking and Model-Based Development. Technical Report, Department of Computer Science, University of Virginia, Charlottesville, VA.
[6]  Braun, M., Buchwald, S. and Zwinkau, A. (2011) FIRM: A Graph-Based Intermediate Representation. Workshop on Intermediate Representations. Karlsruuhe Institute of Technology, Germany, 61-68.
[7]  Moller, A. and Schwartzbach, M.I. (2019) Static Program Analysis. Computer Science, Aarhus University, Denmark.
[8]  Visser, E. (2004) Program Transformation with Stratego/XT: Rules, Strategies, Tools and Systems. Technical Report, Institute of Information and Computing Sciences Utrecht University, Netherlands.
[9]  Ade-Ibijola, A., Ewert, S. and Sanders, L. (2014) Abstracting and Narrating Novice Programs Using Regular Expressions. South Africa Institute of Computer Scientist and Information Technologist (SAICSIT), Centurion, South Africa.
https://doi.org/10.1145/2664591.2664601
[10]  Gansner, E.R., Koutsofios, E. and North, S. (2015) Drawing Graphs with Dot.
https://graphiz.gitlab.io/_pages/pdf/dotguide.pdf
[11]  Aliyu, E.O., Adewale, O.S., Adetunmbi, A.O. and Ojokoh, B.A. (2019) Requirement Formalization for Model Checking Using Extended Backus Naur Form. I-Manager’s Journal on Software Engineering, 13, 1-6.
[12]  Stalmans, E.R. (2010) Visualisation of Abstract Syntax Trees for Coco/R. Computer Science of Rhodes University Grahamstowm, South Africa.
https://pdfs.semanticscholar.org
[13]  Kreb, N. and Schmitz, L. (2012) JACCIE: A Java-Based Compiler-Compiler for Generating, Visualizing and Debugging Compiler Components. Elsevier Science of Computer Programming, 79, 101-115.
https://doi.org/10.1016/j.scico.2012.03.001
[14]  Kulkarni, A.A. (2013) Verification of Program Properties with Graphviz. Master Dissertation, College of Engineering, Shivajinagar, Pune.
[15]  Gregor, M. and Spalek, J. (2017) Using LLVM-Based JIT Compilation in Genetic Programming. Department of Control and Information Systems, Faculty of Electrical Engineering, University of Zilina, Zilina, Slovak Republic.
https://doi.org/10.1109/ELEKTRO.2016.7512108
[16]  Celik, Z.B., McDaniel, Z.P. and Tan, G. (2018) SOTERIA: Automated IoT Safety and Security Analysis. USENIX Annual Technical Conference, 1-19
[17]  Mount, S. (2013) A Language-Independent Static Checking System for Coding Conventions. Ph.D. Thesis, University of Wolverhampton, England.
[18]  Joshi, V. (2017) Leveling up one’s Parsing Game with ASTs.
https://medium.com/basecs/leveling-up-onesparsing-game-with-asts-d7a6fc2400ff
[19]  Fehnker, A., Brauer, J., Huuck, R. and Seefried, S. (2008) Goanna: Syntactic Software Model Checking. 1-6.
[20]  Namratha, N. (2010) Visualization of Dataflow Models. A Dissertation in Eindhoven University of Technology, United Arab Emirates.
[21]  Gansner, E.R. (2014) Using Graphviz as a Library (Cgraph Version). Graphviz Library Manual.
[22]  Dogrosoz, U., Feng, Q., Madden, B., Doorly, M. and Frick, A. (2002) Graph Visualization Toolkits. IEEE Computer Graphics and Application, 22, 30-37.
https://doi.org/10.1109/38.974516
[23]  Ellson, J., Gansner, E.R., Koutsofios, E., North, S.C. and Woodhull, G. (2003) GraphViz and Dynagraph-Static and Dynamic Graph Drawing Tools. Graph Drawing Software, AT and T Lab-Research, 127-148.
https://doi.org/10.1007/978-3-642-18638-7_6
[24]  Louden, K.C. (1993) Compiler Construction (Principles and Practice).
[25]  Aliyu, E.O. (2019) Development of Model Checking Technique for Operators Conformity Error in Selective and Iterative Structures. PhD Thesis, Department of Computer Science, Federal University of Technology Akure, Ondo State, Nigeria.

Full-Text

Contact Us

service@oalib.com

QQ:3279437679

WhatsApp +8615387084133