A console-driven application that allows users to run pre-made programs. Includes a debugger and a selection of garbage collectors.
The enhanced version of the interpreter console with a graphical user interface (GUI) built using JavaFX.
This project is an implementation of an interpreter console for a custom programming language. It uses the model-view-controller (MVC) architectural pattern and is built on object-oriented concepts. The main functionalities include interpreting various statements, expressions, types, and values defined in the language. Additionally, it handles file operations, heap management, garbage collection, and supports concurrent programming. A GUI using JavaFX is also implemented for an interactive experience.
-
Core Components:
- Statements: Compound, Print, Assignment, If, Variable Declaration, No Operation.
- Expressions: Arithmetic, Value, Logic, Variable, Relational.
- Types: Integer, Boolean, String, Reference.
- Values: Integer, Boolean, String, Reference.
- ADTs: Execution Stack, Output List, Symbol Table, File Table, Heap Table.
-
Program State: Represents the state of the program at a given moment.
-
Repository: Stores and manages the list of program states.
-
Controller: Manages execution steps and logs program state.
-
View: Supports selection and execution of predefined programs.
-
Exception Handling: Custom exceptions for ADT, expression, and statement execution errors.
-
File Operations: Handling file read, write, and close operations.
-
Heap Management: Includes a Heap Table and supports new object creation and heap read/write.
-
Garbage Collector: Implements both unsafe and safe garbage collection.
-
Concurrent Programming Support: Handles multiple program states (threads) concurrently.
-
Type Checker: Ensures type consistency before program execution.
-
GUI: Interactive JavaFX-based graphical user interface.
See the console version's REQUIREMENTS.md file and the JavaFX version's REQUIREMENTS.md file for more details.
- Java Version: OpenJDK 19.0.2 with JavaFX
- Development Environment: Any IDE that supports Java and JavaFX.
- Clone the repository.
- Open the project in your IDE.
- Ensure Java 19 with JavaFX is set up in your project settings.
- Build and run the project.
- Select a program from the provided list.
- Interact with the GUI to execute the program and observe changes in program state, heap table, output list, and more.
- Use the "One Step" button to execute one step at a time and observe the changes; or
- Use the "All Steps" button to execute the entire program at once and examine the final state.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.