• Damitha D Karunarathna University of Colombo School of Computing, Sri Lanka
  • Nasik Shafeek University of Colombo School of Computing, Sri Lanka



Flowcharts, Compilers, T Diagrams, PHP Programs

Abstract [English]

Source-code that a developer writes may not definitely make sense to another, the understandability of a source code depends on the proficiency in the language and the logical thinking pattern of the person who has developed the code and who tries to understand it.   However, in distributed software development and in software maintenance there is a need to read and understand the source-code probably written by someone else after some time it has encoded.  Flowcharts are used to depict the logical flow of processes and can be used as an effective tool in representing the control flow of software programs. This paper presents a novel approach to generate flowcharts from program snippets. It demonstrates that by using an intermediate abstract representation, independent of any programming language, the generation of flowcharts for programs written in any programming language can be achieved. The feasibility of the proposed approach was demonstrated by developing a porotype system of compilers to generate flowcharts for source-codes written in the PHP language.


Download data is not yet available.


Aho, A. V., Lam, M. S., Sethi, R., & Ulman, J. D. (2013). "Compilers: Principles, techniques and tools". London: Pearson Education Inc.

Aur´elie, L., Harold, M., Jean, C., & Bertrand, C. (2013). "Interest of Syntactic Knowledge for On-line Flowchart Recognition". Proceedings of the 9th International Conference on Graphics Recognition: New Trends and Challenges. Berlin.

AutoDai. (2017, 01 22). "AutoDia - Automatic Dia / UML generator". Retrieved 01 22, 2017, from

BSI. (1987). "Specification for data processing flow chart symbols, rules and conventions". BSI.

Gansner, E. R., & Ellson, J. (n.d.). "Dot language specification". (AT&T Labs Research) Retrieved 01 21, 2017, from

Gansner, E. R., & Ellson, J. (2017, 01 01). "GraphViz, Graph Visualization Software". (GraphViz) Retrieved 01 05, 2017, from

Gansner, E. R., Koutsofios, E., North, S. C., & Vo, K.-p. (1993). "A Technique for Drawing Directed Graphs". IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 19(3), 214-230. DOI:

Grune, D., Bal, H. E., & G. Langendoes, J. (2012). "Modern Compiler Design". New York: Springer. DOI:

Johnson, S. C. (2018, 10). "Yacc: Yet Another Compiler-Compiler". Retrieved 06 30, 2018, from

Knuth, D. E. (1974). "Computer Programming as an Art". Communications of the ACM, 17(12), 667-673. DOI:

Knuth, D. E. (1990). "Literate Programming". Stanford Junior University Press.

Kulkarni, R., Chavan, A., & Hardik, A. (2015). "Transpiler and it's Advantages". International Journal of Computer Science and Information Technologies, 6(2), 1629--1631.

Lesk, M. E., & Schmidt, E. E. (2018, 08). "Lex - A Lexical Analyzer Generator". Retrieved 06 30, 2018, from

Lucidchart. (2018, 10). Retrieved 08 2018, from Lucidchart:

Nassi, I., & Shneiderman, B. (1973, August). "Flowchart Techniques for Structured Programming". SIGPLAN Not., 8(8), 12--26. DOI:

Poole, M. (2002). "Compilers, Course notes for module CS 218, 2002". Wales: Department of Computer Science, University of Wales Swansea.

Toal, R. (2002). "Programs, Interpreters and Translators". Marymount: Loyala Marymount University.

Visio. (2018, 10). Visio. (Microsoft) Retrieved 08 2018, from Visio:

Wijayasiriwardhane, T. K., Wijayarathna, P. G., & Karunarathna, D. D. (2011). "An automated tool to generate test cases for performing basis path testing". International Conference on Advances in ICT for Emerging Regions (ICTer). Colombo, Sri Lanka. DOI:

Wijayasiriwardhane, T. K., Wijayarathna, P. G., & Karunarathna, D. D. (2016). "A Method to Generate Test Cases for Performing Basis Path Testing". International Conference on Computer Science Education Innovation & Technology (CSEIT). Global Science and Technology Forum.

Xiang-Hu, L., Qu, M.-c., & Li, Z.-Q. (2012). "Automatic Conversion of Structured Flowcharts into Problem Analysis Diagram for Generation of Codes". Journal of Software, 7(5), 1109--1120. DOI:

Zend Community. (2018, 08). "Extension Writing Part-I: Introduction to PHP and Zend". Retrieved 01 03, 2017, from




How to Cite

Karunarathna, D. D., & Shafeek, N. (2018). AN EXTENSIBLE APPROACH TO GENERATE FLOWCHARTS FROM SOURCE CODE. International Journal of Research -GRANTHAALAYAH, 6(9), 505–519.