|
8 years ago | |
---|---|---|
bootstrap | 8 years ago | |
doc | 8 years ago | |
hybrid_server | 8 years ago | |
integration | 8 years ago | |
interface | 8 years ago | |
kernel | 8 years ago | |
model | 8 years ago | |
scripts | 8 years ago | |
state | 8 years ago | |
.gitattributes | 9 years ago | |
.gitignore | 9 years ago | |
README.md | 8 years ago |
Installing the Modelverse is unnecessary, as it is mere Python code and doesn't use installation scripts. All scripts which are generally useful are found in the 'scripts' directory, and are written in OS-independent Python code.
You will, however, need to install a dependency: the SCCD compiler and runtime.
Next we specifically focus on using the Modelverse for live modelling. Note that these GUIs are mostly a proof of concept and therefore not very intuitive or user friendly. Nonetheless, they support live modelling of systems in their respective formalism.
To start live modelling of CBDs, start up the Modelverse with the following command.
python scripts/run_local_modelverse.sh 8001
When this has started, compile all CBD related files and its execution semantics with the following command.
python scripts/execute_model.sh http://localhost:8001 test bootstrap/*.alc integration/code/cbd_*.mvc integration/code/cbd_*.alc
After the previous command has finished, start up the GUI with the following command. Any other GUI, or even textual, is also possible. Only this GUI and a very minimal textual prompt are provided out-of-the-box.
cd interface/CBD
python main.py
In the GUI, you select the desired block in the top bar, and then create it by left-clicking in the canvas. Links can be created by selecting "Link" in the top bar, and dragging between two blocks while holding the right mouse button. Blocks can be deleted by middle clicking. To modify attributes of a block, such as the value of the constant block, left click it again.
Modifications can be done even during simulation, and will immediately be taken into account. If the background colours red, the model is not conforming and something is wrong (e.g., a constant block doesn't have a value). The background will turn grey again when the problem was resolved.
Live modelling of FSAs is identical to the live modelling of CBDs. Instead of loading CBD files, now load FSA files with the command shown below.
python scripts/execute_model.sh http://localhost:8001 test bootstrap/*.alc integration/code/fsa_*.mvc integration/code/fsa_*.alc
The GUI can be started similarly with the files in the folder interface/FSA. Commands are very similar, but there is no need to select the required kind of state and transition in the top bar, as there are only two options. To turn a state into the initial state, control-left-click the new initial state. Events can be injected by typing in the name of the event in the top right entry box, and clicking the event button.