Examples

To run this code, store it in a file (e.g., test.alc), and execute the following commands:

python scripts/run_local_modelverse.py 8001 &
python scripts/make_parallel.py http://localhost:8001 test test.alc bootstrap/primitives.alc
python scripts/prompt.py

In the prompt, log on to http://localhost:8001 as user test. Now, all input you send, will be caught in the input() calls seen in the code. Results will also be printed.

Note that all content will, by default, be typed as string. If you want to send integers or so, prepend the input with a backslash (\), which allows you to directly input the JSON code. For example, input 5 will be received as the string “5”. To send the integer 5, the input should be \5.

Simple Fibonacci Server

Simple Petri Net Server

Generic Modelling Server