123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- 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
- test_compile.py
- ---------------
- Run the compiler for a given input file, to detect whether it can be compiled or not.
- The command does not return anything if the file could be compiled, but prints an exception if there was a parsing error.
- Mostly used to validate large files for syntax errors or for profiling of the compiler.
- This script parses the file using Action Language syntax.
- Invocation::
- python scripts/test_compile.py file.alc
- test_model_compile.py
- ---------------------
- Identical to test_compile.py, mentioned above, but now expects a HUTN modelling syntax.
- Invocation::
-
- python scripts/test_model_compile.py file.mvc
- upload_core.py
- --------------
- Uploads the initial version of the bootstrap code as an actual Action Language model that will be loaded at startup.
- This does take some time and requires quite some resources of the Modelverse as well, as the bootstrap code is rather large.
- Normally this code is not necessary, although it would be if the bootstrap code has to be altered for different users.
- Note that this uploads the file stored in *bootstrap/merged.alm*, which is an automatically generated file from all bootstrap files.
- This file is automatically generated by the script *generate_bootstrap.py*, but can be manually edited to change the core library of a running Modelverse.
- After the core is uploaded, the model can also be incrementally modified from within the Modelverse itself.
- Invocation::
- python scripts/upload_core.py
|