pi-t3-pstack 0.0.0-stage → 0.1.0
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/LICENSE +23 -0
- package/index.ts +87 -0
- package/package.json +62 -4
- package/pstack/.claude-plugin/icon.png +0 -0
- package/pstack/.claude-plugin/plugin.json +35 -0
- package/pstack/.codex-plugin/plugin.json +50 -0
- package/pstack/README.md +26 -0
- package/pstack/agents/comment-sicko.md +32 -0
- package/pstack/agents/poteto-agent.md +8 -0
- package/pstack/agents/thermo-nuclear-code-quality-review-subagent.md +23 -0
- package/pstack/agents/thermo-nuclear-review-subagent.md +28 -0
- package/pstack/assets/pstack-icon.png +0 -0
- package/pstack/assets/pstack-icon.prompt.txt +8 -0
- package/pstack/hooks/codex-hooks.json +16 -0
- package/pstack/hooks/hooks.json +15 -0
- package/pstack/hooks/session-start-context.md +17 -0
- package/pstack/hooks/session-start.ps1 +33 -0
- package/pstack/hooks/session-start.sh +34 -0
- package/pstack/models.json +261 -0
- package/pstack/skills/architect/SKILL.md +85 -0
- package/pstack/skills/architect/references/design-red-flags.md +57 -0
- package/pstack/skills/architect/references/rationale-template.md +35 -0
- package/pstack/skills/architect/references/runner-prompt.md +20 -0
- package/pstack/skills/arena/SKILL.md +55 -0
- package/pstack/skills/automate-me/SKILL.md +104 -0
- package/pstack/skills/benchmark-checklist/SKILL.md +39 -0
- package/pstack/skills/blast-radius/SKILL.md +50 -0
- package/pstack/skills/bro/SKILL.md +7 -0
- package/pstack/skills/correct/SKILL.md +32 -0
- package/pstack/skills/create-formal-verification-skill/SKILL.md +43 -0
- package/pstack/skills/create-verification-skill/SKILL.md +44 -0
- package/pstack/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
- package/pstack/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
- package/pstack/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
- package/pstack/skills/deslop/SKILL.md +22 -0
- package/pstack/skills/figure-it-out/SKILL.md +52 -0
- package/pstack/skills/fix-ci/SKILL.md +29 -0
- package/pstack/skills/fix-merge-conflicts/SKILL.md +32 -0
- package/pstack/skills/get-pr-comments/SKILL.md +23 -0
- package/pstack/skills/how/SKILL.md +43 -0
- package/pstack/skills/how/references/explainer-prompt.md +55 -0
- package/pstack/skills/how/references/explorer-prompt.md +35 -0
- package/pstack/skills/in-your-own-words/SKILL.md +7 -0
- package/pstack/skills/interrogate/SKILL.md +37 -0
- package/pstack/skills/ketchup/SKILL.md +43 -0
- package/pstack/skills/ketchup-video/SKILL.md +29 -0
- package/pstack/skills/maintain-formal-verification-skill/SKILL.md +58 -0
- package/pstack/skills/maintain-verification-skill/SKILL.md +39 -0
- package/pstack/skills/make-pr-easy-to-review/SKILL.md +59 -0
- package/pstack/skills/no-comments/SKILL.md +24 -0
- package/pstack/skills/poteto-help/SKILL.md +162 -0
- package/pstack/skills/poteto-help/references/prompting.md +51 -0
- package/pstack/skills/poteto-help/references/recipes.md +51 -0
- package/pstack/skills/poteto-mode/SKILL.md +186 -0
- package/pstack/skills/poteto-mode/brief.md +70 -0
- package/pstack/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
- package/pstack/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
- package/pstack/skills/poteto-mode/playbooks/autopilot-full.md +25 -0
- package/pstack/skills/poteto-mode/playbooks/autopilot-stack.md +8 -0
- package/pstack/skills/poteto-mode/playbooks/babysit.md +23 -0
- package/pstack/skills/poteto-mode/playbooks/bug-fix.md +15 -0
- package/pstack/skills/poteto-mode/playbooks/eval.md +25 -0
- package/pstack/skills/poteto-mode/playbooks/feature.md +21 -0
- package/pstack/skills/poteto-mode/playbooks/hillclimb.md +21 -0
- package/pstack/skills/poteto-mode/playbooks/investigation.md +14 -0
- package/pstack/skills/poteto-mode/playbooks/multi-phase-plan.md +155 -0
- package/pstack/skills/poteto-mode/playbooks/opening-a-pr.md +34 -0
- package/pstack/skills/poteto-mode/playbooks/orchestrate.md +25 -0
- package/pstack/skills/poteto-mode/playbooks/pause-safely.md +10 -0
- package/pstack/skills/poteto-mode/playbooks/perf-issue.md +25 -0
- package/pstack/skills/poteto-mode/playbooks/prototype.md +14 -0
- package/pstack/skills/poteto-mode/playbooks/refactoring.md +16 -0
- package/pstack/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
- package/pstack/skills/poteto-mode/playbooks/session-pickup.md +11 -0
- package/pstack/skills/poteto-mode/playbooks/shipping.md +12 -0
- package/pstack/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
- package/pstack/skills/poteto-mode/playbooks/visual-parity.md +11 -0
- package/pstack/skills/poteto-mode/playbooks/worktree-cleanup.md +12 -0
- package/pstack/skills/poteto-mode/references/bugbot-triage.md +142 -0
- package/pstack/skills/poteto-mode/references/licenses/LICENSE +23 -0
- package/pstack/skills/poteto-mode/references/licenses/LICENSE-cursor-team-kit +21 -0
- package/pstack/skills/poteto-mode/references/licenses/LICENSE-thermos +21 -0
- package/pstack/skills/poteto-mode/references/licenses/NOTICE.md +14 -0
- package/pstack/skills/poteto-mode/scripts/.prettierrc.json +3 -0
- package/pstack/skills/poteto-mode/scripts/bootstrap.ts +62 -0
- package/pstack/skills/poteto-mode/scripts/bun.lock +67 -0
- package/pstack/skills/poteto-mode/scripts/check-plan.mjs +205 -0
- package/pstack/skills/poteto-mode/scripts/check-plan.test.ts +110 -0
- package/pstack/skills/poteto-mode/scripts/package.json +12 -0
- package/pstack/skills/poteto-mode/scripts/resolve-codex-transcript +4 -0
- package/pstack/skills/poteto-mode/scripts/resolve-codex-transcript.ts +314 -0
- package/pstack/skills/poteto-mode/scripts/test-utils/node-test.ts +204 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/cli.test.ts +225 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/cli.ts +231 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +142 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/github.test.ts +498 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/github.ts +760 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/policy.test.ts +483 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/policy.ts +1023 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/render.ts +188 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/settle.test.ts +552 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/settle.ts +406 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/tsconfig.json +18 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/types.compile.ts +93 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/types.ts +444 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/verdicts.test.ts +796 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/watch-pr +3 -0
- package/pstack/skills/poteto-mode/scripts/worktree-audit.sh +170 -0
- package/pstack/skills/principle-attack-the-premise/SKILL.md +21 -0
- package/pstack/skills/principle-boundary-discipline/SKILL.md +34 -0
- package/pstack/skills/principle-build-the-lever/SKILL.md +23 -0
- package/pstack/skills/principle-encode-lessons-in-structure/SKILL.md +11 -0
- package/pstack/skills/principle-exhaust-the-design-space/SKILL.md +9 -0
- package/pstack/skills/principle-experience-first/SKILL.md +19 -0
- package/pstack/skills/principle-explain-the-number/SKILL.md +18 -0
- package/pstack/skills/principle-fix-root-causes/SKILL.md +21 -0
- package/pstack/skills/principle-foundational-thinking/SKILL.md +21 -0
- package/pstack/skills/principle-guard-the-context-window/SKILL.md +12 -0
- package/pstack/skills/principle-laziness-protocol/SKILL.md +10 -0
- package/pstack/skills/principle-make-operations-idempotent/SKILL.md +22 -0
- package/pstack/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +14 -0
- package/pstack/skills/principle-minimize-reader-load/SKILL.md +18 -0
- package/pstack/skills/principle-model-the-domain/SKILL.md +24 -0
- package/pstack/skills/principle-never-block-on-the-human/SKILL.md +15 -0
- package/pstack/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
- package/pstack/skills/principle-prove-it-works/SKILL.md +22 -0
- package/pstack/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
- package/pstack/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
- package/pstack/skills/principle-sequence-verifiable-units/SKILL.md +17 -0
- package/pstack/skills/principle-subtract-before-you-add/SKILL.md +18 -0
- package/pstack/skills/principle-test-behavior-not-implementation/SKILL.md +20 -0
- package/pstack/skills/principle-type-system-discipline/SKILL.md +13 -0
- package/pstack/skills/recall/SKILL.md +35 -0
- package/pstack/skills/reflect/SKILL.md +86 -0
- package/pstack/skills/reflect/references/divergent-reviewer.md +38 -0
- package/pstack/skills/reflect/references/judgment-reviewer.md +37 -0
- package/pstack/skills/reflect/references/synthesizer.md +56 -0
- package/pstack/skills/reflect/references/tooling-reviewer.md +48 -0
- package/pstack/skills/reflect/scripts/find-transcript.mjs +245 -0
- package/pstack/skills/setup-pstack/SKILL.md +77 -0
- package/pstack/skills/setup-pstack/scripts/read-sheet.sh +14 -0
- package/pstack/skills/setup-pstack/scripts/t3-sheet.mjs +169 -0
- package/pstack/skills/sharpen/SKILL.md +16 -0
- package/pstack/skills/show-me-your-work/SKILL.md +82 -0
- package/pstack/skills/show-me-your-work/references/decision-log-template.tsv +1 -0
- package/pstack/skills/show-me-your-work/scripts/log.sh +42 -0
- package/pstack/skills/statechart/SKILL.md +82 -0
- package/pstack/skills/statechart/references/render.md +93 -0
- package/pstack/skills/statechart/scripts/backends/cfg.ts +33 -0
- package/pstack/skills/statechart/scripts/backends/mermaid.ts +201 -0
- package/pstack/skills/statechart/scripts/backends/plain-text.ts +72 -0
- package/pstack/skills/statechart/scripts/backends/report.ts +177 -0
- package/pstack/skills/statechart/scripts/frontends/config.ts +276 -0
- package/pstack/skills/statechart/scripts/frontends/dot.ts +74 -0
- package/pstack/skills/statechart/scripts/frontends/marks.ts +93 -0
- package/pstack/skills/statechart/scripts/frontends/messages.ts +52 -0
- package/pstack/skills/statechart/scripts/frontends/spec.ts +114 -0
- package/pstack/skills/statechart/scripts/frontends/trace.ts +24 -0
- package/pstack/skills/statechart/scripts/frontends/value.ts +166 -0
- package/pstack/skills/statechart/scripts/frontends/verdict.ts +40 -0
- package/pstack/skills/statechart/scripts/frontends/view.ts +119 -0
- package/pstack/skills/statechart/scripts/ir.ts +547 -0
- package/pstack/skills/statechart/scripts/package.json +11 -0
- package/pstack/skills/statechart/scripts/passes/annotate.ts +128 -0
- package/pstack/skills/statechart/scripts/passes/label.ts +269 -0
- package/pstack/skills/statechart/scripts/passes/lift.ts +85 -0
- package/pstack/skills/statechart/scripts/passes/loop-check.ts +68 -0
- package/pstack/skills/statechart/scripts/passes/paths.ts +60 -0
- package/pstack/skills/statechart/scripts/passes/reach.ts +135 -0
- package/pstack/skills/statechart/scripts/passes/region-check.ts +97 -0
- package/pstack/skills/statechart/scripts/passes/regions.ts +295 -0
- package/pstack/skills/statechart/scripts/pipeline.ts +76 -0
- package/pstack/skills/statechart/scripts/run.ts +481 -0
- package/pstack/skills/statechart/scripts/statechart +29 -0
- package/pstack/skills/statechart/scripts/statechart.ts +164 -0
- package/pstack/skills/statechart/scripts/test/ConfigOracle.java +63 -0
- package/pstack/skills/statechart/scripts/test/chart.test.ts +1210 -0
- package/pstack/skills/statechart/scripts/test/charts/Braces.mmd +7 -0
- package/pstack/skills/statechart/scripts/test/charts/Escapes.mmd +11 -0
- package/pstack/skills/statechart/scripts/test/charts/Phases.mmd +29 -0
- package/pstack/skills/statechart/scripts/test/cli.test.ts +1314 -0
- package/pstack/skills/statechart/scripts/test/config-fuzz.test.ts +263 -0
- package/pstack/skills/statechart/scripts/test/corpus/Counter/ChartRun.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/Counter/Counter.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/Counter/Counter.tla +10 -0
- package/pstack/skills/statechart/scripts/test/corpus/Counter/chart.mmd +9 -0
- package/pstack/skills/statechart/scripts/test/corpus/Counter/graph.dot +16 -0
- package/pstack/skills/statechart/scripts/test/corpus/Counter/report.md +7 -0
- package/pstack/skills/statechart/scripts/test/corpus/Counter/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/Counter/verdict-1.out +49 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/ChartRun.out +60 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.cfg +4 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.tla +22 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/chart.mmd +26 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/graph.dot +19 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/report.md +20 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.out +56 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.out +82 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-3.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/ChartRun.out +59 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.tla +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/chart.mmd +22 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/graph.dot +16 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/report.md +17 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.out +56 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.out +77 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterFan/ChartRun.out +69 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.cfg +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.tla +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterFan/chart.mmd +85 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterFan/graph.dot +70 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterFan/report.md +12 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterFan/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.out +67 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterFan/verdict-2.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.out +85 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.cfg +6 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.tla +13 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/chart.mmd +5 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/graph.dot +10 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/report.md +31 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.out +64 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.out +77 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/ChartRun.out +55 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.tla +10 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/chart.mmd +12 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/graph.dot +6 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/report.md +12 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.out +33 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-2.out +54 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/ChartRun.out +54 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.tla +10 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/chart.mmd +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/graph.dot +6 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/report.md +7 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/verdict-1.out +46 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInstance/ChartRun.out +59 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.cfg +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.tla +10 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInstance/CounterSteps.tla +6 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInstance/chart.mmd +17 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInstance/graph.dot +15 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInstance/report.md +14 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInstance/sany.out +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.out +78 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterJump/ChartRun.out +59 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.tla +19 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterJump/chart.mmd +26 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterJump/graph.dot +22 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterJump/report.md +12 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterJump/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.out +58 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterJump/verdict-2.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterLoop/ChartRun.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.cfg +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.tla +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterLoop/chart.mmd +17 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterLoop/graph.dot +15 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterLoop/report.md +14 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterLoop/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.out +76 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/ChartRun.out +59 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.tla +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/chart.mmd +19 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/graph.dot +10 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/report.md +15 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.out +56 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.out +67 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/ChartRun.out +62 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.cfg +6 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.tla +24 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/Moves.tla +5 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/chart.mmd +22 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/graph.dot +10 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/report.md +23 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/sany.out +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.out +58 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.out +66 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.out +74 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-4.out +59 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStart/ChartRun.out +58 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.tla +15 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStart/chart.mmd +18 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStart/graph.dot +13 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStart/report.md +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStart/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.out +33 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStart/verdict-2.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStop/ChartRun.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.tla +15 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStop/chart.mmd +7 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStop/graph.dot +13 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStop/report.md +6 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStop/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterStop/verdict-1.out +49 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/ChartRun.out +61 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.cfg +4 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.tla +14 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/chart.mmd +30 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/graph.dot +19 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/report.md +27 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.out +56 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.out +64 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.out +87 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-4.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/ChartRun.out +60 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.tla +12 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/chart.mmd +23 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/graph.dot +19 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/report.md +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.out +56 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-2.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/ChartRun.out +61 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/CounterView.cfg +4 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/CounterView.tla +14 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/chart.mmd +23 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/graph.dot +19 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/report.md +27 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-1.out +56 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-2.out +64 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-3.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-3.out +87 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-4.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/CounterView/view.mjs +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/DieHard/ChartRun.out +59 -0
- package/pstack/skills/statechart/scripts/test/corpus/DieHard/DieHard.cfg +4 -0
- package/pstack/skills/statechart/scripts/test/corpus/DieHard/DieHard.tla +38 -0
- package/pstack/skills/statechart/scripts/test/corpus/DieHard/chart.mmd +92 -0
- package/pstack/skills/statechart/scripts/test/corpus/DieHard/graph.dot +126 -0
- package/pstack/skills/statechart/scripts/test/corpus/DieHard/report.md +17 -0
- package/pstack/skills/statechart/scripts/test/corpus/DieHard/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/DieHard/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/DieHard/verdict-1.out +91 -0
- package/pstack/skills/statechart/scripts/test/corpus/DieHard/verdict-2.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/ChartRun.out +61 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.cfg +6 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.tla +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/chart.mmd +22 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/graph.dot +16 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/report.md +25 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.out +56 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.out +64 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.out +64 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.out +77 -0
- package/pstack/skills/statechart/scripts/test/corpus/HiddenClock/ChartRun.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.cfg +4 -0
- package/pstack/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.tla +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/HiddenClock/chart.mmd +13 -0
- package/pstack/skills/statechart/scripts/test/corpus/HiddenClock/graph.dot +12 -0
- package/pstack/skills/statechart/scripts/test/corpus/HiddenClock/report.md +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/HiddenClock/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.out +72 -0
- package/pstack/skills/statechart/scripts/test/corpus/Login/ChartRun.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/Login/Login.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/Login/Login.tla +62 -0
- package/pstack/skills/statechart/scripts/test/corpus/Login/chart.mmd +27 -0
- package/pstack/skills/statechart/scripts/test/corpus/Login/graph.dot +40 -0
- package/pstack/skills/statechart/scripts/test/corpus/Login/report.md +7 -0
- package/pstack/skills/statechart/scripts/test/corpus/Login/sany.out +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/Login/verdict-1.out +47 -0
- package/pstack/skills/statechart/scripts/test/corpus/Login/view.mjs +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/ChartRun.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.cfg +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.tla +64 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/chart.mmd +28 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/graph.dot +37 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/report.md +8 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/sany.out +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/verdict-1.out +47 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/view.mjs +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/ChartRun.out +60 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.tla +64 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/chart.mmd +44 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/graph.dot +58 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/report.md +17 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/sany.out +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.out +83 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/verdict-2.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/LoginParallel/view.mjs +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/ChartRun.out +60 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.tla +103 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/chart.mmd +43 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/graph.dot +93 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/report.md +14 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/sany.out +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.out +59 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-2.out +72 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/view.mjs +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/ChartRun.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.cfg +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.tla +100 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/chart.mmd +31 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/graph.dot +85 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/report.md +9 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/sany.out +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/verdict-1.out +47 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/view.mjs +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/ChartRun.out +59 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayer.tla +103 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.tla +6 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/chart.mmd +42 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/graph.dot +93 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/report.md +19 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.out +61 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-2.out +59 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-3.out +61 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.out +66 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.out +58 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-6.out +49 -0
- package/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/view.mjs +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/PickWorker/ChartRun.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.cfg +6 -0
- package/pstack/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.tla +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/PickWorker/chart.mmd +5 -0
- package/pstack/skills/statechart/scripts/test/corpus/PickWorker/graph.dot +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/PickWorker/report.md +7 -0
- package/pstack/skills/statechart/scripts/test/corpus/PickWorker/sany.out +5 -0
- package/pstack/skills/statechart/scripts/test/corpus/PickWorker/verdict-1.out +70 -0
- package/pstack/skills/statechart/scripts/test/corpus/Shadow/ChartRun.out +61 -0
- package/pstack/skills/statechart/scripts/test/corpus/Shadow/Shadow.cfg +4 -0
- package/pstack/skills/statechart/scripts/test/corpus/Shadow/Shadow.tla +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/Shadow/ShadowLib.tla +6 -0
- package/pstack/skills/statechart/scripts/test/corpus/Shadow/ShadowSub.tla +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/Shadow/chart.mmd +9 -0
- package/pstack/skills/statechart/scripts/test/corpus/Shadow/graph.dot +16 -0
- package/pstack/skills/statechart/scripts/test/corpus/Shadow/report.md +8 -0
- package/pstack/skills/statechart/scripts/test/corpus/Shadow/sany.out +4 -0
- package/pstack/skills/statechart/scripts/test/corpus/Shadow/verdict-1.out +65 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/ChartRun.out +59 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.cfg +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.tla +9 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/chart.mmd +23 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/graph.dot +17 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/report.md +15 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/sany.out +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.out +65 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.out +75 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/ChartRun.out +69 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.tla +75 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/chart.mmd +60 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/graph.dot +297 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/report.md +20 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/sany.out +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.out +95 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/verdict-2.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhase/view.mjs +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/ChartRun.out +57 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.cfg +3 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.tla +75 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/chart.mmd +37 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/graph.dot +223 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/report.md +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/sany.out +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/verdict-1.out +47 -0
- package/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/view.mjs +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.out +75 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.cfg +5 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.tla +11 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/chart.mmd +18 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/graph.dot +14 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/report.md +29 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.out +64 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.out +75 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/ChartRun.out +58 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.cfg +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.tla +8 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/chart.mmd +22 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/graph.dot +16 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/report.md +15 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.out +56 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.exit +1 -0
- package/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.out +77 -0
- package/pstack/skills/statechart/scripts/test/corpus.test.ts +403 -0
- package/pstack/skills/statechart/scripts/test/differential.test.ts +565 -0
- package/pstack/skills/statechart/scripts/test/grid/Grid.cfg +2 -0
- package/pstack/skills/statechart/scripts/test/grid/Grid.tla +9 -0
- package/pstack/skills/statechart/scripts/test/grid/sany.out +2 -0
- package/pstack/skills/statechart/scripts/test/java.ts +63 -0
- package/pstack/skills/statechart/scripts/test/labels.ts +643 -0
- package/pstack/skills/statechart/scripts/test/messages.test.ts +212 -0
- package/pstack/skills/statechart/scripts/test/pipeline.test.ts +270 -0
- package/pstack/skills/statechart/scripts/test/plain-tlc.test.ts +255 -0
- package/pstack/skills/statechart/scripts/test/render.test.ts +81 -0
- package/pstack/skills/statechart/scripts/test/tlc-out.test.ts +90 -0
- package/pstack/skills/statechart/scripts/test/tlc.ts +158 -0
- package/pstack/skills/statechart/scripts/tsconfig.json +11 -0
- package/pstack/skills/statechart/scripts/worker.ts +35 -0
- package/pstack/skills/swarm/SKILL.md +47 -0
- package/pstack/skills/tdd/SKILL.md +42 -0
- package/pstack/skills/teach/SKILL.md +21 -0
- package/pstack/skills/technical-writing/SKILL.md +106 -0
- package/pstack/skills/thermo-nuclear-code-quality-review/SKILL.md +192 -0
- package/pstack/skills/thermo-nuclear-review/SKILL.md +51 -0
- package/pstack/skills/thermos/SKILL.md +21 -0
- package/pstack/skills/typescript-best-practices/SKILL.md +31 -0
- package/pstack/skills/typescript-best-practices/references/patterns.md +328 -0
- package/pstack/skills/unslop/SKILL.md +62 -0
- package/pstack/skills/what-did-i-get-done/SKILL.md +31 -0
- package/pstack/skills/why/SKILL.md +105 -0
- package/pstack/skills/why/references/epistemics.md +71 -0
- package/pstack/skills/why/references/investigator-prompt.md +84 -0
- package/pstack/skills/why/references/source-playbook.md +17 -0
- package/pstack/skills/why/references/sources/code-archaeology.md +51 -0
- package/pstack/skills/why/references/sources/databricks.md +70 -0
- package/pstack/skills/why/references/sources/datadog.md +97 -0
- package/pstack/skills/why/references/sources/incident-postmortem.md +5 -0
- package/pstack/skills/why/references/sources/linear.md +48 -0
- package/pstack/skills/why/references/sources/notion.md +55 -0
- package/pstack/skills/why/references/sources/sentry.md +66 -0
- package/pstack/skills/why/references/sources/slack.md +17 -0
- package/pstack/skills/why/references/synthesizer-prompt.md +129 -0
- package/src/accounts.ts +527 -0
- package/src/bash-timeout.ts +63 -0
- package/src/bridge-trim.ts +109 -0
- package/src/brief.ts +280 -0
- package/src/cards.ts +65 -0
- package/src/child.ts +570 -0
- package/src/failures.ts +73 -0
- package/src/models.ts +1249 -0
- package/src/plan.ts +252 -0
- package/src/resources.ts +30 -0
- package/src/results.ts +92 -0
- package/src/resume.ts +143 -0
- package/src/session.ts +70 -0
- package/src/state.ts +124 -0
- package/src/t3-http.ts +140 -0
- package/src/t3-json.ts +50 -0
- package/src/t3-mcp.ts +188 -0
- package/src/tasks.ts +163 -0
- package/src/transcript.ts +17 -0
- package/src/usage.ts +145 -0
- package/README.md +0 -3
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { CHECK_DEADLOCK, type Config } from "../ir.ts";
|
|
2
|
+
|
|
3
|
+
type ListField = "invariants" | "properties" | "constraints" | "actionConstraints";
|
|
4
|
+
type Section = {
|
|
5
|
+
key: string;
|
|
6
|
+
plural?: string;
|
|
7
|
+
field?:
|
|
8
|
+
| ListField
|
|
9
|
+
| "checkDeadlock"
|
|
10
|
+
| "init"
|
|
11
|
+
| "next"
|
|
12
|
+
| "spec"
|
|
13
|
+
| "view"
|
|
14
|
+
| "symmetry"
|
|
15
|
+
| "type"
|
|
16
|
+
| "typeConstraint";
|
|
17
|
+
undefinedNoun?: string;
|
|
18
|
+
};
|
|
19
|
+
const isListField = (field: Section["field"]): field is ListField =>
|
|
20
|
+
field === "invariants" ||
|
|
21
|
+
field === "properties" ||
|
|
22
|
+
field === "constraints" ||
|
|
23
|
+
field === "actionConstraints";
|
|
24
|
+
|
|
25
|
+
const SECTIONS = new Map<string, Section>();
|
|
26
|
+
for (const section of [
|
|
27
|
+
{ key: "CONSTANT", plural: "CONSTANTS" },
|
|
28
|
+
{ key: CHECK_DEADLOCK, field: "checkDeadlock" },
|
|
29
|
+
{ key: "INIT", field: "init", undefinedNoun: "initial predicate" },
|
|
30
|
+
{ key: "NEXT", field: "next", undefinedNoun: "next state action" },
|
|
31
|
+
{ key: "SPECIFICATION", field: "spec", undefinedNoun: "name" },
|
|
32
|
+
{ key: "VIEW", field: "view", undefinedNoun: "view function" },
|
|
33
|
+
{ key: "SYMMETRY", field: "symmetry", undefinedNoun: "symmetry function" },
|
|
34
|
+
{ key: "TYPE", field: "type" },
|
|
35
|
+
{ key: "TYPE_CONSTRAINT", field: "typeConstraint" },
|
|
36
|
+
{ key: "INVARIANT", plural: "INVARIANTS", field: "invariants", undefinedNoun: "invariant" },
|
|
37
|
+
{ key: "PROPERTY", plural: "PROPERTIES", field: "properties", undefinedNoun: "property" },
|
|
38
|
+
{ key: "CONSTRAINT", plural: "CONSTRAINTS", field: "constraints", undefinedNoun: "constraint" },
|
|
39
|
+
{
|
|
40
|
+
key: "ACTION_CONSTRAINT",
|
|
41
|
+
plural: "ACTION_CONSTRAINTS",
|
|
42
|
+
field: "actionConstraints",
|
|
43
|
+
undefinedNoun: "action constraint",
|
|
44
|
+
},
|
|
45
|
+
] satisfies Section[]) {
|
|
46
|
+
SECTIONS.set(section.key, section);
|
|
47
|
+
if (section.plural) SECTIONS.set(section.plural, section);
|
|
48
|
+
}
|
|
49
|
+
export const NAME = /^\w*[A-Za-z]\w*$/;
|
|
50
|
+
const WORD = /\w+/y;
|
|
51
|
+
const CONFIG_HOLDS =
|
|
52
|
+
"A config can hold only names, numbers, strings, comments, and the symbols { } ( ) [ ] , = ! <-.";
|
|
53
|
+
const shown = (c: string) => {
|
|
54
|
+
const code = c.codePointAt(0) ?? 0;
|
|
55
|
+
const hex = `U+${code.toString(16).toUpperCase().padStart(4, "0")}`;
|
|
56
|
+
if (code < 0x20 || code === 0x7f) return hex;
|
|
57
|
+
return code < 0x7f ? `"${c}"` : `"${c}" (${hex})`;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
type Token = { image: string; line: number };
|
|
61
|
+
|
|
62
|
+
function tokenizeConfig(text: string, cannot: (line: number, words: string) => Error) {
|
|
63
|
+
if (text.startsWith("\uFEFF"))
|
|
64
|
+
throw cannot(1, "The file starts with a byte order mark. Save it as UTF-8 without one.");
|
|
65
|
+
const tokens: Token[] = [];
|
|
66
|
+
let line = 1;
|
|
67
|
+
let last = 1;
|
|
68
|
+
let i = 0;
|
|
69
|
+
const skip = (to: number) => {
|
|
70
|
+
for (; i < to; i++) {
|
|
71
|
+
last = line;
|
|
72
|
+
if (text[i] === "\n" || (text[i] === "\r" && text[i + 1] !== "\n")) line++;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const push = (image: string) => {
|
|
76
|
+
tokens.push({ image, line });
|
|
77
|
+
skip(i + image.length);
|
|
78
|
+
};
|
|
79
|
+
while (i < text.length) {
|
|
80
|
+
const c = text[i];
|
|
81
|
+
const two = text.slice(i, i + 2);
|
|
82
|
+
const start = line;
|
|
83
|
+
if (c === " " || c === "\t" || c === "\n" || c === "\r") skip(i + 1);
|
|
84
|
+
else if (two === "\\*") {
|
|
85
|
+
const end = text.slice(i).search(/[\n\r]/);
|
|
86
|
+
skip(end < 0 ? text.length : i + end);
|
|
87
|
+
} else if (two === "(*") {
|
|
88
|
+
const marks = /\(\*|\*\)/g;
|
|
89
|
+
let depth = 0;
|
|
90
|
+
do {
|
|
91
|
+
marks.lastIndex = i;
|
|
92
|
+
const m = marks.exec(text);
|
|
93
|
+
if (!m) throw cannot(start, "A comment starts here and does not end.");
|
|
94
|
+
depth += m[0] === "(*" ? 1 : -1;
|
|
95
|
+
skip(m.index + 2);
|
|
96
|
+
} while (depth);
|
|
97
|
+
} else if (c === '"') {
|
|
98
|
+
let j = i + 1;
|
|
99
|
+
while (text[j] !== '"') {
|
|
100
|
+
const ch = text[j];
|
|
101
|
+
if (ch === undefined) throw cannot(start, "A string starts here and does not end.");
|
|
102
|
+
if (ch === "\n" || ch === "\r")
|
|
103
|
+
throw cannot(
|
|
104
|
+
start,
|
|
105
|
+
"A string starts here and does not end on its line. Write \\n for a line break in a string.",
|
|
106
|
+
);
|
|
107
|
+
if (ch === "\0") throw cannot(start, "A string has the character U+0000.");
|
|
108
|
+
if (ch === "\\" && text[j + 1] !== undefined && !'"\\ntrf'.includes(text[j + 1]))
|
|
109
|
+
throw cannot(
|
|
110
|
+
start,
|
|
111
|
+
`A string has a backslash before ${shown(text[j + 1])}. A string can use only the escapes \\" \\\\ \\n \\t \\r \\f.`,
|
|
112
|
+
);
|
|
113
|
+
j += ch === "\\" ? 2 : 1;
|
|
114
|
+
}
|
|
115
|
+
push(text.slice(i, j + 1));
|
|
116
|
+
} else if (/\w/.test(c)) {
|
|
117
|
+
WORD.lastIndex = i;
|
|
118
|
+
const word = WORD.exec(text)?.[0] ?? c;
|
|
119
|
+
if (/^[WS]F_/.test(word))
|
|
120
|
+
throw cannot(
|
|
121
|
+
start,
|
|
122
|
+
`TLC reads ${word.slice(0, 3)} at the start of a word as a TLA+ keyword, so it cannot read ${word} as a name.`,
|
|
123
|
+
);
|
|
124
|
+
if (!/[A-Za-z]/.test(word) && word !== "_") {
|
|
125
|
+
if (/\D/.test(word))
|
|
126
|
+
throw cannot(
|
|
127
|
+
start,
|
|
128
|
+
`TLC splits ${word} into ${word.match(/\d+|_/g)?.join(" ")}, because a name needs a letter.`,
|
|
129
|
+
);
|
|
130
|
+
if (Number(word) > 2147483647)
|
|
131
|
+
throw cannot(start, `TLC cannot read a number above 2147483647, such as ${word}.`);
|
|
132
|
+
}
|
|
133
|
+
push(word);
|
|
134
|
+
} else if (two === "<-") push(two);
|
|
135
|
+
else if (["[]", "]_", "==", "=<", "!!"].includes(two))
|
|
136
|
+
throw cannot(start, `TLC reads ${two} as one TLA+ symbol, and a config cannot hold it.`);
|
|
137
|
+
else if ("{}()[],=!".includes(c)) push(c);
|
|
138
|
+
else {
|
|
139
|
+
const ch = String.fromCodePoint(text.codePointAt(i) ?? 0);
|
|
140
|
+
const where = ch > "\x7f" ? " outside a string" : "";
|
|
141
|
+
throw cannot(start, `It cannot read the character ${shown(ch)}${where}. ${CONFIG_HOLDS}`);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return { tokens, end: last };
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export function readConfig({ file, text }: { file: string; text: string }): Config {
|
|
148
|
+
const refuse = (line: number, words: string) =>
|
|
149
|
+
new Error(`TLC refuses the config ${file} at line ${line}. ${words}`);
|
|
150
|
+
const cannot = (line: number, words: string) =>
|
|
151
|
+
new Error(`The command cannot read the config ${file} at line ${line}. ${words}`);
|
|
152
|
+
const { tokens, end } = tokenizeConfig(text, cannot);
|
|
153
|
+
const eof: Token = { image: "", line: end };
|
|
154
|
+
let at = 0;
|
|
155
|
+
const next = () => tokens[at++] ?? eof;
|
|
156
|
+
let deferred: Error | undefined;
|
|
157
|
+
const defer = (error: Error) => (deferred ??= error);
|
|
158
|
+
const defined = (t: Token, undefinedNoun: string | undefined) => {
|
|
159
|
+
if (!NAME.test(t.image))
|
|
160
|
+
defer(
|
|
161
|
+
refuse(
|
|
162
|
+
t.line,
|
|
163
|
+
`The ${undefinedNoun} ${t.image} specified in the configuration file is not defined in the specification.`,
|
|
164
|
+
),
|
|
165
|
+
);
|
|
166
|
+
};
|
|
167
|
+
const name = (t: Token, what: string) => {
|
|
168
|
+
if (SECTIONS.has(t.image))
|
|
169
|
+
defer(cannot(t.line, `TLC would read the keyword ${t.image} as ${what}.`));
|
|
170
|
+
else if (!NAME.test(t.image))
|
|
171
|
+
defer(cannot(t.line, `TLC would read ${t.image} as ${what}, and it is not a name.`));
|
|
172
|
+
};
|
|
173
|
+
const value = (t: Token): void => {
|
|
174
|
+
if (t === eof) throw refuse(t.line, "It was expecting a value, but did not find it.");
|
|
175
|
+
if (t.image === "{") {
|
|
176
|
+
t = next();
|
|
177
|
+
if (t.image === "}") return;
|
|
178
|
+
value(t);
|
|
179
|
+
while ((t = next()).image === ",") value(next());
|
|
180
|
+
if (t.image !== "}") throw refuse(t.line, "It was expecting }, but did not find it.");
|
|
181
|
+
} else if (SECTIONS.has(t.image))
|
|
182
|
+
defer(cannot(t.line, `TLC would read the keyword ${t.image} as a value.`));
|
|
183
|
+
else if (!NAME.test(t.image) && !/^(\d+|".*")$/.test(t.image))
|
|
184
|
+
defer(
|
|
185
|
+
cannot(
|
|
186
|
+
t.line,
|
|
187
|
+
`TLC would read ${t.image} as a value. A value is a name, a number, a string, or a set in braces.`,
|
|
188
|
+
),
|
|
189
|
+
);
|
|
190
|
+
};
|
|
191
|
+
const constant = (t: Token, loc: number) => {
|
|
192
|
+
name(t, "a constant name");
|
|
193
|
+
for (t = next(); t.image === "!"; t = next()) name((t = next()), "a constant name");
|
|
194
|
+
if (t.image === "<-") {
|
|
195
|
+
t = next();
|
|
196
|
+
if (t.image === "[") {
|
|
197
|
+
t = next();
|
|
198
|
+
if (t === eof) throw refuse(t.line, "Expected an identifier after <-[.");
|
|
199
|
+
name(t, "a module name");
|
|
200
|
+
t = next();
|
|
201
|
+
if (t.image !== "]") throw refuse(t.line, "It was expecting ], but did not find it.");
|
|
202
|
+
t = next();
|
|
203
|
+
if (t === eof) throw refuse(t.line, "Expected an identifier after <-[mod].");
|
|
204
|
+
} else if (t === eof) throw refuse(t.line, "Expected an identifier after <-.");
|
|
205
|
+
name(t, "the name after <-");
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
if (t.image === "(") {
|
|
209
|
+
value(next());
|
|
210
|
+
while ((t = next()).image === ",") value(next());
|
|
211
|
+
if (t.image !== ")")
|
|
212
|
+
throw refuse(
|
|
213
|
+
loc,
|
|
214
|
+
"TLC gives no reason here. An operator's arguments are one or more values in ( ), with commas between them.",
|
|
215
|
+
);
|
|
216
|
+
t = next();
|
|
217
|
+
}
|
|
218
|
+
if (t.image !== "=") throw refuse(t.line, "It was expecting = or <-, but did not find it.");
|
|
219
|
+
t = next();
|
|
220
|
+
if (t.image === "[") {
|
|
221
|
+
t = next();
|
|
222
|
+
if (t === eof) throw refuse(t.line, "Expected an identifier after =[.");
|
|
223
|
+
name(t, "a module name");
|
|
224
|
+
t = next();
|
|
225
|
+
if (t.image !== "]") throw refuse(t.line, "It was expecting ], but did not find it.");
|
|
226
|
+
t = next();
|
|
227
|
+
}
|
|
228
|
+
value(t);
|
|
229
|
+
};
|
|
230
|
+
const config: Config = {
|
|
231
|
+
sections: [],
|
|
232
|
+
invariants: [],
|
|
233
|
+
properties: [],
|
|
234
|
+
constraints: [],
|
|
235
|
+
actionConstraints: [],
|
|
236
|
+
};
|
|
237
|
+
for (let t = next(); t !== eof;) {
|
|
238
|
+
const keyword = t;
|
|
239
|
+
const section = SECTIONS.get(keyword.image);
|
|
240
|
+
if (!section) throw refuse(t.line, "It was expecting a keyword, but did not find it.");
|
|
241
|
+
const { key, field, undefinedNoun } = section;
|
|
242
|
+
const begin = at;
|
|
243
|
+
if (field === undefined) {
|
|
244
|
+
for (t = next(); t !== eof && !SECTIONS.has(t.image); t = next()) constant(t, keyword.line);
|
|
245
|
+
} else if (isListField(field)) {
|
|
246
|
+
for (t = next(); t !== eof && !SECTIONS.has(t.image); t = next()) {
|
|
247
|
+
config[field].push(t.image);
|
|
248
|
+
defined(t, undefinedNoun);
|
|
249
|
+
}
|
|
250
|
+
} else {
|
|
251
|
+
t = next();
|
|
252
|
+
if (t === eof)
|
|
253
|
+
throw refuse(
|
|
254
|
+
keyword.line,
|
|
255
|
+
`The keyword ${keyword.image} was not followed by an identifier.`,
|
|
256
|
+
);
|
|
257
|
+
if (field === "checkDeadlock" && t.image !== "TRUE" && t.image !== "FALSE")
|
|
258
|
+
throw refuse(t.line, "It was expecting TRUE or FALSE, but did not find it.");
|
|
259
|
+
if (config[field] !== undefined)
|
|
260
|
+
throw refuse(keyword.line, `The keyword ${keyword.image} appeared twice.`);
|
|
261
|
+
if (field === "checkDeadlock") config[field] = t.image === "TRUE";
|
|
262
|
+
else {
|
|
263
|
+
config[field] = t.image;
|
|
264
|
+
if (SECTIONS.has(t.image))
|
|
265
|
+
defer(cannot(t.line, `TLC would read the keyword ${t.image} as the name after ${key}.`));
|
|
266
|
+
else if (undefinedNoun) defined(t, undefinedNoun);
|
|
267
|
+
}
|
|
268
|
+
t = next();
|
|
269
|
+
}
|
|
270
|
+
const images: string[] = [];
|
|
271
|
+
for (let k = begin; k < (t === eof ? tokens.length : at - 1); k++) images.push(tokens[k].image);
|
|
272
|
+
config.sections.push({ key, line: keyword.line, tokens: images });
|
|
273
|
+
}
|
|
274
|
+
if (deferred) throw deferred;
|
|
275
|
+
return config;
|
|
276
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { type Graph, type State, type Step, type Value, type Vars } from "../ir.ts";
|
|
2
|
+
import { parseValue } from "./value.ts";
|
|
3
|
+
|
|
4
|
+
const unescapeDot = (s: string) => {
|
|
5
|
+
let i = s.indexOf("\\");
|
|
6
|
+
if (i === -1) return s;
|
|
7
|
+
let out = "";
|
|
8
|
+
let from = 0;
|
|
9
|
+
for (; i !== -1 && i + 1 < s.length; i = s.indexOf("\\", i)) {
|
|
10
|
+
const c = s[i + 1];
|
|
11
|
+
if (c === "\n" || c === "\r" || c === "\u2028" || c === "\u2029") {
|
|
12
|
+
i++;
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
15
|
+
out += s.slice(from, i) + (c === "n" ? "\n" : c);
|
|
16
|
+
i += 2;
|
|
17
|
+
from = i;
|
|
18
|
+
}
|
|
19
|
+
return out + s.slice(from);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const parseState = (label: string, parsed = new Map<string, [string, Value]>()): Vars => {
|
|
23
|
+
const pairs: [string, Value][] = [];
|
|
24
|
+
for (const part of (label.startsWith("/\\ ") ? label.slice(3) : label).split("\n/\\ ")) {
|
|
25
|
+
let pair = parsed.get(part);
|
|
26
|
+
if (!pair) {
|
|
27
|
+
const [, name, value] = /^(\w+)\s*=\s*([\s\S]*)$/.exec(part) ?? [];
|
|
28
|
+
if (!name) throw new Error(`cannot read the TLC state line "${part}"`);
|
|
29
|
+
parsed.set(part, (pair = [name, parseValue(value)]));
|
|
30
|
+
}
|
|
31
|
+
pairs.push(pair);
|
|
32
|
+
}
|
|
33
|
+
return Object.fromEntries(pairs);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type Lines = string | Iterable<string>;
|
|
37
|
+
|
|
38
|
+
export const linesOf = (input: Lines) => (typeof input === "string" ? input.split("\n") : input);
|
|
39
|
+
|
|
40
|
+
export function parseDot(input: Lines): Graph {
|
|
41
|
+
const states = new Map<string, State>();
|
|
42
|
+
const steps = new Map<string, Step>();
|
|
43
|
+
const parsed = new Map<string, [string, Value]>();
|
|
44
|
+
const owned = new Map<string, string>();
|
|
45
|
+
const own = (s: string) => {
|
|
46
|
+
let copy = owned.get(s);
|
|
47
|
+
if (copy === undefined) owned.set((copy = String(JSON.parse(JSON.stringify(s)))), copy);
|
|
48
|
+
return copy;
|
|
49
|
+
};
|
|
50
|
+
for (const line of linesOf(input)) {
|
|
51
|
+
const edge = /^(-?\d+) -> (-?\d+) \[label="([^"]*)"/.exec(line);
|
|
52
|
+
if (edge) {
|
|
53
|
+
steps.set(edge.slice(1).join(" "), {
|
|
54
|
+
from: own(edge[1]),
|
|
55
|
+
to: own(edge[2]),
|
|
56
|
+
action: own(edge[3]),
|
|
57
|
+
});
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
const node = /^(-?\d+) \[label="((?:[^"\\]|\\.)*)"(,style = filled)?/.exec(line);
|
|
61
|
+
if (node)
|
|
62
|
+
states.set(own(node[1]), {
|
|
63
|
+
vars: parseState(unescapeDot(node[2]), parsed),
|
|
64
|
+
start: !!node[3],
|
|
65
|
+
breaks: [],
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
for (const loose of steps.values())
|
|
69
|
+
if (!states.has(loose.from) || !states.has(loose.to))
|
|
70
|
+
throw new Error(
|
|
71
|
+
`The TLC graph dump has a step ${loose.action} to or from a state that it does not list.`,
|
|
72
|
+
);
|
|
73
|
+
return { states, steps: [...steps.values()] };
|
|
74
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { EC, type Mark, memo, type Part, type TraceState, type Value } from "../ir.ts";
|
|
2
|
+
import { actionOf, messageState } from "./messages.ts";
|
|
3
|
+
import { BRACKET, isSpace, parseValue, tokenEnd, unreadable } from "./value.ts";
|
|
4
|
+
|
|
5
|
+
const markTexts = (chunk: string, top: number[], inner: number[]) => {
|
|
6
|
+
if (top.length !== 2) return undefined;
|
|
7
|
+
const [a, b] = top;
|
|
8
|
+
const open = chunk.indexOf("<<", a);
|
|
9
|
+
const close = chunk.lastIndexOf(">>", b);
|
|
10
|
+
const end = chunk.trimEnd().length - 2;
|
|
11
|
+
if (open < 0 || chunk.slice(a + 1, open).trim() || chunk.slice(close + 2, b).trim())
|
|
12
|
+
return undefined;
|
|
13
|
+
if (!chunk.startsWith(">>", end)) return undefined;
|
|
14
|
+
const cuts = [open + 1];
|
|
15
|
+
for (const k of inner) if (k > open && k < close) cuts.push(k);
|
|
16
|
+
cuts.push(close);
|
|
17
|
+
const texts: string[] = [];
|
|
18
|
+
for (let k = 1; k < cuts.length; k++) texts.push(chunk.slice(cuts[k - 1] + 1, cuts[k]));
|
|
19
|
+
return { values: texts, rules: chunk.slice(b + 1, end) };
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const ruleNames = (v: Value) => {
|
|
23
|
+
if (typeof v !== "object" || v.kind !== "set") return undefined;
|
|
24
|
+
const names: string[] = [];
|
|
25
|
+
for (const m of v.members) {
|
|
26
|
+
if (typeof m !== "string") return undefined;
|
|
27
|
+
names.push(m);
|
|
28
|
+
}
|
|
29
|
+
return names;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export function* readMarks(messages: Iterable<Part>, tag: string): Generator<Mark> {
|
|
33
|
+
const read = memo(parseValue);
|
|
34
|
+
const start = `"${tag}",`;
|
|
35
|
+
let chunk = "";
|
|
36
|
+
let depth = 0;
|
|
37
|
+
let top: number[] = [];
|
|
38
|
+
let inner: number[] = [];
|
|
39
|
+
for (const line of messages) {
|
|
40
|
+
if (typeof line !== "string") continue;
|
|
41
|
+
if (!chunk) {
|
|
42
|
+
if (!line.startsWith("<<") || !line.slice(2).trimStart().startsWith(start)) continue;
|
|
43
|
+
depth = 0;
|
|
44
|
+
top = [];
|
|
45
|
+
inner = [];
|
|
46
|
+
}
|
|
47
|
+
const base = chunk.length;
|
|
48
|
+
chunk += line + "\n";
|
|
49
|
+
let i = 0;
|
|
50
|
+
let last = 0;
|
|
51
|
+
while (i < line.length) {
|
|
52
|
+
const c = line.charCodeAt(i);
|
|
53
|
+
if (isSpace(c)) {
|
|
54
|
+
i++;
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
const j = tokenEnd(line, i);
|
|
58
|
+
if (j === -1) throw unreadable(line + "\n", last);
|
|
59
|
+
if (c === 44 && depth === 1) top.push(base + i);
|
|
60
|
+
else if (c === 44 && depth === 2) inner.push(base + i);
|
|
61
|
+
depth += BRACKET[c];
|
|
62
|
+
i = last = j;
|
|
63
|
+
}
|
|
64
|
+
if (depth > 0) continue;
|
|
65
|
+
const texts = markTexts(chunk, top, inner);
|
|
66
|
+
const values: Value[] = [];
|
|
67
|
+
if (texts) for (const v of texts.values) values.push(read(v));
|
|
68
|
+
const broken = texts && ruleNames(read(texts.rules));
|
|
69
|
+
if (!broken)
|
|
70
|
+
throw new Error(`TLC printed a mark that the command cannot read:\n${chunk.slice(0, 2000)}`);
|
|
71
|
+
chunk = "";
|
|
72
|
+
yield { values, broken };
|
|
73
|
+
}
|
|
74
|
+
if (chunk)
|
|
75
|
+
throw new Error(
|
|
76
|
+
`TLC's output ends inside a marked state, so the command cannot tell which rules it breaks:\n${chunk.slice(0, 2000)}`,
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function readCounterexample(messages: Iterable<Part>) {
|
|
81
|
+
const trace: TraceState[] = [];
|
|
82
|
+
for (const m of messages) {
|
|
83
|
+
if (typeof m === "string") continue;
|
|
84
|
+
const action = m.code === EC.TLC_STATE_PRINT2 ? actionOf(m) : undefined;
|
|
85
|
+
if (action !== undefined) trace.push({ action, vars: messageState(m) });
|
|
86
|
+
else if (
|
|
87
|
+
m.code === EC.TLC_INVARIANT_VIOLATED_INITIAL ||
|
|
88
|
+
m.code === EC.TLC_PROPERTY_VIOLATED_INITIAL
|
|
89
|
+
)
|
|
90
|
+
trace.push({ action: "", vars: messageState(m) });
|
|
91
|
+
}
|
|
92
|
+
return trace;
|
|
93
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { Message, Part } from "../ir.ts";
|
|
2
|
+
import { linesOf, parseState } from "./dot.ts";
|
|
3
|
+
|
|
4
|
+
const START = /@!@!@STARTMSG (\d+):(\d+) @!@!@$/;
|
|
5
|
+
const END = /^@!@!@ENDMSG \d+ @!@!@$/;
|
|
6
|
+
|
|
7
|
+
const isCutMarker = (lastLine: string) => lastLine.startsWith("@!@!@");
|
|
8
|
+
|
|
9
|
+
function cutMessage(open: Message[]) {
|
|
10
|
+
for (let i = open.length - 1; i > 0 && !open[i].body.length; i--) open[i - 1].body.pop();
|
|
11
|
+
return open[0]?.body.length ? open[0] : undefined;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function* readMessages(tlcOut: string | Iterable<string>): Generator<Part> {
|
|
15
|
+
const lines = linesOf(tlcOut)[Symbol.iterator]();
|
|
16
|
+
const open: Message[] = [];
|
|
17
|
+
try {
|
|
18
|
+
for (let next = lines.next(); !next.done;) {
|
|
19
|
+
const line = next.value;
|
|
20
|
+
next = lines.next();
|
|
21
|
+
if (next.done && (!line || isCutMarker(line))) break;
|
|
22
|
+
const start = START.exec(line);
|
|
23
|
+
if (start) {
|
|
24
|
+
const message: Message = { code: Number(start[1]), level: Number(start[2]), body: [] };
|
|
25
|
+
if (start.index) message.beforeMarker = line.slice(0, start.index);
|
|
26
|
+
open.at(-1)?.body.push(message);
|
|
27
|
+
open.push(message);
|
|
28
|
+
} else if (END.test(line)) {
|
|
29
|
+
const done = open.pop();
|
|
30
|
+
if (done && !open.length) yield done;
|
|
31
|
+
} else if (open.length) open[open.length - 1].body.push(line);
|
|
32
|
+
else yield line;
|
|
33
|
+
}
|
|
34
|
+
} finally {
|
|
35
|
+
lines.return?.();
|
|
36
|
+
}
|
|
37
|
+
const cut = cutMessage(open);
|
|
38
|
+
if (cut) yield cut;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export const textOf = ({ body }: Message) =>
|
|
42
|
+
body.filter((part) => typeof part === "string").join("\n");
|
|
43
|
+
|
|
44
|
+
export const actionOf = (m: Message) =>
|
|
45
|
+
/^\d+: (?:Back to state: )?<([^\s>]+)/.exec(textOf(m))?.[1];
|
|
46
|
+
|
|
47
|
+
export const messageState = (m: Message) => {
|
|
48
|
+
const lines = textOf(m).split("\n");
|
|
49
|
+
const body: string[] = [];
|
|
50
|
+
for (let i = 1; i < lines.length && lines[i].trim(); i++) body.push(lines[i]);
|
|
51
|
+
return parseState(body.join("\n"));
|
|
52
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { Config, ConfigSection, Spec } from "../ir.ts";
|
|
2
|
+
import { NAME } from "./config.ts";
|
|
3
|
+
|
|
4
|
+
export type Checks = Pick<Spec, "invariants" | "properties" | "deadlock" | "written">;
|
|
5
|
+
|
|
6
|
+
export function readChecks({ configFile, config }: { configFile: string; config: Config }): Checks {
|
|
7
|
+
const refuse = (words: string) => new Error(`TLC refuses the config ${configFile}. ${words}`);
|
|
8
|
+
if (config.spec && (config.init || config.next))
|
|
9
|
+
throw refuse("The configuration file cannot specify both INIT/NEXT and SPECIFICATION fields.");
|
|
10
|
+
if (!config.spec && !config.init)
|
|
11
|
+
throw refuse("The configuration file did not specify the initial state predicate.");
|
|
12
|
+
const written: ConfigSection[] = [];
|
|
13
|
+
for (const s of config.sections)
|
|
14
|
+
if (!["INVARIANT", "PROPERTY", "CHECK_DEADLOCK"].includes(s.key)) written.push(s);
|
|
15
|
+
return {
|
|
16
|
+
invariants: config.invariants,
|
|
17
|
+
properties: config.properties,
|
|
18
|
+
deadlock: config.checkDeadlock !== false,
|
|
19
|
+
written,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
type XmlNode = { tag: string; text: string; children: XmlNode[] };
|
|
24
|
+
|
|
25
|
+
const ENTITIES: { [name: string]: string } = { amp: "&", apos: "'", gt: ">", lt: "<", quot: '"' };
|
|
26
|
+
|
|
27
|
+
const decode = (text: string) =>
|
|
28
|
+
text.replace(/&(#x?)?(\w+);/g, (_, number: string | undefined, name: string) =>
|
|
29
|
+
number
|
|
30
|
+
? String.fromCodePoint(Number.parseInt(name, number === "#x" ? 16 : 10))
|
|
31
|
+
: ENTITIES[name],
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
function parseXml(xml: string) {
|
|
35
|
+
const document: XmlNode = { tag: "", text: "", children: [] };
|
|
36
|
+
const open = [document];
|
|
37
|
+
for (const [, close, tag, empty, text] of xml.matchAll(
|
|
38
|
+
/<(\/?)([^\s/>?!]+)[^>]*?(\/?)>|<[?!][^>]*>|([^<]+)/g,
|
|
39
|
+
)) {
|
|
40
|
+
const parent = open[open.length - 1];
|
|
41
|
+
if (text !== undefined) parent.text += decode(text);
|
|
42
|
+
else if (close) open.pop();
|
|
43
|
+
else if (tag) {
|
|
44
|
+
const node: XmlNode = { tag, text: "", children: [] };
|
|
45
|
+
parent.children.push(node);
|
|
46
|
+
if (!empty) open.push(node);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return document;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const child = (node: XmlNode | undefined, tag: string) => node?.children.find((c) => c.tag === tag);
|
|
53
|
+
const textOf = (node: XmlNode | undefined, tag: string) => child(node, tag)?.text ?? "";
|
|
54
|
+
|
|
55
|
+
export type Sany = {
|
|
56
|
+
variables: string[];
|
|
57
|
+
definitions: Map<string, XmlNode>;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const VARIABLE_KIND = "3";
|
|
61
|
+
|
|
62
|
+
export function readSany(xml: string): Sany {
|
|
63
|
+
const modules = child(parseXml(xml), "modules");
|
|
64
|
+
const symbols = new Map<string, XmlNode>();
|
|
65
|
+
for (const entry of child(modules, "context")?.children ?? [])
|
|
66
|
+
symbols.set(textOf(entry, "UID"), entry.children[1]);
|
|
67
|
+
const root = textOf(modules, "RootModule");
|
|
68
|
+
let module: XmlNode | undefined;
|
|
69
|
+
for (const node of symbols.values())
|
|
70
|
+
if (node.tag === "ModuleNode" && textOf(node, "uniquename") === root) module = node;
|
|
71
|
+
const definitions = new Map<string, XmlNode>();
|
|
72
|
+
const variables: { uid: number; name: string }[] = [];
|
|
73
|
+
for (const ref of module?.children ?? []) {
|
|
74
|
+
if (ref.tag !== "OpDeclNodeRef" && ref.tag !== "UserDefinedOpKindRef") continue;
|
|
75
|
+
const uid = textOf(ref, "UID");
|
|
76
|
+
const node = symbols.get(uid);
|
|
77
|
+
if (!node) continue;
|
|
78
|
+
const name = textOf(node, "uniquename");
|
|
79
|
+
definitions.set(name, node);
|
|
80
|
+
if (node.tag === "OpDeclNode" && textOf(node, "kind") === VARIABLE_KIND)
|
|
81
|
+
variables.push({ uid: Number(uid), name });
|
|
82
|
+
}
|
|
83
|
+
variables.sort((a, b) => a.uid - b.uid);
|
|
84
|
+
return { variables: variables.map((v) => v.name), definitions };
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function readSpec({
|
|
88
|
+
module,
|
|
89
|
+
sany,
|
|
90
|
+
checks,
|
|
91
|
+
}: {
|
|
92
|
+
module: string;
|
|
93
|
+
sany: Sany;
|
|
94
|
+
checks: Checks;
|
|
95
|
+
}): Spec {
|
|
96
|
+
return { module, variables: sany.variables, ...checks };
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const STATE_LEVEL = 1;
|
|
100
|
+
|
|
101
|
+
export function initialOnlyProperties({ definitions }: Sany, { written, properties }: Spec) {
|
|
102
|
+
const replaced = new Map<string, string>();
|
|
103
|
+
for (const s of written)
|
|
104
|
+
if (s.key === "CONSTANT")
|
|
105
|
+
for (let i = 1; i + 1 < s.tokens.length; i++)
|
|
106
|
+
if (s.tokens[i] === "<-" && NAME.test(s.tokens[i + 1]))
|
|
107
|
+
replaced.set(s.tokens[i - 1], s.tokens[i + 1]);
|
|
108
|
+
const names = new Set<string>();
|
|
109
|
+
for (const name of properties) {
|
|
110
|
+
const definition = definitions.get(replaced.get(name) ?? name);
|
|
111
|
+
if (definition && Number(textOf(definition, "level")) <= STATE_LEVEL) names.add(name);
|
|
112
|
+
}
|
|
113
|
+
return names;
|
|
114
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { EC, type Part, type Trace } from "../ir.ts";
|
|
2
|
+
import { actionOf, messageState, textOf } from "./messages.ts";
|
|
3
|
+
|
|
4
|
+
export function readTrace(messages: Iterable<Part>): Trace {
|
|
5
|
+
const seq: Trace["seq"] = [];
|
|
6
|
+
for (const m of messages) {
|
|
7
|
+
if (typeof m === "string") continue;
|
|
8
|
+
if (m.code === EC.TLC_STATE_PRINT3) return { seq, loop: seq.length - 1 };
|
|
9
|
+
const back = m.code === EC.TLC_BACK_TO_STATE && /^(\d+): Back to state: /.exec(textOf(m));
|
|
10
|
+
if (back) {
|
|
11
|
+
const loop = Number(back[1]) - 1;
|
|
12
|
+
seq.push({ action: actionOf(m) ?? "", vars: seq[loop]?.vars });
|
|
13
|
+
return { seq, loop };
|
|
14
|
+
}
|
|
15
|
+
const action = m.code === EC.TLC_STATE_PRINT2 ? actionOf(m) : undefined;
|
|
16
|
+
if (action !== undefined) seq.push({ action, vars: messageState(m) });
|
|
17
|
+
else if (
|
|
18
|
+
m.code === EC.TLC_INVARIANT_VIOLATED_INITIAL ||
|
|
19
|
+
m.code === EC.TLC_PROPERTY_VIOLATED_INITIAL
|
|
20
|
+
)
|
|
21
|
+
seq.push({ action: "", vars: messageState(m) });
|
|
22
|
+
}
|
|
23
|
+
return { seq, loop: undefined };
|
|
24
|
+
}
|