formal-spec-generator

Generates Isabelle/HOL and Coq formal specifications from informal requirements, source code, or math descriptions.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill bridges the gap between informal software requirements and rigorous formal specifications, ensuring clarity, correctness, and enabling automated verification.

Core Features & Use Cases

  • Formal Specification Generation: Creates precise definitions, predicates, invariants, and pre/post-conditions in Isabelle/HOL or Coq.
  • Input Flexibility: Accepts informal requirements, source code, pseudocode, or mathematical descriptions.
  • Use Case: You have a complex algorithm described in natural language. Use this Skill to generate its formal specification in Coq, which can then be used for theorem proving and ensuring its correctness.

Quick Start

Use the formal-spec-generator skill to create Isabelle/HOL and Coq specifications for a function that finds the maximum element in a non-empty list.

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 from informal requirements or source code?

To generate formal specifications, provide informal requirements, source code, or pseudocode to create precise type definitions, predicates, invariants, and pre/post-conditions in Isabelle/HOL or Coq.

Can I use Coq to verify algorithm correctness from a mathematical description?

Yes, you can use Coq to verify algorithm correctness by translating mathematical descriptions into formal specifications, enabling theorem proving for algorithms and data structures.

Does this approach support both Isabelle/HOL and Coq for creating type definitions and invariants?

Yes, formal specification generation supports both Isabelle/HOL and Coq, creating precise type definitions, function contracts, predicates, and invariants from your input descriptions.

What is the best way to formalize pre-conditions and post-conditions for complex algorithms?

The best way to formalize pre-conditions and post-conditions is translating natural language or pseudocode into rigorous formal specifications, ensuring clarity and enabling automated verification.

When do I need formal specifications for requirements engineering?

You need formal specifications when bridging informal software requirements and rigorous verification, ensuring clarity and correctness through precise definitions and automated theorem proving.

Can pseudocode be directly converted into Isabelle/HOL correctness theorems?

Yes, pseudocode can be converted into Isabelle/HOL correctness theorems by generating formal specifications that include function contracts and invariants for automated verification.