How alaaal-deennabilsarhanal-maliki/oop_assignment2_vole_machine works
Vole Machine is a C++ simulator for a small educational computer, with CLI and Qt GUI front ends sharing a simulation core. The main workflow is to load and validate a program, inspect or edit machine state, then execute it stepwise or to completion and view resulting state and screen output. The graph preserves the documented instruction families and GUI capabilities. Some implementation files were not sampled; edges are limited to relationships visible in excerpts, the source index, or README.
Main entry points: MainWindow.cpp GUI controller · Cpu.cpp CPU and registers · Machine.cpp Machine facade · ConsoleUI.cpp Console commands
Components 22
User interfaces
- Console commands
Vole-Machine/CLI/src/ConsoleUI.cpp - Console output
Vole-Machine/CLI/src/ConsoleView.cpp
Simulation core
- Machine facade
Vole-Machine/Core/src/Machine.cpp - Program loader
Vole-Machine/Core/src/ProgramLoader.cpp - 256-cell memory
Vole-Machine/Core/src/Memory.cpp - Screen output
Vole-Machine/Core/src/Screen.cpp
Instruction execution
- CPU and registers
Vole-Machine/Core/src/Cpu.cpp - Instruction decoder
Vole-Machine/Core/src/InstructionDecoder.cpp - ALU operations
Vole-Machine/Core/src/Alu.cpp - Arithmetic and logic
Vole-Machine/Core/src/AluInstructions.cpp - Data transfers
Vole-Machine/Core/src/DataTransferInstructions.cpp - Control instructions
Vole-Machine/Core/src/ControlInstructions.cpp
GUI views
- GUI controller
Vole-Machine/GUI/src/MainWindow.cpp - Run controls
Vole-Machine/GUI/src/ControlBar.cpp - Memory view
Vole-Machine/GUI/src/MemoryPanel.cpp - Register view
Vole-Machine/GUI/src/RegisterPanel.cpp - Screen view
Vole-Machine/GUI/src/ScreenPanel.cpp - Program list
Vole-Machine/GUI/src/ProgramListPanel.cpp - Change snapshot
Vole-Machine/GUI/src/MachineSnapshot.cpp - Theme manager
Vole-Machine/GUI/src/ThemeManager.cpp - Instruction guide
Vole-Machine/GUI/src/InstructionSetDialog.cpp
Other components
- User
Connections 25
- User → Console commands: enters commands
- User → GUI controller: uses simulator
- Console commands → Machine facade: controls machine
Vole-Machine/CLI/src/ConsoleUI.cpp - Console commands → Console output: prints state
Vole-Machine/CLI/src/ConsoleUI.cpp - GUI controller → Machine facade: controls machine
Vole-Machine/GUI/src/MainWindow.cpp - GUI controller → Run controls: builds controls
Vole-Machine/GUI/src/MainWindow.cpp - GUI controller → Memory view: builds view
Vole-Machine/GUI/src/MainWindow.cpp - GUI controller → Register view: builds view
Vole-Machine/GUI/src/MainWindow.cpp - GUI controller → Screen view: builds view
Vole-Machine/GUI/src/MainWindow.cpp - GUI controller → Program list: builds view
Vole-Machine/GUI/src/MainWindow.cpp - GUI controller → Instruction guide: opens guide
Vole-Machine/GUI/src/MainWindow.cpp - GUI controller → Theme manager: applies theme
Vole-Machine/GUI/src/MainWindow.cpp - Memory view → 256-cell memory: reads memory
Vole-Machine/GUI/src/MemoryPanel.cpp - Register view → CPU and registers: reads registers
Vole-Machine/GUI/src/RegisterPanel.cpp - GUI controller → Change snapshot: takes snapshots
Vole-Machine/GUI/src/MainWindow.cpp - Machine facade → Program loader: loads programs
- Program loader → Instruction decoder: validates words
Vole-Machine/Core/src/ProgramLoader.cpp - Program loader → 256-cell memory: writes program
Vole-Machine/Core/src/ProgramLoader.cpp - Machine facade → CPU and registers: steps execution
- CPU and registers → 256-cell memory: fetches data
Vole-Machine/Core/src/Cpu.cpp - CPU and registers → Instruction decoder: decodes instruction
Vole-Machine/Core/src/Cpu.cpp - Arithmetic and logic → CPU and registers: reads and writes
Vole-Machine/Core/src/AluInstructions.cpp - Arithmetic and logic → ALU operations: computes results
Vole-Machine/Core/src/AluInstructions.cpp - Data transfers → CPU and registers: transfers data
Vole-Machine/Core/src/DataTransferInstructions.cpp - Machine facade → Screen output: exposes output