tla2dot 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +44 -39
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 355e281670cfc51d37cfc795e160ba73e3977c11
4
- data.tar.gz: 3432ad2922ea1f5db216fa66c4d12cea75a9ee52
3
+ metadata.gz: 50c54151b6154f68628b515e39cfc4a2b9714914
4
+ data.tar.gz: de102d5ee02409b0c686b1bc7b50d2aa2e4a357d
5
5
  SHA512:
6
- metadata.gz: ed786e9c8da322f234935eeb761d7b7d4f654db37285f5ca6447528fd1e9e2093d0f575928dbd2c5cba40b06025759a098bb353dd000044f3c1e24d3a02a2793
7
- data.tar.gz: 82990ce4e46ef527a7e23bc8369b7817812ae690d27a42e7f5252135ca6f3efcfcbc39fb04e0e19313d1e6407f810fc777ca1979210422b4559d4b0c74f610f9
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.3$
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 [patched](https://gist.github.com/4359ee94e58d25817a95) TLC tool in
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
- of
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 in directory `model` 'in files `setup.tla`,
30
- `setup.cfg`, and `model.tla`
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 environment CP to poinnt the patched tla2tools.jar in directory java
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
- Create a `../examples/customer1-patched.dump setup` for the TLA model using the command
38
+ Run the TLA model, and generate a dump file
39
+ `../examples/DieHard-patched.dump` using the command
37
40
 
38
- (cd model; java -cp $CP tlc2.TLC -dump ../examples/customer1-patched.dump setup)
41
+ (cd model; java -cp $CP tlc2.TLC -dump ../examples/DieHard-patched.dump DieHard)
39
42
 
40
- The [patch](https://gist.github.com/4359ee94e58d25817a95) adds fingerprint
41
- and transition information to the dump file created using [`-dump` option](http://research.microsoft.com/en-us/um/people/lamport/tla/current-tools.pdf).
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
- For example, difference of [non-patched dump file](examples/customer1-orig.dump), and
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/-2710668386619955114:
52
- 25c25
58
+ > State 1/1721042995228635026:
59
+ 5c5
53
60
  < State 2:
54
61
  ---
55
- > State 2/-2906287262858016143:
56
- 60c60,62
62
+ > State 2/8981770525750446274:
63
+ 9c9,11
57
64
  < State 3:
58
65
  ---
59
- > Transition -2710668386619955114 --> -2906287262858016143
66
+ > Transition 1721042995228635026 --> 8981770525750446274
60
67
  >
61
- > State 3/-5306425081709262628:
62
- 84c86,88
68
+ > State 3/-7007095103426876375:
69
+ 13c15,27
63
70
  < State 4:
64
71
  ---
65
- > Transition -2906287262858016143 --> -5306425081709262628
72
+ > Transition 1721042995228635026 --> -7007095103426876375
66
73
  >
67
- > State 4/3141097224850855796:
68
- 95a100,103
74
+ > Transition 1721042995228635026 --> 1721042995228635026
69
75
  >
70
- > Transition -5306425081709262628 --> 3141097224850855796
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 `examples/customer1-patched.dump` run
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/customer1-patched.dump >tmp/dump.dot
84
+ bin/tla2dot.rb graph examples/DieHard-patched.dump >tmp/dump.dot
80
85
 
81
- and to convert it to a graph
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` takes in a list of variables to include in state
86
- nodes. For example, in the example model show variables `now,step` use the command
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
- bin/tla2dot.rb graph examples/customer1-patched.dump ID,now,step >tmp/dump.dot
96
+ State identity is referenced using a pseudo variable `ID`:
94
97
 
95
- and all variables can be show using value `TRUE`
98
+ bin/tla2dot.rb graph examples/DieHard-patched.dump ID,big,small >tmp/dump.dot
96
99
 
97
- bin/tla2dot.rb graph examples/customer1-patched.dump TRUE >tmp/dump.dot
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>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tla2dot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - jarjuk