Visual Educational Compiler: An Interactive Web-Based Tool for Visualising Compiler Design Phases

Authors

  • Dhivya shree A Department of Computer Science and Engineering, Sathyabama Institute of Science and Technology, Chennai, India
  • Dharsini P S Department of Computer Science and Engineering, Sathyabama Institute of Science and Technology, Chennai, India
  • Dharshana R Department of Computer Science and Engineering, Sathyabama Institute of Science and Technology, Chennai, India
  • Jabez J Department of Computer Science and Engineering, Sathyabama Institute of Science and Technology, Chennai, India
  • Dheja sree R Department of Computer Science and Engineering, Sathyabama Institute of Science and Technology, Chennai, India
  • Devanshi S Department of Computer Science and Engineering, Sathyabama Institute of Science and Technology, Chennai, India
  • Christy Joseph Department of Computer Science and Engineering, Sathyabama Institute of Science and Technology, Chennai, India

DOI:

https://doi.org/10.65890/race.v2i3.212

Keywords:

Compiler Design, Educational Tool, Lexical Analysis, Abstract Syntax Tree, Visualisation, Python, Streamlit

Abstract

The Visual Educational Compiler is designed to address the gap between theoretical understanding and practical experience in compiler design. Although students typically learn the roles of the lexer, parser, abstract syntax tree (AST), semantic analyser, and code generator, their understanding is often limited to conceptual diagrams and theoretical descriptions. The proposed system provides a visual, step-by-step representation of the compilation process, enabling students to observe the transformation of source code into tokens, an AST, semantic representations, and, ultimately, executable code. The system accepts programs written in a simplified teaching language that supports variables, integer arithmetic operations, conditional statements, and print functions. The compilation process is implemented in Python and consists of five phases: lexical analysis, parsing, AST construction, semantic analysis, and code generation. The final phase generates equivalent Python code. Each compilation phase is presented through a dedicated tab in the Streamlit-based interface, allowing students to inspect intermediate artifacts and compare outputs across different stages of compilation. Errors are reported by phase, enabling students to understand the specific responsibilities of each compiler component. Deliberate errors, including missing semicolons, undeclared variables, and type-related errors, were incorporated to demonstrate phase-specific error detection. The system was evaluated using ten programs of increasing complexity, along with their corresponding erroneous versions. The results showed that all syntactically valid programs successfully progressed through the complete compilation pipeline, while the introduced errors were detected at the appropriate compilation phases and accompanied by relevant diagnostic messages. The teaching language was intentionally designed with limited functionality to maintain transparency of the compilation process and avoid obscuring individual compiler phases within complex code. Future work will focus on extending the language capabilities and incorporating a dedicated code optimisation phase.

References

[1] Hiranishi, H., Imai, Y., Podržaj, P., Ohno, A., & Hattori, T. (2022). Application of Web-based Visual Compiler to Computer Education. IEEJ Transactions on Electronics, Information and Systems, 142(3), 389-394. DOI: https://doi.org/10.1541/ieejeiss.142.389

[2] Stamenković, S., & Jovanović, N. (2023). A web-based educational system for teaching compilers. IEEE Transactions on Learning Technologies, 17, 143-156.• Louden, K. C. (2003). Compiler Construction: Principles and Practice. Thomson Learning. DOI: https://doi.org/10.1109/TLT.2023.3297626

[3] Mernik, M., & Zumer, V. (2003). An educational tool for teaching compiler construction. IEEE Transactions on Education, 46(1), 61-68. DOI: https://doi.org/10.1109/TE.2002.808277

[4] Hiranishi, H., & Hattori, P. P. Y. I. T. (2020, December). Development of Web-based Visual Compiler for Computer Literacy. In The 6th International Conference on Electronics and Software Science (ICESS2020) (p. 23).• Streamlit Inc. (2024). Streamlit Documentation.

[5] Khorasani, M., Abdou, M., & Fernández, J. H. (2022). Web application development with streamlit. Software Development, 498, 507. DOI: https://doi.org/10.1007/978-1-4842-8111-6

[6] Khorasani, M., Fernández, J. H., & Mohammad/Abdou Khorasani (Mohame). (2025). Streamlit for Web Development. DOI: https://doi.org/10.1007/979-8-8688-1826-4

[7] Khorasani, M., Abdou, M., & Hernández Fernández, J. (2025). Streamlit basics. In Streamlit for Web Development: Build and Scale Secure Python-Powered Apps with Streamlit (pp. 31-66). Berkeley, CA: Apress. DOI: https://doi.org/10.1007/979-8-8688-1826-4_2

[8] Vırseda, R. D. V. (2023). Visualizing Compiler Design Theory from Implementation Through an Interactive Tutoring Tool: Experiences and Results.

[9] Urquiza-Fuentes, J., Manso, F., Velázquez-Iturbide, J. Á., & Rubio-Sánchez, M. (2011, June). Improving compilers education through symbol tables animations. In Proceedings of the 16th annual joint conference on Innovation and technology in computer science education (pp. 203-207). DOI: https://doi.org/10.1145/1999747.1999805

[10] Krebs, N., & Schmitz, L. (2014). Jaccie: A Java-based compiler–compiler for generating, visualizing and debugging compiler components. Science of Computer Programming, 79, 101-115. DOI: https://doi.org/10.1016/j.scico.2012.03.001

[11] Orehovački, T. (2009). Verificator: educational tool for learning programming. Informatics in Education.

[12] Grune, D., Van Reeuwijk, K., Bal, H. E., Jacobs, C. J., & Langendoen, K. (2012). Modern compiler design. Springer Science & Business Media. DOI: https://doi.org/10.1007/978-1-4614-4699-6

[13] Meduna, A. (2007). Elements of compiler design. Auerbach Publications. DOI: https://doi.org/10.1201/9781420063257

[14] Sampaio, A. (1997). An algebraic approach to compiler design (Vol. 4). World Scientific. DOI: https://doi.org/10.1142/9789812830685

Downloads

Published

30-10-2026

Issue

Section

Research Articles

How to Cite

Dhivya shree A, Dharsini P S, Dharshana R, Jabez J, Dheja sree R, Devanshi S, & Joseph, C. (2026). Visual Educational Compiler: An Interactive Web-Based Tool for Visualising Compiler Design Phases. Revolutionary Advances in Computing and Electronics: An International Journal, 2(3), 27-36. https://doi.org/10.65890/race.v2i3.212