everystate 0.4.2 → 0.4.4

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.
package/README.md CHANGED
@@ -1,7 +1,9 @@
1
1
  # everystate
2
2
 
3
- A TLA+ model checker with no Java dependency, written in Rust. It reads ordinary `.tla` specs and
4
- TLC `.cfg` files, checks every reachable state, and reports results in TLC's format.
3
+ A lightning-fast TLA+ model checker. It reads `.tla` specs and TLC `.cfg` files, checks every
4
+ reachable state, and reports results in TLC's format. No Java needed.
5
+
6
+ Find race conditions, deadlocks and lost updates in your design before they reach your code.
5
7
 
6
8
  ```text
7
9
  > use everystate's formal verification skill to find race conditions in my amazing software
@@ -232,37 +234,44 @@ Real TLC is the reference (details in [CONFORMANCE.md](CONFORMANCE.md)):
232
234
 
233
235
  - [tlaplus/Examples](https://github.com/tlaplus/Examples), models up to 5 s: 122 of 122 match on
234
236
  result and exact state counts.
235
- - TLC's own `test-model` suite, run side by side with `tla2tools.jar`: 383 of 414 match.
237
+ - TLC's own `test-model` suite, run side by side with `tla2tools.jar`: 389 of 414 match.
236
238
  - pstack `statechart` corpus: 33 of 33 outputs byte-identical.
237
239
 
238
240
  ## Speed
239
241
 
240
- Wall-clock seconds for the whole process on a 4-core Linux machine, median of 3, against Java TLC
241
- and [tla-ts](https://github.com/aidenybai/tla-ts) 0.0.10 (run by Node). The first three models are
242
- tla-ts's own benchmarks. All three checkers report the same state counts.
243
-
244
- | Model | Distinct states | everystate | tla-ts | TLC |
245
- |---|---:|---:|---:|---:|
246
- | Commit | 282,251 | 3.49 | 5.83 | 6.69 |
247
- | Philosophers | 128,889 | 0.79 | 1.75 | 2.01 |
248
- | Queue | 44,044 | 0.08 | 0.52 | 0.89 |
249
- | Paxos | 1,207 | 0.72 | 4.31 | 1.81 |
250
- | MCBakery | 655,200 | 7.29 | 16.34 | 10.65 |
251
- | MCLamportMutex | 724,274 | 10.48 | 21.57 | 14.18 |
252
- | MCbtree | 374,727 | 10.43 | 13.41 | 30.75 |
253
- | MCLamportMutex, 4 workers | 724,274 | 3.28 | 20.87 | 9.08 |
254
- | MCbtree, 4 workers | 374,727 | 3.88 | 14.30 | 11.71 |
255
- | 122 tlaplus/Examples models | | 43.1 | 151.1 | 179.6 |
256
-
257
- With one worker everystate is 1.3x to 6.7x faster than tla-ts and 1.2x to 11.6x faster than TLC on
258
- the 14 models that run long enough to measure, and uses less memory than TLC on all of them. All 15
259
- models, four-worker results, memory and the method are in [BENCHMARK.md](BENCHMARK.md).
242
+ Wall-clock seconds for the whole process on a 4-core Linux machine, median of 3, against
243
+ [tlc-rs](https://github.com/polvi/tlc-rs) (a Rust port of TLC's safety checking),
244
+ [tla-ts](https://github.com/aidenybai/tla-ts) 0.0.10 (run by Node) and Java TLC. The first three
245
+ models are tla-ts's own benchmarks. A dash means the checker does not support the model or the worker
246
+ option. Every checker that completes a model reports the same state counts.
247
+
248
+ | Model | Distinct states | everystate | tlc-rs | tla-ts | TLC |
249
+ |---|---:|---:|---:|---:|---:|
250
+ | Commit | 282,251 | 4.14 | 13.44 | 6.76 | 7.20 |
251
+ | Philosophers | 128,889 | 0.83 | 3.64 | 2.12 | 2.33 |
252
+ | Queue | 44,044 | 0.08 | 0.27 | 0.55 | 0.94 |
253
+ | Paxos | 1,207 | 0.95 | - | 6.47 | 2.25 |
254
+ | MCBakery | 655,200 | 8.29 | - | 20.86 | 13.26 |
255
+ | MCLamportMutex | 724,274 | 13.78 | 41.26 | 27.80 | 17.31 |
256
+ | MCbtree | 374,727 | 12.47 | - | 17.95 | 34.86 |
257
+ | MCLamportMutex, 4 workers | 724,274 | 3.66 | - | 25.15 | 10.70 |
258
+ | MCbtree, 4 workers | 374,727 | 4.34 | - | 17.43 | 12.78 |
259
+ | 122 tlaplus/Examples models: total seconds | | 46.8 | - | 180.1 | 203.3 |
260
+ | 122 tlaplus/Examples models: correct | | 122 | 39 | 116 | 122 |
261
+
262
+ With one worker everystate is the fastest of the four on every model that runs long enough to measure:
263
+ 3.0x to 11.4x faster than tlc-rs, 1.4x to 6.8x faster than tla-ts and 1.2x to 11.3x faster than TLC.
264
+ tlc-rs uses the least memory on the models it supports. All 15 models, four-worker results, memory and
265
+ the method are in [BENCHMARK.md](BENCHMARK.md).
260
266
 
261
267
  ## Not supported
262
268
 
263
269
  Disk-backed state storage (everything is in memory, so a few
264
- million distinct states is the practical limit), Java module overrides, labels and subexpression selectors, and TLAPS proof checking (proofs
265
- are parsed and skipped).
270
+ million distinct states is the practical limit), Java module overrides, and TLAPS proof checking (proofs
271
+ are parsed and skipped). Labels and subexpression selectors (`Op!lab(x)`, `Op!2`, `Op!<<`, `Op!@`, `Op!(x)`) work
272
+ except in a few rare forms, which are reported as errors: a selector applied to an operator defined in a LET or
273
+ in a standard module, the left operand of `a /\ b /\ c` written without parentheses, the argument tuple of
274
+ `f[a, b]`, and the body of a recursive function definition (`docs/TLC_NOTES.md`, section 12).
266
275
 
267
276
  ## Development
268
277
 
@@ -271,6 +280,8 @@ npm run build # native binary and wasm/everystate.wasm
271
280
  npm test # WASM API, pretty-printer and community-module tests
272
281
  ```
