Skip to content
/ LMAS Public

A Learning Machine Simulator that implements TOY & LMC

Notifications You must be signed in to change notification settings

logosity/LMAS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learning Machine Emulation Project (LMAS)

This is (will be) an implementation of two educational computer architectures. The first is TOY while the second is LMC.

Why another implementation?

There are several of these available, but by putting both in one easy to find and (hopefully) use location, the hope is that people will find it easier to gain a fundamental understanding of how computer architectures work. Plus, it's just fun to implement these sorts of things!

Installation

Clone the project, then start a weberver of your choice with the public directory as the root web directory; e.g:

cd $project_dir/public; python -m SimpleHTTPServer

Running tests

Jasmine is the test tool we are using for the project. Simply open the test runner thusly (assuming port 8000 is local instance):

http://localhost:8000/tests[/index.html]

Autotests

Add a suitable reload plugin (e.g. LiveReload for Chrome) and the tests will run automatically when changed.

(to use livereload with the python webserver above, install the appropriate module, e.g.: 'pip install livereload') and run it in the same directory as the web server.)

Adding new tests

Add dependencies and spec files to index.html as needed.

(re)generating the grammar

The assembly language grammar file is in pegjs format. There is a script in the project bin/ directory to regenerate it (requires the command line tool pegjs be installed, which is a node tool. So install, node as per your platform. Personally, I like using nvm to set it up, then follow the instrucitons on the pegjs site)

To have it regen with every change, add a file watcher (e.g. I use entr: 'ls -F -d grammar/* | entr bin/update-grammar')

Editor

To make the editor full screen type SHIFT-CTRL-F while the editor has focus.

About

A Learning Machine Simulator that implements TOY & LMC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published