tla2dot 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +44 -39
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50c54151b6154f68628b515e39cfc4a2b9714914
|
4
|
+
data.tar.gz: de102d5ee02409b0c686b1bc7b50d2aa2e4a357d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccffaaf96aa5082d680e00e33260f89ba73a8794ab2adb897e3433821ff2554cb25f3aa02b58b4c3e5320dcad68744bf3d042d24073a75e98a2e4aa49bae66d5
|
7
|
+
data.tar.gz: 58794be3c9fce175ca81d0bd18d55a6fe574e211a7537cf255f387255da21c77008e82c57dc07fee25462d30ac6cf57343f3f7cc67f0975a98180fb36f60b54a
|
data/README.md
CHANGED
@@ -2,13 +2,14 @@
|
|
2
2
|
[Up](../index.php) [Readme](README.html) [Releases](RELEASES.html) [Todo](TODO.html)
|
3
3
|
|
4
4
|
|
5
|
-
# tladot - Utility to convert tlc/tlaplus state space to graphviz - $Release:0.0.
|
5
|
+
# tladot - Utility to convert tlc/tlaplus state space to graphviz - $Release:0.0.5$
|
6
6
|
|
7
|
-
A utility to convert state space dump created by
|
7
|
+
A utility to convert state space dump created by
|
8
|
+
[patched](https://github.com/jarjuk/tla2dot/blob/master/tla2dot.patch)
|
9
|
+
[tlaplus TLC](http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html)
|
10
|
+
in
|
8
11
|
[TLA toolbox](http://research.microsoft.com/en-us/um/people/lamport/tla/toolbox.html)
|
9
|
-
|
10
|
-
[tlaplus](http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html)
|
11
|
-
to [graphviz](www.graphviz.org) dot format.
|
12
|
+
to [graphviz](http://www.graphviz.org) dot format.
|
12
13
|
|
13
14
|
|
14
15
|
## Usage
|
@@ -26,76 +27,80 @@ and change the working directory
|
|
26
27
|
|
27
28
|
### Running the patced TLC version to create state dump
|
28
29
|
|
29
|
-
Create a TLA model
|
30
|
-
`
|
30
|
+
Create a TLA model files. The example below uses files `DieHard.tla`, and
|
31
|
+
`DieHard.cfg`, in directory `model`
|
31
32
|
|
32
|
-
Set up
|
33
|
+
Set up environment variable CP to poinnt the patched `tla2tools.jar`
|
34
|
+
in directory `java`
|
33
35
|
|
34
36
|
export CP=$(pwd)/java/org.lamport.tlatools-1.0.1-SNAPSHOT.jar
|
35
37
|
|
36
|
-
|
38
|
+
Run the TLA model, and generate a dump file
|
39
|
+
`../examples/DieHard-patched.dump` using the command
|
37
40
|
|
38
|
-
|
41
|
+
(cd model; java -cp $CP tlc2.TLC -dump ../examples/DieHard-patched.dump DieHard)
|
39
42
|
|
40
|
-
The
|
41
|
-
|
43
|
+
The
|
44
|
+
[patched](https://github.com/jarjuk/tla2dot/blob/master/tla2dot.patch)
|
45
|
+
TLC command adds fingerprint and transition information to the dump
|
46
|
+
file. For example, to show the difference of
|
47
|
+
[non-patched dump file](examples/DieHard-orig.dump), and the
|
48
|
+
[patched dump file](examples/DieHard-patched.dump) use the command
|
42
49
|
|
50
|
+
diff examples/DieHard-orig.dump examples/DieHard-patched.dump
|
43
51
|
|
44
|
-
|
45
|
-
the [patched dump file](examples/customer1-patched.dump) for a TLA model may show
|
52
|
+
and observe diff starting
|
46
53
|
|
47
54
|
```
|
48
55
|
1c1
|
49
56
|
< State 1:
|
50
57
|
---
|
51
|
-
> State 1
|
52
|
-
|
58
|
+
> State 1/1721042995228635026:
|
59
|
+
5c5
|
53
60
|
< State 2:
|
54
61
|
---
|
55
|
-
> State 2
|
56
|
-
|
62
|
+
> State 2/8981770525750446274:
|
63
|
+
9c9,11
|
57
64
|
< State 3:
|
58
65
|
---
|
59
|
-
> Transition
|
66
|
+
> Transition 1721042995228635026 --> 8981770525750446274
|
60
67
|
>
|
61
|
-
> State 3/-
|
62
|
-
|
68
|
+
> State 3/-7007095103426876375:
|
69
|
+
13c15,27
|
63
70
|
< State 4:
|
64
71
|
---
|
65
|
-
> Transition
|
72
|
+
> Transition 1721042995228635026 --> -7007095103426876375
|
66
73
|
>
|
67
|
-
>
|
68
|
-
95a100,103
|
74
|
+
> Transition 1721042995228635026 --> 1721042995228635026
|
69
75
|
>
|
70
|
-
> Transition
|
71
|
-
>
|
72
|
-
> Transition 3141097224850855796 --> 3141097224850855796
|
76
|
+
> Transition 1721042995228635026 --> 1721042995228635026
|
73
77
|
```
|
74
78
|
|
75
79
|
### Create dot file
|
76
80
|
|
77
|
-
To create a dot file for a patched state-dump in
|
81
|
+
To create a dot file for a patched state-dump in
|
82
|
+
`examples/customer1-patched.dump`, run
|
78
83
|
|
79
|
-
bin/tla2dot.rb graph examples/
|
84
|
+
bin/tla2dot.rb graph examples/DieHard-patched.dump >tmp/dump.dot
|
80
85
|
|
81
|
-
and to convert it to a
|
86
|
+
and to convert it to a svg diagran, run
|
82
87
|
|
83
88
|
dot -T svg tmp/dump.dot >tmp/dump.svg
|
84
89
|
|
85
|
-
Command `graph`
|
86
|
-
nodes. For example,
|
87
|
-
|
88
|
-
bin/tla2dot.rb graph examples/customer1-patched.dump now,step >tmp/dump.dot
|
89
|
-
|
90
|
-
State identity is referenced using variable name `ID`.
|
90
|
+
Command `graph` accepts optionally a list of variables to include in
|
91
|
+
state nodes. For example, to show variables `big,small` in the example,
|
92
|
+
use the command
|
91
93
|
|
94
|
+
bin/tla2dot.rb graph examples/DieHard-patched.dump big,small >tmp/dump.dot
|
92
95
|
|
93
|
-
|
96
|
+
State identity is referenced using a pseudo variable `ID`:
|
94
97
|
|
95
|
-
|
98
|
+
bin/tla2dot.rb graph examples/DieHard-patched.dump ID,big,small >tmp/dump.dot
|
96
99
|
|
97
|
-
|
100
|
+
and all variables can be included in the graph using value `TRUE` for
|
101
|
+
variable list
|
98
102
|
|
103
|
+
bin/tla2dot.rb graph examples/DieHard-patched.dump TRUE >tmp/dump.dot
|
99
104
|
|
100
105
|
|
101
106
|
## <a id="INSTALLATION">Installation</a>
|