How to run
==========

Running the Modelverse is all done through the use of scripts to coordinate the three different projects.

The following scripts are included by default.
Despite the various files, only *run_local_modelverse.py* is required for most cases.

fix_files.py
------------

Fix some files that must be kept identical.
This is sometimes necessary because if a file gets updated, the changes must propagate.
Usually, this is done with symbolic links or similar, but there does not seem to be a nice cross-platform way of doing this in Git.

Invocation::
    
    python scripts/fix_files.py

flush_compiler_caches.py
------------------------

Clear all cached files from the compiler.
The compiler will automatically reparse files when they have been changed, but changes to the compiler code itself will not be detected.
When changing the compiler, this file should be executed to flush these file caches.

Invocation::

    python scripts/flush_compiler_caches.py

generate_bootstrap.py
---------------------

Creates the bootstrap file for the Modelverse State.
This creates the necessary initial graph which contains links to all primitive code that is executed by the Modelverse before tasks can communicate with it.
Generally, this needs to be executed when any file in the *bootstrap/* folder is modified.
Compilation is fairly smart, only recompiling parts that have changed.

Invocation::
    
    python scripts/generate_bootstrap.py

prompt.py
---------

A generic prompt interface to the Modelverse.
You can log in as a specific task and start sending input messages to the Modelverse as that task.
All output sent by the Modelverse will be printed in the console.
There is no logic in the prompt itself, making it completely generic.

While this is not the most usable way of communicating with the Modelverse, it provides a minimal interface.

Invocation::

    python scripts/prompt.py

run_local_modelverse.py
-----------------------

Locally runs an instance of the Modelverse at the requested port.
This combines MvK and MvS at the same system, and actually makes a direct link between them, omitting the slow use of sockets.
While this is kind of a hack at the moment, it is really necessary for performance.
To split them up, there just needs to be a statechart in between both of them (which is already written and working).

The port option is optional, and defaults to 8001.

Invocation::

    python scripts/run_local_modelverse.py port

run_tests.py
------------

Run the tests for all parts of the Modelverse.

Invocation::

    python scripts/run_tests.py

run_basic_tests.py
------------------

Run the relatively fast tests for the Modelverse.

Invocation::

    python scripts/run_basic_tests.py
