-
Notifications
You must be signed in to change notification settings - Fork 0
How To Use
To use TempoUI with VDM models, we need to first make a TempoUI project.
A TempoUI project is essentially a DukeScript project with additional dependencies to extend the bindings towards VDM.
To create an initial project, we use Maven archetypes (see https://github.com/dukescript/maven-archetypes):
mvn archetype:generate
-DarchetypeGroupId=com.dukescript.archetype
-DarchetypeArtifactId=knockout4j-archetype
-DarchetypeVersion=0.9
This will create a root folder for the project with 2 modules: client
and js
. Client holds the Java code for the UI (we mostly ignore js
).
The client
module contains demo code from the DukeScript archetype. It can either be used as a starting point or deleted. We recommend
creating a folder for the VDM model and storing it together with the UI code.
Finally, let's add TempoUI as a dependency to the client/pom.xml
:
<dependency>
<groupId>org.overturetool</groupId>
<artifactId>tempoui</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
TempoUI is not currently released so we need to check it out and install with
it maven. Once this done, we should be able to mvn compile
the project.
To help develop TempoUIs, we have published some Development Guidelines.
Once the TempoUI is built, it can be used by launching the VDM model with the remote control class developed in the UI project.
Final tip: It's possible to launch and debug the remote controlled model from
within a Java IDE by running the overture interpreter project (main class
org.interpreter.VDMJ
) with the following arguments: -vdm[sl|pp|rt] -i /path/to/model/sources -remote fully.qualified.RemoteControlClass
. You must
also set the UI project as a dependency of the interpreter. This has been
tested with Eclipse and IntelliJ but should work with others IDEs.