This Machine Simulator contains a fairly modularized system for building and testing various theoretical machines. It has a GUI that shows the running of the machine over time and a code editor. It uses a simplified instruction set containing only two instructions (add, multiply). This file describes the various source files contained within the project.
In reading the source for this application I would suggest reading them in the order provided below to ensure the best understanding of the project.
This package contain all the components of the machine. The important classes to view are OperableComponent, DUnit and RegisterBank. OperableComponent is the base class for all components in the machine that perform an operation. DUnit is an extension of OperableComponent and adds checks for register/data dependencies. RegisterBank contains all the registers and performs checks to see if registers are in conflict.
This package contains only two classes, Instruction and Operation. An Instruction is a line of code and the Operation is the operation that is performed by a line of code or a OperableComponent.
This is the main program package. The important classes in this package are the Program which is a simple wrapper around a list; the Machine which links all the components and the program; the Application class which is responsible for initializing, starting, stopping and resetting the Machine - among other thing; and last the Main class which contains the Main method.
This package contians a swing GUI that talks to the application. This package has little to do with the machine and is more to allow peaking into it's working. The only two classes that are interesting in this package are Events and GuiState. Events contains all the event handlers for the various buttons of the GUI. GUIState contians all the logic for updating the GUI depending on the Application state.
This package doesn't really pertain to this program. It's an IO library I wrote some years back to simplify file IO. It's used in this project to load and save programs.
This package doesn't really pertain to this program. It's a threaded message system I developed a few months back to allow indirect communication between components.