Skip to content

refactor: refactor register machine into library with CLI, tests, and examples#1

Merged
milesapnash merged 22 commits into
mainfrom
refactor-register-machine
Jun 1, 2026
Merged

refactor: refactor register machine into library with CLI, tests, and examples#1
milesapnash merged 22 commits into
mainfrom
refactor-register-machine

Conversation

@milesapnash

@milesapnash milesapnash commented May 31, 2026

Copy link
Copy Markdown
Owner
  • Restructure project as a Cabal library + executable (rm-sim) with proper module hierarchy (Pairing, Parser, Programs, RegisterMachine)
  • Add instruction parser (Parser.hs) supporting the L0: R1- -> L1, L2 format, with Show/parse roundtrip
  • Add executeWithLimit to cap execution steps and warn on non-termination
  • Replace partial read calls in CLI argument parsing with readMaybe and clear error messages
  • Add QuickCheck test suite covering pairing roundtrips, instruction/program encoding, parser roundtrips, and execution semantics
  • Add 8 example programs: addition, subtraction, multiplication, copy, double, swap, equality, is_zero
  • Add CI workflow (GHC 9.6, cabal build + test)
  • Add README with usage docs, program format spec, and examples table
  • Add MIT license and .gitignore

@milesapnash milesapnash changed the title refactor refactor: refactor register machine into library with CLI, tests, and examples May 31, 2026
@milesapnash milesapnash merged commit 675878b into main Jun 1, 2026
1 check passed
@milesapnash milesapnash deleted the refactor-register-machine branch June 1, 2026 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant