formal-spec-generator

Routes formal specification requests to appropriate tools like TLA+ and Dafny based on input type and verification goals.

1|2|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/santosomar/general-secure-coding-agent-skills --skill formal-spec-generator-santosomar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: formal-spec-generator
Source: https://github.com/santosomar/general-secure-coding-agent-skills/tree/main/skills/verification/formal-spec-generator
Command: npx skills add https://github.com/santosomar/general-secure-coding-agent-skills --skill formal-spec-generator-santosomar

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps users formally specify software or hardware properties by intelligently routing their requests to the most appropriate specialized formal specification generation tool.

Core Features & Use Cases

  • Intelligent Routing: Directs formal specification tasks based on the type of code (Python, C/C++), the property to be proven (correctness, concurrency, invariants), and the desired output formalism (Dafny, TLA+, Lean).
  • Guidance on Tool Selection: Provides clear decision trees and common misrouting examples to help users choose the right tool for their verification needs.
  • Use Case: A developer has a concurrent system and needs to prove the absence of race conditions. This skill would guide them to use a TLA+ generator.

Quick Start

Use the formal-spec-generator skill to formally specify a Python function that computes the right answer.

Frequently Asked Questions about formal-spec-generator

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

FAQPage Schema
How do I generate formal specifications for concurrent system verification?

To generate formal specifications for concurrent system properties, route your requests to the TLA+ formalism, which handles concurrency properties like race condition absence. The skill prioritizes simpler model checking methods over complex theorem proving.

What is the best way to formally specify Python or C/C++ code for correctness?

For sequential code correctness in Python or C/C++, use Dafny specification generation. The skill intelligently routes sequential code verification requests to specialized tools based on input type and desired output formalism.

When should I use Lean versus Dafny or TLA+ for formal verification?

Use Lean for complex theorem proving, whereas Dafny suits sequential code correctness and TLA+ targets concurrent systems. The skill prioritizes simpler verification methods like model checking before escalating to complex theorem proving.

Can I formalize natural language requirements into formal specifications?

Yes, you can formalize natural language requirements. The skill supports routing natural language requirement formalization requests across Dafny, TLA+, Lean, and SMV formalisms based on your specific verification goals.

Does this formal specification generator support invariant inference?

Yes, the formal specification generator supports invariant inference. It dispatches invariant inference requests to specialized tools, selecting the appropriate formalism like SMV or Lean based on your specific verification objectives.

What are the limitations of using automated formal specification generation for theorem proving?

Automated formal specification generation prioritizes simpler verification methods like model checking before complex theorem proving. Users may encounter limitations when requiring advanced Lean theorem proofs if simpler Dafny or TLA+ methods are insufficient.