OverKill is a sandboxed programming language and IDE designed to teach beginners how machines work safely. It simulates memory, registers, storage, loops, and reads/writes without touching real hardware.
- Safe Virtual Machine: Executes code in a sandboxed environment
- Memory Visualization: See registers and memory in real-time
- Step-by-Step Execution: Debug and understand each instruction
- Watchpoints: Monitor specific registers and variables
- Educational Focus: Explicit errors and warnings for learning
- Execution Modes: Warn mode for learning, strict mode for enforcing correctness
- Permission System: Read-only and read-write regions
- Named Registers: Use descriptive names instead of coordinates
.ok- OverKill program files.okt- Machine definition files (defines memory layout, registers, permissions)
# Run a program
python overkill_cli.py example.ok
# Run other examples
python overkill_cli.py simple_demo.ok
python overkill_cli.py strict_demo.ok
python overkill_cli.py watchpoint_demo.okpython overkill_ide.pypython test_overkill.pyrun on "machine.okt"
First
# Runs once at program start
set reg 0;0 = int 10 named counter
Second
# May repeat forever
read 0;0 into value
write value into 1;0
repeat forever
set reg X;Y = int N [named name]- Set register valueread X;Y into variable- Read from memory/registerwrite variable into X;Y- Write to memory/registerwhen condition ... otherwise ...- Conditional executionrepeat forever- Loop Second section indefinitelywait N- Simulated delay in milliseconds
watch reg 0;0 on read
watch reg 1;0 on write
mode warn- Print warnings, continue executionmode strict- Stop on any invalid operation
memory 256x256
region registers 0;0 to 15;15 rw
region storage 16;0 to 255;255 rw
reg 12;4 int led
reg 34;1 int counter
OverKill/
├── machine_loader.py # Loads .okt machine definition files
├── virtual_machine.py # Virtual machine implementation
├── language_parser.py # Parses .ok program files
├── execution_engine.py # Executes instructions on VM
├── overkill_ide.py # GUI IDE (requires tkinter)
├── overkill_cli.py # Command-line interface
├── test_overkill.py # Test suite
├── machine.okt # Default machine definition
├── example.ok # Basic example program
├── simple_demo.ok # Simple demonstration
├── strict_demo.ok # Strict mode demonstration
├── watchpoint_demo.ok # Watchpoint demonstration
├── loop_example.ok # Loop example
├── README.md # This file
└── TUTORIAL.md # Comprehensive tutorial
- example.ok - Basic read/write operations with watchpoints
- simple_demo.ok - Demonstrates conditional logic
- strict_demo.ok - Shows strict mode error handling
- watchpoint_demo.ok - Demonstrates watchpoint triggers
- loop_example.ok - Infinite loop with repeat forever
- README.md (this file) - Quick start and overview
- TUTORIAL.md - Comprehensive language tutorial with examples
The project includes a comprehensive test suite that validates:
- Machine configuration loading
- Virtual machine operations
- Language parsing
- Instruction execution
- Error handling and warnings
- Watchpoints
- Conditional execution
- Strict mode enforcement
Run tests with:
python test_overkill.py- Python 3.7 or higher
- tkinter (for GUI IDE, optional)
No external dependencies required - uses only Python standard library!
- Machine Loader: Parses
.oktfiles to define virtual hardware - Virtual Machine: Manages memory, enforces permissions, tracks state
- Language Parser: Parses
.okprogram files into instruction objects - Execution Engine: Executes instructions on the VM with proper error handling
- IDE/CLI: User interfaces for writing and running programs
OverKill is designed for teaching:
- How memory and registers work
- Assembly-like low-level programming
- Debugging with step execution
- Memory safety and permissions
- Consequences of uninitialized reads
- Watchpoint-based debugging
This project is designed to be easily extensible:
- Add new instruction types in
language_parser.pyandexecution_engine.py - Enhance VM features in
virtual_machine.py - Improve visualization in
overkill_ide.py - Add new machine configurations (
.oktfiles) - Create more example programs (
.okfiles)
MIT License - See LICENSE file for details