everystate 0.4.0 → 0.4.2

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
@@ -220,10 +220,11 @@ everystate [options] SPEC[.tla]
220
220
  Exit status: 0 success, 10 assumption, 11 deadlock, 12 safety, 13 liveness, 150 parse error,
221
221
  151 config error.
222
222
 
223
- Environment: `EVERYSTATE_EVAL=tree` evaluates with the tree-walking interpreter alone (the default
224
- compiles actions and invariants first and gives the same results). `EVERYSTATE_STEP_CACHE=on` turns
225
- on an experimental cache of local steps, a fixed-size table of `EVERYSTATE_STEP_CACHE_MB` megabytes
226
- per worker (default 32): faster on models made of many small independent steps, slower on some others.
223
+ Environment: actions and invariants are compiled before the search, and a cache of local steps
224
+ reuses work between states that agree on what a step reads (a fixed-size table, 32 MB per worker,
225
+ `EVERYSTATE_STEP_CACHE_MB`; used only where it measures faster during the run). Results are the
226
+ same either way. `EVERYSTATE_STEP_CACHE=off` turns the cache off; `EVERYSTATE_EVAL=tree` uses the
227
+ tree-walking interpreter alone.
227
228
 
228
229
  ## How it is checked
229
230
 
@@ -234,8 +235,28 @@ Real TLC is the reference (details in [CONFORMANCE.md](CONFORMANCE.md)):
234
235
  - TLC's own `test-model` suite, run side by side with `tla2tools.jar`: 383 of 414 match.
235
236
  - pstack `statechart` corpus: 33 of 33 outputs byte-identical.
236
237
 
237
- Faster than single-worker Java TLC on all 12 benchmark models (1.1x to 4.6x, thin on three of
238
- them), with near-instant start-up: [BENCHMARK.md](BENCHMARK.md).
238
+ ## Speed
239
+
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).
239
260
 
240
261
  ## Not supported
241
262
 
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "everystate",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "A TLA+ model checker with no Java dependency (TLC-compatible). Prebuilt native binaries, with a WebAssembly build for use from JavaScript.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/wasm/cli.mjs CHANGED
@@ -54,6 +54,6 @@ try {
54
54
  const codes = { ok: 0, assumption: 10, deadlock: 11, invariant: 12, 'invariant-init': 12, 'action-property': 13, 'implied-init': 13, liveness: 13, incomplete: 75 };
55
55
  process.exitCode = codes[result.status] ?? 255;
56
56
  } catch (e) {
57
- console.log(JSON.stringify({ status: 'setup-error', message: e.message }));
58
- process.exit(150);
57
+ console.log(JSON.stringify({ status: 'setup-error', kind: e.kind, message: e.message }));
58
+ process.exit(e.kind === 'config' ? 151 : 150); // as the native binary: 151 for the configuration, 150 for the spec
59
59
  }
Binary file