tla-model-checking

Guide TLA+ model checking with TLC configuration and debugging.

Updated Jan 27, 2026
One-click install
npx skills add https://github.com/photoszzt/tlaplus-ai-tools --skill tla-model-checking
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tla-model-checking
Source: https://github.com/photoszzt/tlaplus-ai-tools/tree/main/skills/tla-model-checking
Command: npx skills add https://github.com/photoszzt/tlaplus-ai-tools --skill tla-model-checking

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill guides users through the process of verifying TLA+ specifications using the TLC model checker, ensuring correctness and identifying bugs.

Core Features & Use Cases

  • Model Checking Workflow: Provides a step-by-step guide from preparing the specification to interpreting results.
  • TLC Configuration: Explains how to write and optimize .cfg files for constants, properties, and constraints.
  • Debugging Violations: Offers strategies for analyzing counterexamples and fixing identified issues.
  • Use Case: A developer has written a TLA+ specification for a distributed consensus algorithm and needs to rigorously check its safety and liveness properties using TLC.

Quick Start

Use the tla-model-checking skill to guide me through setting up and running a model check for my TLA+ specification named 'MySpec.tla'.

Frequently Asked Questions about tla-model-checking

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify a TLA+ specification using TLC model checking?

To verify a TLA+ specification using TLC, you prepare the spec, create a `.cfg` configuration file for constants and properties, run a smoke test, execute the full model check, and interpret the success or violation results.

How do I configure a TLC model checker file for safety and liveness properties?

Configure a TLC model checker file by writing a `.cfg` file that defines constants, specifies safety invariants and liveness properties, and sets state constraints to optimize the model checking process for your TLA+ specification.

What is the best way to debug invariant violations in TLA+?

Debug TLA+ invariant violations by analyzing the counterexample trace provided by TLC, identifying the state transition causing the property failure, and correcting the TLA+ specification logic or adjusting the model configuration constraints.

How do I handle state space explosion when running TLC model checks?

Handle TLC state space explosion by optimizing your `.cfg` configuration with state constraints, reducing constant sizes for initial smoke tests, and applying symmetry sets or view predicates to limit the explored state graph.

Can I run a TLA+ smoke test before full model checking?

Yes, you can run a TLA+ smoke test before full model checking by configuring TLC with a smaller state space or depth limit, verifying basic invariants quickly to catch early specification errors before exhaustive verification.

Why does my TLA+ model check fail with a property violation?

A TLA+ model check fails with a property violation when TLC finds a behavior trace that violates your specified invariants or liveness properties, outputting a counterexample to guide debugging and specification correction.