tlaplus-guided-code-repair

Repair C/C++ code violations detected by TLA+ model checking.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill automatically repairs C/C++ code violations identified by TLA+ model checking, bridging the gap between formal specifications and implementation bugs.

Core Features & Use Cases

  • Automated Repair: Generates minimal, semantically justified code modifications based on TLC counterexamples.
  • Violation Analysis: Parses TLC traces to pinpoint root causes in C/C++ code.
  • Use Case: After TLA+ model checking reveals a deadlock in your concurrent C++ application, use this Skill to analyze the counterexample trace, identify the lock ordering issue, and automatically generate a corrected code snippet.

Quick Start

Use the tlaplus-guided-code-repair skill to analyze the TLC trace file 'trace.txt' and suggest code repairs.

Frequently Asked Questions about tlaplus-guided-code-repair

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

FAQPage Schema
How do I fix C++ code bugs found by TLA+ model checking?

To fix C++ code bugs found by TLA+ model checking, you can analyze TLC counterexample traces to pinpoint root causes and generate minimal, semantically justified code modifications automatically.

What types of formal verification violations can be repaired using TLC counterexample traces?

TLC counterexample traces can be used to repair invariant violations, deadlocks, and temporal property failures by mapping TLA+ actions to C++ functions and enforcing guards as code preconditions.

Can I use TLA+ model checking to fix deadlocks in concurrent C++ applications?

Yes, you can fix deadlocks in concurrent C++ applications by analyzing the TLC counterexample trace to identify lock ordering issues and automatically generating a corrected code snippet.

How do I map TLA+ actions to C++ functions when repairing code violations?

Mapping TLA+ actions to C++ functions during code repair involves enforcing TLA+ guards as code preconditions, ensuring the generated modifications align with the formal specification.

What is the best way to generate minimal code modifications from formal verification traces?

The best way to generate minimal code modifications from formal verification traces is to parse TLC counterexamples to pinpoint root causes and produce semantically justified code changes.