program-to-tlaplus-spec-generator

Generate TLA+ specifications from program code and repositories.

142|14|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/ArabelaTso/Skills-4-SE --skill program-to-tlaplus-spec-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: program-to-tlaplus-spec-generator
Source: https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/program-to-tlaplus-spec-generator
Command: npx skills add https://github.com/ArabelaTso/Skills-4-SE --skill program-to-tlaplus-spec-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the complex and time-consuming process of translating program code into formal TLA+ specifications, enabling rigorous verification of software systems.

Core Features & Use Cases

  • Automated TLA+ Spec Generation: Analyzes source code to identify state variables, actions, and properties, then generates TLA+ modules.
  • Abstraction and Mapping: Provides clear mappings between program constructs and TLA+ elements, documenting abstraction choices.
  • Use Case: A developer needs to formally verify a critical distributed algorithm implemented in Go. This Skill can analyze the Go code and generate a TLA+ specification to prove its correctness under various conditions.

Quick Start

Use the program-to-tlaplus-spec-generator skill to generate a TLA+ specification from the provided Python code.

Frequently Asked Questions about program-to-tlaplus-spec-generator

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

FAQPage Schema
How do I generate TLA+ specifications from source code?

To generate TLA+ specifications from source code, provide your program implementation to the tool, which analyzes program structure, identifies state variables and transitions, and produces well-formed TLA+ modules.

What is TLA+ formal verification used for in software engineering?

TLA+ formal verification is used for specifying and verifying concurrent systems, distributed protocols, algorithms, and state machines to mathematically prove correctness and identify edge-case bugs before deployment.

Can I convert my Python or Go program into a TLA+ module for model checking?

Yes, you can convert Python or Go programs into TLA+ modules by analyzing the code's state variables and actions, then mapping those program constructs into a formal specification suitable for model checking.

What is the best way to formalize a distributed algorithm into TLA+?

The best way to formalize a distributed algorithm into TLA+ is to automate code analysis to extract state transitions and properties, ensuring the generated specification accurately abstracts the system's concurrent behavior.

Do I need to manually define state variables when translating code to TLA+?

You do not need to manually define state variables when translating code to TLA+; the generation process automatically identifies state variables and actions from the source code structure and maps them accordingly.

What are the limitations of automated TLA+ spec generation from repositories?

Automated TLA+ spec generation from repositories may require careful abstraction of complex program constructs, as the tool must map intricate logic into well-formed TLA+ modules while documenting the abstraction choices made.