Browse Source

Changed README with some instructions on how to use the sketching UI

lucas 7 years ago
parent
commit
d5ef7d1042
1 changed files with 25 additions and 0 deletions
  1. 25 0
      README.md

+ 25 - 0
README.md

@@ -66,3 +66,28 @@ From then on, you can simply invoke all tests in PyPy using:
 pypy scripts/run_tests.py
 ```
 
+## Example-driven DSML design
+
+This repository is a fork of the Modelverse and extends it with a method to define a domain-specific language based on example models.
+To run it, first start the modelverse as described above. Then, upload all the required (meta)models with:
+```sh
+python2 main.py -u
+```
+
+After that, start the user interface in example-modeling mode to sketch example models for the DSML:
+```sh
+python2 main.py -exm
+```
+This will create an empty example model and opens the sketching UI, where the example model can be drawn on the canvas. Use the keyboard commands "G" to group a selected set of primitives, "T" to type a group and "A" to attribute a node.
+
+Once a set of example models exists, the UI for instance modeling phase can be started with:
+```sh
+python2 main.py -im
+```
+Again, this will create an empty instance model. During instance modeling, the interface is constrained by the example models.
+
+In order to edit existing models, append "-m [path/to/model]" to the above commands. All models reside in fixed paths, namely "models/example/exX" and "models/instance/imX", whereby X is an integer starting from 1.
+For example, to edit an example model, use
+```sh
+python2 main.py -exm -m models/example/ex1
+```