EWVM, a Web Virtual Machine to Support Code Generation in Compiler Courses

Authors Sofia Teixeira, José Carlos Ramalho , Pedro Rangel Henriques

Thumbnail PDF


  • Filesize: 0.75 MB
  • 9 pages

Document Identifiers

Author Details

Sofia Teixeira
  • Centro ALGORITMI, Departamento de Informática, University of Minho, Braga, Portugal
José Carlos Ramalho
  • Centro ALGORITMI, Departamento de Informática, University of Minho, Braga, Portugal
Pedro Rangel Henriques
  • Centro ALGORITMI, Departamento de Informática, University of Minho, Braga, Portugal

Cite AsGet BibTex

Sofia Teixeira, José Carlos Ramalho, and Pedro Rangel Henriques. EWVM, a Web Virtual Machine to Support Code Generation in Compiler Courses. In 11th Symposium on Languages, Applications and Technologies (SLATE 2022). Open Access Series in Informatics (OASIcs), Volume 104, pp. 7:1-7:9, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2022)


This paper describes a project which goal is to analyze and model a complete Virtual stack Machine (VM) environment and build a Web application with a graphical interface to deploy an environment to compile and execute VM programs. The new tool offers two main features: assembles and reports errors in programs written in the assembly language of the Virtual Machine; and animates the execution of the compiled code, displaying the internal state of the VM and providing an interface to control the execution step-by-step. In the paper, after discussing related concepts and works, a proposal to build such a tool, so far called EWVM, will be presented along the architecture drawn. A prototype will be shown, and its impact as an educational tool is argued.

Subject Classification

ACM Subject Classification
  • Software and its engineering → Compilers
  • Software and its engineering → Virtual machines
  • Virtual Machine
  • Stack Machine
  • Assembler
  • Debugger
  • Compiler
  • Code Generation


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman. Compilers Principles, Techniques and Tools. Addison-Wesley, 1986. Google Scholar
  2. Sameer M AlNajdi, Malek Q Alrashidi, and Khalid S Almohamadi. The effectiveness of using augmented reality (ar) on assembling and exploring educational mobile robot in pedagogical virtual machine (pvm). Interactive Learning Environments, 28(8):964-990, 2020. Google Scholar
  3. Tom Chothia and Chris Novakovic. An offline capture the flag-style virtual machine and an assessment of its value for cybersecurity education. In 2015 USENIX Summit on Gaming, Games, and Gamification in Security Education (3GSE 15), Washington, D.C., August 2015. USENIX Association. URL: https://www.usenix.org/conference/3gse15/summit-program/presentation/chothia.
  4. Brian Davis, Andrew Beatty, Kevin Casey, David Gregg, and John Waldron. The case for virtual register machines. In Proceedings of the 2003 workshop on Interpreters, virtual machines and emulators, pages 41-49, 2003. Google Scholar
  5. Simão Melo de Sousa. Máquina Virtual para o projecto da disciplina de compiladores. Dep. de Informática, Universidade da Beira Interior, Covilhão, Portugal, September 2006. Google Scholar
  6. Joseph A. Driscoll, Ralph M. Butler, and Joelle M. Key. A virtual machine environment for teaching the development of system software. In Proceedings of the 42nd Annual Southeast Regional Conference, ACM-SE 42, pages 440-441, New York, NY, USA, 2004. Association for Computing Machinery. URL: https://doi.org/10.1145/986537.986647.
  7. Fabian Fagerholm. Perl 6 and the parrot virtual machine, 2005. Google Scholar
  8. Nuno Gaspar and Simão Melo de Sousa. WebVm - A web-based host platform for pedagogical virtual machines. Special issue of the journal Informática na Educação: teoria & prática, 1(4), January/June 2009. Google Scholar
  9. Xuelian Hu and Dong Han. The design, implementation and application of minijava/ad as an object-oriented compiler teaching model. In 2009 4th International Conference on Computer Science Education, pages 1488-1491, 2009. URL: https://doi.org/10.1109/ICCSE.2009.5228571.
  10. IBM Cloud Education. Virtual machines. https://www.ibm.com/cloud/learn/virtual-machines, June 2019. Accessed: 05-10-2021.
  11. Kexugit. Why have a stack?, November 2011. URL: https://docs.microsoft.com/pt-pt/archive/blogs/ericlippert/why-have-a-stack.
  12. Anh M Nguyen, Nabil Schear, HeeDong Jung, Apeksha Godiyal, Samuel T King, and Hai D Nguyen. Mavmm: Lightweight and purpose built vmm for malware analysis. In 2009 Annual Computer Security Applications Conference, pages 441-450. IEEE, 2009. Google Scholar
  13. Michael Prantl. Python internals: An introduction, October 2020. URL: https://blog.sourcerer.io/python-internals-an-introduction-d14f9f70e583.
  14. Yunhe Shi, Kevin Casey, M. Anton Ertl, and David Gregg. Virtual machine showdown: Stack versus registers. ACM Trans. Archit. Code Optim., 4(4), January 2008. URL: https://doi.org/10.1145/1328195.1328197.
  15. Mark Vinod Sinnathamby. Stack based vs register based virtual machine architecture, and the dalvik vm, September 2012. URL: https://www.codeproject.com/Articles/461052/Stack-Based-vs-Register-Based-Virtual-Machine-Arch.
  16. Hasitha Subhashana. Understanding how java virtual machine (jvm) works, May 2021. URL: https://hasithas.medium.com/understanding-how-java-virtual-machine-jvm-works-a1b07c0c399a.