Domitilla it's a Global Graph elaboration tool.
The main function that can be executed are:
- DRAWING: take one graph and give it a graphic representation in PDF.
- PARALLEL COMPOSITION: take two different graphs and give their parallel composition.
- SYNCHRONIZATION: take two different graphs and allow to fuse a pair of nodes.
- MULTIPLEXING: take two different graphs and allow to do a more complex fusion.
- TRANSLATION TO PETRI NET: take one graph and give a relative translation in Petri net in .ndr type supported in TINA.
Tested on macOs Mojave 10.14.4 and Ubuntu 18.04.2 LTS. Not tested on windows yet.
The grammar used for Structured Global Graph is based on chorgram grammar. See /global_graph_parser/G_grammar.g4 for the definition.
The grammar used for Untructured Global Graph is DOT language.
Open terminal, find the right directory and execute:
python3 dom.py
and the tool will run.
-
CHOOSE FILE: Click on "select" button under the "graph1" and/or "graph2" section and browse till the desired file and then select it, next click on "OK". For dismissing the selection popup click outside the selection area or click on "OK" without any file selected.
-
DRAW: Select at least one graph.
-
PARALLEL COMPOSITION: select two graphs.
-
SYNCRONIZATION: Select two graphs. Manually write into the dedicated text area the pair of nodes that you would fuse. There are two type of input accepted.
- First: a couple of node for each row, for example "A -> H : n ; K -> B : n".
- [NEW] Second: a couple of partecipant, for example "[A,B]"
-
MULTIPLEX: Select one or two graphs. Manually write into the dedicated text area the pair of partecipant that you would fuse; for example "[A,B]". Follow the given example for the correct syntax.
-
TRANSLATE TO PETRI NET: Select at least one graph.
-
It's possible to change the save path for output saving in "Save Path" section. Click on "find", select the desired folder and then click "OK". For dismissing the selection popup click outside the selection area. Unfortunately, at the moment, if you click "OK" without any file selected the program will crash.
-
Inside "example/par_ch" folder there are some example of graphs:
- The ones with (.txt) extension are STRUCTURED GLOBAL GRAPH;
- The ones with (.gv) extension are UNSTRUCTURED GLOBAL GRAPH;
- The ones with (.ndr) extension are PETRI NET.
SYNCHRONIZATION: Select "compose.gv" and "parallel.gv" leave only one of the teo given example (delete one) in the text area and click on syncronization. The result will be a simple fusion of the described node.
- SYNCHRONIZATION has undergone some changes, and isn't well tested.
- MULTIPLEX just added but not well tested.
- structured Global Graph TRANSLATION to Petri net doesn't work.
- 2.0.4
- CHANGE: Structured Global Graph now are recognized by a parser made with ANTLR4.
- 2.0.3
- ADD: MULTIPLEX function
- ADD: popup messages, warnings and errors.
- CHANGE: improved SYNCHRONIZATION, now recognize two different tipe of input and execute different operation. Check usage example for more detail.
- 2.0.2
- ADD: Clear All button.
- CHANGE: modified graph folder, now has a better organization (renamed "grafi" in "example").
- CHANGE: modified label naming in Petri net translation.
- CHANGE: now able to execute syncronization using only one graph.
- CHANGE: fixed problem saving directory.
- CHANGE: fixed various problem (parser, fusion, added some more comment in-line code, ecc.).
- 2.0.1
- CHANGE: better path handling function.
- CHANGE: graphic bug in UI solved.
- 2.0.0
- ADD: help button.
- CHANGE: restyled graphic interface written using KIVY library.
- CHANGE: cross platform support.
- 1.0.0
- ADD: graphic interface written using PySimpleGui library.
- 0.1.1
- ADD: more sophisticated command line function.
- 0.1.0
- ADD: different command line function.
-
composition.py: contain two functions.
- composition(gr1, gr2, name, draw): merge two graph in one.
- gr1: first graph;
- gr2: second graph;
- name: name of the composition;
- draw: 1 give as output also the PDF whit the result, 0 otherwise.
- refusion(gr_st, nome, node_fus, draw): provide the syncronization of the node inside of one graph.
- gr_str: new empty list;
- nome: name of the fusion;
- node_fus: list of the node waiting for syncronization;
- draw: 1 give as output also the PDF whit the result, 0 otherwise.
- composition(gr1, gr2, name, draw): merge two graph in one.
-
convert.py: contain one function.
- petri2(path, nome_grafo, gr_str, save): provide the translation of an Unstructured Global Graph in Petri net.
- paht: path of the original file (at the moment unsed, this parameter will be removed soon);
- nome_grafo: name of the graph;
- gr_str: new empty list;
- save: path of the save folder.
- petri2(path, nome_grafo, gr_str, save): provide the translation of an Unstructured Global Graph in Petri net.
-
dom.py: contain a lot of function required for the GUI.
-
domitilla.kv: it's a style file required by kivy for the GUI.
-
dottogr.py: contain one function.
- dot_not_struct(path, nome_grafo, struct, draw): fill an empty list with data belonging to an Unstructured Global Graph.
- path: path of the graph;
- nome_grafo: name of the graph;
- struct: new empty list;
- draw: 1 give as output also the PDF whit the result, 0 otherwise.
- dot_not_struct(path, nome_grafo, struct, draw): fill an empty list with data belonging to an Unstructured Global Graph.
-
draw.py: contain one function:
- draw_graph(struct, name): provide a PDF with a drawing of the graph.
- struct: full list of the graph;
- nome_grafo: name of the graph;
- draw_graph(struct, name): provide a PDF with a drawing of the graph.
-
function.py: contain a lot of side function.
-
myfunc.py: contain a lot of side function.
-
parse_and_draw.py: contain one function:
- parse_and_draw(path, graph_name): translate from Structured Global Graph to Unstructured Global Graph and it draw the graph
- path: path of the graph;
- graph_name: name of the graph;
- parse_and_draw(path, graph_name): translate from Structured Global Graph to Unstructured Global Graph and it draw the graph
-
fuseplus.py: contain one function:
- fuseplus(cmp, n1, n2): transform two partecipant in a list that contain every possible couple of fusion.
- cmp: struct that contain one graph;
- n1: first partecipant;
- n2; second partecipant.
- fuseplus(cmp, n1, n2): transform two partecipant in a list that contain every possible couple of fusion.
-
multi.py: contain one function:
- multi(str, pt1, pt2): allow to create a graph with multiplex.
- str: struct that contain one graph;
- pt1: first partecipant;
- pt2; second partecipant.
- multi(str, pt1, pt2): allow to create a graph with multiplex.
-
path.txt: text file that memorize some usefull path.
Davide Schiavi - dedo94 - davideschiavi94@gmail.com Simone Orlando - (https://github.com/simoneorlando) - simoneorlando.cs@gmail.com Ivan Lanese - (https://github.com/lanese) - ivan.lanese@gmail.com Distributed under the MIT license. See LICENSE for more information.