Nextep and its dependencies have been packaged in a Debian VM image that can be downloaded from here: Nextep-VM. Refer to the VirtualBox documentation for instructions on how to import the image in your host system.
The VM comes with default user and administrator accounts:
Username | Password |
---|---|
nextep | nextep |
root | nextep |
In the VM, run the Eclipse shortcut on the desktop to access a pre-configured Nextep environment. From this point, follow the Playing with the Examples instructions below.
Disclaimer: Please note that Nextep does not work on Windows systems yet. A Linux-based or MacOS-based system is required. Nextep does not play well with Z3 version 4.4.1. A more recent version of Z3 is required.
Nextep is developed in Racal and relies on the AlleAlle library and the Z3 theorem prover. The easiest way to get started with Nextep is to set-up an Eclipse installation with the appropriate components:
- Make sure your system has a Java JDK (not JRE!) Version 8 installed and properly configured
- Download the appropriate Eclipse Photon IDE for Java Developers for your platform
- Download and install the Z3 theorem prover on your system (preferably using your package manager, e.g.,
apt-get install z3
,pacman -S z3
, etc.) - Take note of the path to the
z3
executable on your system (e.g./usr/bin/z3
). On Linux systems, this information can be retrieved by running the commandwhich z3
in a console. - Unzip the Eclipse archive and append a new line at the very end to the
eclipse.ini
file it contains:-Dsolver.z3.path=/usr/bin
. The path must point to the folder containing thez3
executable, not the full path of thez3
executable
- Open Eclipse and install the Rascal meta-programming environment:
- Go to
Help -> Install New Software...
, usehttps://update.rascal-mpl.org/unstable/
as the update site URL in theWork with:
textbox, and then check theRascal
feature. Follow the instructions to install Rascal (Next -> Next -> Finish
), and restart Eclipse when asked. In case of any errors, please check instructions on the Rascal download page
- Go to
- In the folder of your choice, clone the
AlleAlle
andlive-modeling
repositories:git clone https://github.com/cwi-swat/allealle/
git clone https://github.com/cwi-swat/live-modeling/
- In Eclipse, open the
Rascal
perspective (Window -> Perspective -> Open Perspective -> Other -> Rascal
) - Navigate to
File -> Import
and selectExisting Projects into Workspace
- In the
Select root directory
box, select the directory containing theAlleAlle
andlive-modeling
projects you just cloned - Make sure the two projects
allealle
andnextstep
are checked in theProjects:
list, and clickFinish
- Wait for Eclipse to build the workspace with the two projects
The Nextep specifications for the state machine example and the robotic arm example are located in the nextstep -> input
directory.
To automatically translate Nextep specifications to AlleAlle, then to Z3, and explore the results, follow these instructions:
- Select (click on) the
nextstep
project in the workspace explorer on the left - In the top menu, click on
Rascal -> Start Console
- In the
Terminal
view that appears in the bottom, typeimport Pipeline;
- Wait for the
rascal>
prompt to come back (ignore the warnings):- To run the state machine example (scenario II from the paper), type
runNextepSM();
- To run the robotic arm example, type
runNextepRoboticArm();
- To run the state machine example (scenario II from the paper), type
- In both cases, a new Model Visualizer window will open, displaying the results in the form of tables
- All the tables prefixed with
xn_
correspond to the newly found runtime state. For instance, in the state machine example, thexn_Runtime_current
table displays thecurrent
state for the new version of the state machinedoors
as inferred by the solver
The interested reader can refer to the Pipeline.rsc
file located in the src
folder of the nextstep
project to learn more about how Nextep specifications are translated to AlleAlle.
The nextstep -> output
directory contains manually-written version of the AlleAlle specifications for the two example DSLs. They are better formatted than the automatically-generated version and contain additional documentation for the different constraints and relations.
The benchmarks for the state machine example presented in the paper can be reproduced in the following way:
- Select (click on) the
nextstep
project in the workspace explorer on the left - In the top menu, click on
Rascal -> Start Console
- In the
Terminal
view that appears in the bottom, typeimport benchmark::statemachine::StateMachineBenchmark;
- Run the benchmark by entering
runBothScenarios();
- When the
rascal>
prompt comes back, the results are written in thenextstep/benchmark/
directory