A full Java ecosystem built around the minimalist S language: from a core emulator, through rich JavaFX tools, to a multi‑user server and modern Web client.
This repository contains four main stages (course exercises), each adding a new architectural layer on top of the previous one. The project simulates an execution environment for the S Language, evolving from a console application to a distributed web system.
Core S Emulator & Console Interface
Implements the execution engine including variables, labels, program model, and flow control.
- Core Logic: XML programs are parsed, validated, and translated into instruction objects (
Increase,Decrease,Jumps,Assignments,Quote, etc.). - Console UI: Wraps the engine to expose operations: load, display, expand, execute, and statistics.
JavaFX GUI & Local Debugger
Builds a visual layer on top of the core engine to make S programs interactive.
- MVC Architecture: Controllers (
AppController,InstructionsController,DebuggerExecutionController) coordinate the view and logic. - Features:
- Step‑by‑step debugging & breakpoints.
- Instruction highlighting.
- Theming via
ThemeManager& animations viaAnimationManager.
Servlet Backend & Remote JavaFX Client
Transforms the emulator into a multi-user system where users can log in, upload programs, and debug remotely.
- Managers:
UserManager,ExecutionSessionManager,ProgramManager. - Endpoints:
LoginServlet,UploadServlet,ExecuteServlet,DebugServlet. - Infrastructure: Uses
ServletUtilsandCORSFilterfor shared context and access control.
- UI Components:
DashboardController,ExecuteScreenController,LoginController. - Networking: Uses a DTO layer (
UserData,LoginResponse,ProgramDTO) to communicate with the server.
React + Vite Frontend
A modern Single Page Application (SPA) consuming the existing HTTP API.
- Tech Stack: React, Vite (
main.jsx,App.jsx). - Key Screens:
LoginScreen.jsx– User bootstrap.DashboardScreen.jsx– Program management.ExecutionScreen.jsx– Live execution visualization.
- Integration:
HttpClientUtilandCookieManagerhandle API calls and session persistence.
Across all exercises, the following architectural principles are maintained:
- Single Core Engine: All clients (Console, JavaFX Desktop, Web) share the exact same instruction set and execution pipeline.
- Synthetic vs. Base Instructions: High-level constructs (macros) are compiled down to a minimal base instruction set.
- DTO‑Driven APIs: Internal models remain encapsulated. External communication happens strictly via Data Transfer Objects (DTOs).
- Observability: Execution history, statistics, and credit usage are explicitly tracked for debugging and analysis.








