gisele 0.5.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -3
- data/Gemfile.lock +15 -7
- data/bin/tast2fsp +53 -0
- data/examples/dqaad/dqaad.gif +0 -0
- data/examples/dqaad/dqaad.gis +31 -0
- data/examples/meeting-scheduler/MeetingScheduling.dot +46 -0
- data/examples/meeting-scheduler/MeetingScheduling.gif +0 -0
- data/examples/meeting-scheduler/MeetingScheduling.gis +1 -1
- data/examples/rectal-cancer-pathway/RectalCancerPathway.dot +55 -0
- data/examples/rectal-cancer-pathway/RectalCancerPathway.gif +0 -0
- data/examples/union/breast.gis +19 -0
- data/examples/union/breast/deterministic.dot +33 -0
- data/examples/union/breast/deterministic.gif +0 -0
- data/examples/union/breast/glts.dot +53 -0
- data/examples/union/breast/glts.gif +0 -0
- data/examples/union/breast/minimal.dot +31 -0
- data/examples/union/breast/minimal.gif +0 -0
- data/examples/union/breast/wf.dot +21 -0
- data/examples/union/breast/wf.gif +0 -0
- data/examples/union/dot.rb +6 -0
- data/examples/union/merged.dot +42 -0
- data/examples/union/merged.gif +0 -0
- data/examples/union/minim.dot +41 -0
- data/examples/union/minim.gif +0 -0
- data/examples/union/rectal.gis +20 -0
- data/examples/union/rectal/deterministic.dot +37 -0
- data/examples/union/rectal/deterministic.gif +0 -0
- data/examples/union/rectal/glts.dot +59 -0
- data/examples/union/rectal/glts.gif +0 -0
- data/examples/union/rectal/minimal.dot +35 -0
- data/examples/union/rectal/minimal.gif +0 -0
- data/examples/union/rectal/wf.dot +23 -0
- data/examples/union/rectal/wf.gif +0 -0
- data/examples/union/union.gis +48 -0
- data/examples/union/union.rb +39 -0
- data/examples/while/while-deteministic.gif +0 -0
- data/examples/while/while.dot +30 -0
- data/examples/while/while.gif +0 -0
- data/examples/while/while.gis +10 -0
- data/gisele.gemspec +2 -3
- data/gisele.noespec +3 -4
- data/lib/gisele.rb +0 -1
- data/lib/gisele/command.rb +30 -8
- data/lib/gisele/errors.rb +4 -0
- data/lib/gisele/loader.rb +1 -2
- data/lib/gisele/version.rb +2 -2
- data/spec/command/main/gisele_glts.stdout +89 -83
- data/spec/command/main/gisele_help.stdout +3 -0
- data/spec/command/main/gisele_no_sugar.stdout +34 -1
- data/spec/command/main/gisele_version.stdout +1 -1
- data/spec/fixtures/tasks/complete.gis +5 -1
- metadata +88 -43
- data/examples/merge/BreastCancer.dot +0 -30
- data/examples/merge/BreastCancer.gif +0 -0
- data/examples/merge/BreastCancer.gis +0 -17
- data/examples/merge/Merge.dot +0 -46
- data/examples/merge/Merge.gif +0 -0
- data/examples/merge/RectalCancer.dot +0 -22
- data/examples/merge/RectalCancer.gif +0 -0
- data/examples/merge/RectalCancer.gis +0 -15
- data/lib/gisele/compiling.rb +0 -2
- data/lib/gisele/compiling/to_glts.rb +0 -125
- data/lib/gisele/compiling/to_graph.rb +0 -160
- data/lib/gisele/compiling/to_graph.yml +0 -20
- data/spec/unit/compiling/test_to_glts.rb +0 -20
- data/spec/unit/compiling/test_to_graph.rb +0 -19
Binary file
|
@@ -0,0 +1,41 @@
|
|
1
|
+
digraph G {
|
2
|
+
graph [margin="0" pack="true" rankdir="LR" ranksep="0"];
|
3
|
+
0 [color="black" fillcolor="green" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
4
|
+
1 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
5
|
+
2 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
6
|
+
3 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
7
|
+
4 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
8
|
+
5 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
9
|
+
6 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
10
|
+
7 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
11
|
+
8 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
12
|
+
9 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
13
|
+
10 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
14
|
+
11 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
15
|
+
12 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
16
|
+
13 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
17
|
+
14 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
18
|
+
15 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
19
|
+
16 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
20
|
+
0 -> 1 [arrowsize="0.7" label="[not(breast)] / RectalCancer:start"];
|
21
|
+
3 -> 4 [arrowsize="0.7" label="[not(breast)] / Endoscopy:start"];
|
22
|
+
4 -> 6 [arrowsize="0.7" label="Endoscopy:end"];
|
23
|
+
9 -> 11 [arrowsize="0.7" label="[breast and m_plus] / RadioChimio:start"];
|
24
|
+
11 -> 12 [arrowsize="0.7" label="RadioChimio:end"];
|
25
|
+
15 -> 16 [arrowsize="0.7" label="[breast] / BreastCancer:end"];
|
26
|
+
0 -> 1 [arrowsize="0.7" label="[breast] / BreastCancer:start"];
|
27
|
+
3 -> 5 [arrowsize="0.7" label="[breast] / Biopsy:start"];
|
28
|
+
2 -> 3 [arrowsize="0.7" label="Consultation:end"];
|
29
|
+
1 -> 2 [arrowsize="0.7" label="Consultation:start"];
|
30
|
+
6 -> 5 [arrowsize="0.7" label="Biopsy:start"];
|
31
|
+
9 -> 13 [arrowsize="0.7" label="[not(breast) and m_plus] / Chimio:start"];
|
32
|
+
13 -> 12 [arrowsize="0.7" label="Chimio:end"];
|
33
|
+
14 -> 15 [arrowsize="0.7" label="PostTreatment:end"];
|
34
|
+
12 -> 14 [arrowsize="0.7" label="PostTreatment:start"];
|
35
|
+
10 -> 12 [arrowsize="0.7" label="Radio:end"];
|
36
|
+
9 -> 10 [arrowsize="0.7" label="[not(m_plus)] / Radio:start"];
|
37
|
+
8 -> 9 [arrowsize="0.7" label="Staff:end"];
|
38
|
+
7 -> 8 [arrowsize="0.7" label="Staff:start"];
|
39
|
+
5 -> 7 [arrowsize="0.7" label="Biopsy:end"];
|
40
|
+
15 -> 16 [arrowsize="0.7" label="[not(breast)] / RectalCancer:end"];
|
41
|
+
}
|
Binary file
|
@@ -0,0 +1,37 @@
|
|
1
|
+
digraph G {
|
2
|
+
graph [margin="0" pack="true" rankdir="LR" ranksep="0"];
|
3
|
+
0 [color="black" fillcolor="green" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
4
|
+
1 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
5
|
+
2 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
6
|
+
3 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
7
|
+
4 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
8
|
+
5 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
9
|
+
6 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
10
|
+
7 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
11
|
+
8 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
12
|
+
9 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
13
|
+
10 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
14
|
+
11 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
15
|
+
12 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
16
|
+
13 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
17
|
+
14 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
18
|
+
15 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
19
|
+
16 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
20
|
+
0 -> 1 [arrowsize="0.7" label="RectalCancer:start"];
|
21
|
+
1 -> 2 [arrowsize="0.7" label="Consultation:start"];
|
22
|
+
2 -> 3 [arrowsize="0.7" label="Consultation:end"];
|
23
|
+
3 -> 4 [arrowsize="0.7" label="Endoscopy:start"];
|
24
|
+
4 -> 5 [arrowsize="0.7" label="Endoscopy:end"];
|
25
|
+
5 -> 6 [arrowsize="0.7" label="Biopsy:start"];
|
26
|
+
6 -> 7 [arrowsize="0.7" label="Biopsy:end"];
|
27
|
+
7 -> 8 [arrowsize="0.7" label="Staff:start"];
|
28
|
+
8 -> 9 [arrowsize="0.7" label="Staff:end"];
|
29
|
+
9 -> 10 [arrowsize="0.7" label="[not(m_plus)] / Radio:start"];
|
30
|
+
9 -> 11 [arrowsize="0.7" label="[m_plus] / Chimio:start"];
|
31
|
+
10 -> 12 [arrowsize="0.7" label="Radio:end"];
|
32
|
+
11 -> 13 [arrowsize="0.7" label="Chimio:end"];
|
33
|
+
12 -> 14 [arrowsize="0.7" label="PostTreatment:start"];
|
34
|
+
13 -> 14 [arrowsize="0.7" label="PostTreatment:start"];
|
35
|
+
14 -> 15 [arrowsize="0.7" label="PostTreatment:end"];
|
36
|
+
15 -> 16 [arrowsize="0.7" label="RectalCancer:end"];
|
37
|
+
}
|
Binary file
|
@@ -0,0 +1,59 @@
|
|
1
|
+
digraph G {
|
2
|
+
graph [margin="0" pack="true" rankdir="LR" ranksep="0"];
|
3
|
+
0 [color="black" fillcolor="green" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
4
|
+
1 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
5
|
+
2 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
6
|
+
3 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
7
|
+
4 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
8
|
+
5 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
9
|
+
6 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
10
|
+
7 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
11
|
+
8 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
12
|
+
9 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
13
|
+
10 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
14
|
+
11 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
15
|
+
12 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
16
|
+
13 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
17
|
+
14 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
18
|
+
15 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
19
|
+
16 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
20
|
+
17 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
21
|
+
18 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
22
|
+
19 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
23
|
+
20 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
24
|
+
21 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
25
|
+
22 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
26
|
+
23 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
27
|
+
24 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
28
|
+
25 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
29
|
+
26 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
30
|
+
27 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
31
|
+
4 -> 6 [arrowsize="0.7" label="Consultation:start"];
|
32
|
+
6 -> 5 [arrowsize="0.7" label="Consultation:end"];
|
33
|
+
2 -> 4 [arrowsize="0.7" label=""];
|
34
|
+
7 -> 9 [arrowsize="0.7" label="Endoscopy:start"];
|
35
|
+
9 -> 8 [arrowsize="0.7" label="Endoscopy:end"];
|
36
|
+
5 -> 7 [arrowsize="0.7" label=""];
|
37
|
+
10 -> 12 [arrowsize="0.7" label="Biopsy:start"];
|
38
|
+
12 -> 11 [arrowsize="0.7" label="Biopsy:end"];
|
39
|
+
8 -> 10 [arrowsize="0.7" label=""];
|
40
|
+
13 -> 15 [arrowsize="0.7" label="Staff:start"];
|
41
|
+
15 -> 14 [arrowsize="0.7" label="Staff:end"];
|
42
|
+
11 -> 13 [arrowsize="0.7" label=""];
|
43
|
+
16 -> 18 [arrowsize="0.7" label=""];
|
44
|
+
19 -> 21 [arrowsize="0.7" label="Chimio:start"];
|
45
|
+
21 -> 20 [arrowsize="0.7" label="Chimio:end"];
|
46
|
+
18 -> 19 [arrowsize="0.7" label="[m_plus]"];
|
47
|
+
20 -> 17 [arrowsize="0.7" label=""];
|
48
|
+
22 -> 24 [arrowsize="0.7" label="Radio:start"];
|
49
|
+
24 -> 23 [arrowsize="0.7" label="Radio:end"];
|
50
|
+
18 -> 22 [arrowsize="0.7" label="[not(m_plus)]"];
|
51
|
+
23 -> 17 [arrowsize="0.7" label=""];
|
52
|
+
14 -> 16 [arrowsize="0.7" label=""];
|
53
|
+
25 -> 27 [arrowsize="0.7" label="PostTreatment:start"];
|
54
|
+
27 -> 26 [arrowsize="0.7" label="PostTreatment:end"];
|
55
|
+
17 -> 25 [arrowsize="0.7" label=""];
|
56
|
+
26 -> 3 [arrowsize="0.7" label=""];
|
57
|
+
0 -> 2 [arrowsize="0.7" label="RectalCancer:start"];
|
58
|
+
3 -> 1 [arrowsize="0.7" label="RectalCancer:end"];
|
59
|
+
}
|
Binary file
|
@@ -0,0 +1,35 @@
|
|
1
|
+
digraph G {
|
2
|
+
graph [margin="0" pack="true" rankdir="LR" ranksep="0"];
|
3
|
+
0 [color="black" fillcolor="green" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
4
|
+
1 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
5
|
+
2 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
6
|
+
3 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
7
|
+
4 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
8
|
+
5 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
9
|
+
6 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
10
|
+
7 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
11
|
+
8 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
12
|
+
9 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
13
|
+
10 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
14
|
+
11 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
15
|
+
12 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
16
|
+
13 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
17
|
+
14 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
18
|
+
15 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
19
|
+
0 -> 1 [arrowsize="0.7" label="RectalCancer:start"];
|
20
|
+
1 -> 2 [arrowsize="0.7" label="Consultation:start"];
|
21
|
+
2 -> 3 [arrowsize="0.7" label="Consultation:end"];
|
22
|
+
3 -> 4 [arrowsize="0.7" label="Endoscopy:start"];
|
23
|
+
4 -> 5 [arrowsize="0.7" label="Endoscopy:end"];
|
24
|
+
5 -> 6 [arrowsize="0.7" label="Biopsy:start"];
|
25
|
+
6 -> 7 [arrowsize="0.7" label="Biopsy:end"];
|
26
|
+
7 -> 8 [arrowsize="0.7" label="Staff:start"];
|
27
|
+
8 -> 9 [arrowsize="0.7" label="Staff:end"];
|
28
|
+
9 -> 10 [arrowsize="0.7" label="[not(m_plus)] / Radio:start"];
|
29
|
+
9 -> 11 [arrowsize="0.7" label="[m_plus] / Chimio:start"];
|
30
|
+
10 -> 12 [arrowsize="0.7" label="Radio:end"];
|
31
|
+
12 -> 13 [arrowsize="0.7" label="PostTreatment:start"];
|
32
|
+
13 -> 14 [arrowsize="0.7" label="PostTreatment:end"];
|
33
|
+
14 -> 15 [arrowsize="0.7" label="RectalCancer:end"];
|
34
|
+
11 -> 12 [arrowsize="0.7" label="Chimio:end"];
|
35
|
+
}
|
Binary file
|
@@ -0,0 +1,23 @@
|
|
1
|
+
digraph G {
|
2
|
+
graph[]
|
3
|
+
V0 [shape="circle" style="filled" fillcolor="black" fixed="true" width="0.1" label=""]
|
4
|
+
V1 [shape="circle" style="filled" fillcolor="black" fixed="true" width="0.1" label=""]
|
5
|
+
V2 [shape="box" label="Consultation"]
|
6
|
+
V3 [shape="box" label="Endoscopy"]
|
7
|
+
V4 [shape="box" label="Biopsy"]
|
8
|
+
V5 [shape="box" label="Staff"]
|
9
|
+
V6 [shape="diamond" label="m_plus"]
|
10
|
+
V7 [shape="box" label="Chimio"]
|
11
|
+
V8 [shape="box" label="Radio"]
|
12
|
+
V9 [shape="box" label="PostTreatment"]
|
13
|
+
V2 -> V3 []
|
14
|
+
V3 -> V4 []
|
15
|
+
V4 -> V5 []
|
16
|
+
V5 -> V6 []
|
17
|
+
V7 -> V9 []
|
18
|
+
V6 -> V7 [label="true"]
|
19
|
+
V8 -> V9 []
|
20
|
+
V6 -> V8 [label="false"]
|
21
|
+
V9 -> V1 []
|
22
|
+
V0 -> V2 []
|
23
|
+
}
|
Binary file
|
@@ -0,0 +1,48 @@
|
|
1
|
+
task Union
|
2
|
+
|
3
|
+
task RectalCancer
|
4
|
+
|
5
|
+
# Is the cancer metastased
|
6
|
+
trackvar m_plus
|
7
|
+
{Staff:end}
|
8
|
+
initially false
|
9
|
+
|
10
|
+
seq
|
11
|
+
Consultation
|
12
|
+
Endoscopy
|
13
|
+
Biopsy
|
14
|
+
Staff
|
15
|
+
if m_plus
|
16
|
+
Chimio
|
17
|
+
else
|
18
|
+
Radio
|
19
|
+
end
|
20
|
+
PostTreatment
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
task BreastCancer
|
25
|
+
|
26
|
+
# Is the cancer metastased
|
27
|
+
trackvar m_plus
|
28
|
+
{Staff:end}
|
29
|
+
initially false
|
30
|
+
|
31
|
+
seq
|
32
|
+
Consultation
|
33
|
+
Endoscopy
|
34
|
+
Staff
|
35
|
+
if m_plus
|
36
|
+
RadioChimio
|
37
|
+
else
|
38
|
+
Radio
|
39
|
+
end
|
40
|
+
PostTreatment
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
par
|
45
|
+
RectalCancer
|
46
|
+
PostTreatment
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'gisele-analysis'
|
2
|
+
|
3
|
+
def debug(wf, name)
|
4
|
+
where = (Path.dir/name)
|
5
|
+
where.mkdir_p
|
6
|
+
(where/"wf.dot").write(wf.to_dot)
|
7
|
+
glts = wf.to_glts
|
8
|
+
(where/"glts.dot").write(glts.to_dot)
|
9
|
+
deterministic = glts.determinize
|
10
|
+
(where/"deterministic.dot").write(deterministic.to_dot)
|
11
|
+
minimal = deterministic.minimize
|
12
|
+
(where/"minimal.dot").write(minimal.to_dot)
|
13
|
+
minimal
|
14
|
+
end
|
15
|
+
|
16
|
+
Gisele::Analysis.session do |s|
|
17
|
+
|
18
|
+
s.trackvar :breast, []
|
19
|
+
s.trackvar :m_plus, ["Staff:end"], false
|
20
|
+
|
21
|
+
wf1 = s.ghmsc do |g|
|
22
|
+
g.source = (Path.dir/"breast.gis").read
|
23
|
+
g.c0 = "breast"
|
24
|
+
end
|
25
|
+
|
26
|
+
wf2 = s.ghmsc do |g|
|
27
|
+
g.source = (Path.dir/"rectal.gis").read
|
28
|
+
g.c0 = "not(breast)"
|
29
|
+
end
|
30
|
+
|
31
|
+
g1 = debug(wf1, "breast")
|
32
|
+
g2 = debug(wf2, "rectal")
|
33
|
+
|
34
|
+
merged = g1 | g2
|
35
|
+
(Path.dir/"merged.dot").write(merged.to_dot)
|
36
|
+
minim = merged.minimize
|
37
|
+
(Path.dir/"minim.dot").write(minim.to_dot)
|
38
|
+
end
|
39
|
+
|
Binary file
|
@@ -0,0 +1,30 @@
|
|
1
|
+
digraph G {
|
2
|
+
graph [margin="0" pack="true" rankdir="LR" ranksep="0"];
|
3
|
+
0 [color="black" fillcolor="green" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
4
|
+
1 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
5
|
+
2 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
6
|
+
3 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
7
|
+
4 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
8
|
+
5 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
9
|
+
6 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
10
|
+
7 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
11
|
+
8 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
12
|
+
9 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
13
|
+
10 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
14
|
+
11 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
15
|
+
12 [color="black" fillcolor="white" fixedsize="true" height="0.6" shape="circle" style="filled" width="0.6"];
|
16
|
+
0 -> 1 [arrowsize="0.7" label="WhileExample:start"];
|
17
|
+
1 -> 2 [arrowsize="0.7" label="Consultation:start"];
|
18
|
+
2 -> 3 [arrowsize="0.7" label="Consultation:end"];
|
19
|
+
4 -> 6 [arrowsize="0.7" label="[bad] / Staff:end"];
|
20
|
+
6 -> 7 [arrowsize="0.7" label="[bad] / Consultation:start"];
|
21
|
+
7 -> 8 [arrowsize="0.7" label="[bad] / Consultation:end"];
|
22
|
+
3 -> 9 [arrowsize="0.7" label="[bad]"];
|
23
|
+
9 -> 4 [arrowsize="0.7" label="[bad] / Staff:start"];
|
24
|
+
3 -> 10 [arrowsize="0.7" label="[not(bad)]"];
|
25
|
+
10 -> 5 [arrowsize="0.7" label="[not(bad)] / WhileExample:end"];
|
26
|
+
8 -> 11 [arrowsize="0.7" label="[bad]"];
|
27
|
+
11 -> 4 [arrowsize="0.7" label="[bad] / Staff:start"];
|
28
|
+
8 -> 12 [arrowsize="0.7" label="[not(bad)]"];
|
29
|
+
12 -> 5 [arrowsize="0.7" label="[not(bad)] / WhileExample:end"];
|
30
|
+
}
|
Binary file
|
data/gisele.gemspec
CHANGED
@@ -125,12 +125,11 @@ Gem::Specification.new do |s|
|
|
125
125
|
#
|
126
126
|
s.add_development_dependency("rake", "~> 0.9.2")
|
127
127
|
s.add_development_dependency("rspec", "~> 2.11")
|
128
|
-
s.add_dependency("path", "~> 1.
|
128
|
+
s.add_dependency("path", "~> 1.3")
|
129
129
|
s.add_dependency("quickl", "~> 0.4.3")
|
130
130
|
s.add_dependency("awesome_print", "~> 1.0")
|
131
131
|
s.add_dependency("yargi", "~> 0.2.0")
|
132
|
-
s.add_dependency("
|
133
|
-
s.add_dependency("gisele-language", "~> 0.5.0")
|
132
|
+
s.add_dependency("gisele-analysis", "~> 0.6.0")
|
134
133
|
|
135
134
|
# The version of ruby required by this gem
|
136
135
|
#
|
data/gisele.noespec
CHANGED
@@ -10,7 +10,7 @@ variables:
|
|
10
10
|
upper:
|
11
11
|
Gisele
|
12
12
|
version:
|
13
|
-
0.
|
13
|
+
0.6.0
|
14
14
|
summary: |-
|
15
15
|
Gisele is a Process Analyzer Toolset
|
16
16
|
description: |-
|
@@ -21,11 +21,10 @@ variables:
|
|
21
21
|
links:
|
22
22
|
- https://github.com/blambeau/gisele
|
23
23
|
dependencies:
|
24
|
-
- {name: path, version: "~> 1.
|
24
|
+
- {name: path, version: "~> 1.3", groups: [runtime]}
|
25
25
|
- {name: quickl, version: "~> 0.4.3", groups: [runtime]}
|
26
26
|
- {name: awesome_print, version: "~> 1.0", groups: [runtime]}
|
27
27
|
- {name: yargi, version: "~> 0.2.0", groups: [runtime]}
|
28
|
-
- {name:
|
29
|
-
- {name: gisele-language, version: "~> 0.5.0", groups: [runtime]}
|
28
|
+
- {name: gisele-analysis, version: "~> 0.6.0", groups: [runtime]}
|
30
29
|
- {name: rake, version: "~> 0.9.2", groups: [development]}
|
31
30
|
- {name: rspec, version: "~> 2.11", groups: [development]}
|
data/lib/gisele.rb
CHANGED
data/lib/gisele/command.rb
CHANGED
@@ -50,6 +50,19 @@ module Gisele
|
|
50
50
|
@compile_mode = [:glts, (value || "dot").to_sym]
|
51
51
|
end
|
52
52
|
|
53
|
+
opt.on('-d', '--deterministic',
|
54
|
+
'Determinize gtls output?') do
|
55
|
+
@determinize = true
|
56
|
+
end
|
57
|
+
opt.on('-e', '--explicit',
|
58
|
+
'Explicit guards in gtls output?') do
|
59
|
+
@explicit = true
|
60
|
+
end
|
61
|
+
opt.on('-s', '--separate',
|
62
|
+
'Split guards from events in glts output?') do
|
63
|
+
@separate = true
|
64
|
+
end
|
65
|
+
|
53
66
|
opt.on_tail('--help', "Show this help message") do
|
54
67
|
raise Quickl::Help
|
55
68
|
end
|
@@ -81,17 +94,26 @@ module Gisele
|
|
81
94
|
end
|
82
95
|
|
83
96
|
def compile_graph(ast, option)
|
84
|
-
|
85
|
-
|
86
|
-
puts graph.to_dot
|
87
|
-
end
|
97
|
+
graph = Analysis::Compiling::Ast2Graph.call(ast)
|
98
|
+
puts graph.to_dot
|
88
99
|
end
|
89
100
|
|
90
|
-
def compile_glts(ast,
|
91
|
-
|
92
|
-
glts.
|
93
|
-
|
101
|
+
def compile_glts(ast, mode)
|
102
|
+
session = Analysis::Compiling::Ast2Session.call(ast)
|
103
|
+
glts = Analysis::Compiling::Ast2Glts.call(session, ast)
|
104
|
+
glts = glts.determinize if @determinize
|
105
|
+
glts = glts.separate if @separate
|
106
|
+
glts = glts.explicit_guards! if @explicit
|
107
|
+
case mode
|
108
|
+
when :dot then puts glts.to_dot
|
109
|
+
when :ruby then puts glts.to_ruby_literal
|
110
|
+
when :text then puts glts.to_relation.to_text
|
111
|
+
when :rash then puts glts.to_relation.to_rash
|
112
|
+
else
|
113
|
+
raise "Unrecognized --glts output mode `mode`"
|
94
114
|
end
|
115
|
+
ensure
|
116
|
+
session.close if session
|
95
117
|
end
|
96
118
|
|
97
119
|
end # class Command
|