273
282
 
283
+ How the code is organised, the rules that keep it sound and how to debug it: [ARCHITECTURE.md](ARCHITECTURE.md).
284
+
274
285
  Releases use [changesets](.changeset/README.md): add one with `npx changeset` in your pull request,
275
286
  then merge the "Version Packages" pull request that appears. That bumps `package.json` and
276
287
  `Cargo.toml`, and `.github/workflows/release.yml` builds the binaries and publishes to npm and
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "everystate",
3
- "version": "0.4.2",
4
- "description": "A TLA+ model checker with no Java dependency (TLC-compatible). Prebuilt native binaries, with a WebAssembly build for use from JavaScript.",
3
+ "version": "0.4.4",
4
+ "description": "A lightning-fast TLA+ model checker (TLC-compatible, no Java needed). Prebuilt native binaries, with a WebAssembly build for use from JavaScript.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "wasm/everystate.mjs",
@@ -29,13 +29,14 @@
29
29
  "scripts": {
30
30
  "build": "cargo build --release && sh wasm/build.sh",
31
31
  "test": "node --experimental-strip-types --no-warnings --test test/*.test.ts && node test/community.mjs && node test/workers.mjs",
32
- "conformance:examples": "node scripts/conformance.mjs",
33
- "conformance:tlc": "node scripts/diff-tlc.mjs",
34
- "conformance:statechart": "node scripts/statechart-corpus.mjs",
35
- "conformance:pcal": "node scripts/pcal-corpus.mjs",
36
- "bench": "node scripts/bench.mjs",
32
+ "conformance:examples": "node scripts/gates/conformance.mjs",
33
+ "conformance:tlc": "node scripts/gates/diff-tlc.mjs",
34
+ "conformance:statechart": "node scripts/gates/statechart-corpus.mjs",
35
+ "conformance:pcal": "node scripts/gates/pcal-corpus.mjs",
36
+ "gates": "node scripts/gates.mjs",
37
+ "bench": "node scripts/bench/bench.mjs",
37
38
  "changeset": "changeset",
38
- "version": "changeset version && node scripts/sync-version.mjs"
39
+ "version": "changeset version && node scripts/release/sync-version.mjs"
39
40
  },
40
41
  "engines": {
41
42
  "node": ">=20"
Binary file