Git Product home page Git Product logo

interpreter-java's Introduction

Interpreter

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.

Overview

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.

Features

  1. 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.
  2. Program State: Represents the state of the program at a given moment.

  3. Repository: Stores and manages the list of program states.

  4. Controller: Manages execution steps and logs program state.

  5. View: Supports selection and execution of predefined programs.

  6. Exception Handling: Custom exceptions for ADT, expression, and statement execution errors.

  7. File Operations: Handling file read, write, and close operations.

  8. Heap Management: Includes a Heap Table and supports new object creation and heap read/write.

  9. Garbage Collector: Implements both unsafe and safe garbage collection.

  10. Concurrent Programming Support: Handles multiple program states (threads) concurrently.

  11. Type Checker: Ensures type consistency before program execution.

  12. 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.

Getting Started

Prerequisites

  • Java Version: OpenJDK 19.0.2 with JavaFX
  • Development Environment: Any IDE that supports Java and JavaFX.

Installation

  1. Clone the repository.
  2. Open the project in your IDE.
  3. Ensure Java 19 with JavaFX is set up in your project settings.
  4. Build and run the project.

Usage

  1. Select a program from the provided list.
  2. Interact with the GUI to execute the program and observe changes in program state, heap table, output list, and more.
  3. Use the "One Step" button to execute one step at a time and observe the changes; or
  4. Use the "All Steps" button to execute the entire program at once and examine the final state.

Preview

Program Chooser Preview

Program Runner Preview

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

interpreter-java's People

Contributors

davidcristian avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.