-
Notifications
You must be signed in to change notification settings - Fork 5
How To Load A Model
Marcel Heinz edited this page Feb 3, 2017
·
1 revision
This is a small guide on how to retrieve the model information, if you want to reuse the checker's code. Basically all you have to do is look at the uploaded tests.
-
Download the .jar file.
-
Add the library to your build path
-
Remember that the ModelLoader loads the Prelude using the relative file path "../models/Prelude.megal". Thus, set your project up in an appropriate folder hierarchy. I advise you to have your own project inside of the megalib folder. You have to ignore it for megalib's local Git then!
-
Follow the instructions below:
ModelLoader ml = new ModelLoader(); //initializes the managing object ml.loadFile(path); //<path> has to be replaced by the filepath to your file MegaModel model = ml.getModel(); //returns the model with the dictionaries model.getInstanceOfMap(); //All Getters should be self-explanatory
- How to Megamodel
- Language Description
- Concrete Syntax
- Constraints
- Semantics
- Project How To's
- Install, Build, Test, Run
- Checker Tool
- Visualizer Tool