Graph Grammar menu / Example used in the demo


Now, We are finally going to use ATOM3's Graph Grammar. You can download the FSA model we will use to demonstrate the GG tool. To open it in ATOM3, go in "file" and select "open model" and choose the file you just downloaded (tut_Example1.py). As soon as you load it, this will appear on your screen:  

 

We see on the picture a model that was created just like the one in the previous step. It contains four states including one initial state and one final state. There is nothing special with this model compared with the previous one aside from the fact it contains two more states. Let's open the "transformation" section in the menu on the top of the canvas:  

 

Many options are available in this menu, we are now going to define them one by one: 

Load transformation  

   

This options load a transformation that was created in the "edit transformation" section.  

Save Transformation  

   

This options save a transformation that was created in the "edit transformation" section. The current standard for the name is: (The name you specify in the edit section)_model.py  

Edit Transformation  

   

This options allow to modify an existing Graph Grammar. We will see this options in detail when we will analyse the FSA simulator. You specify in this section the name of the simulator, the rules, the initial actions and the final actions.  

Create Transformation  

   

This options allow to create a new Graph Grammar. You specify in this section the name of the simulator, the rules, the initial actions and the final actions.  

Generate code for Transformation  

   

This options allow to generate the executable Graph Grammar code from a model that was created or modified. The generated file will be used to actually "execute" the transformation. That's it, there are two files for the graph grammar: one for editing the model and one generated by ATOM3 from the model in order to run the transformation. The name of the generated file is (the name you specify in the edit section).py  

Execute Transformation  

   

This options allow to execute a Graph Grammar on the model currently loaded in the canvas. We will explain this options in detail in the next section.