imperative-to-coq-model-extractor

Extracts abstract mathematical models from imperative code into functional Coq definitions.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill bridges the gap between imperative programming and formal verification by enabling the extraction of abstract mathematical models from imperative code, making it suitable for rigorous reasoning in Coq.

Core Features & Use Cases

  • Model Extraction: Transforms imperative code (C, C++, Python, Java, etc.) into functional Coq definitions with explicit state modeling.
  • Formal Reasoning: Facilitates formal proofs about program behavior, invariants, and correctness properties.
  • Use Case: When you need to prove the correctness of a critical algorithm implemented in C, this Skill helps you create a verifiable Coq model of that algorithm.

Quick Start

Extract a Coq model from the provided C code snippet for formal verification.

Frequently Asked Questions about imperative-to-coq-model-extractor

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

FAQPage Schema
How do I extract a mathematical model from imperative code for Coq formal verification?

To extract a mathematical model from imperative code for Coq formal verification, you translate imperative programs into functional Coq definitions with explicit state modeling, enabling formal proofs of program behavior and correctness.

What is the process for translating imperative loops and state mutations into Coq definitions?

Translating imperative loops and state mutations into Coq definitions involves extracting abstract mathematical models with explicit state modeling. This allows imperative programming constructs to be represented functionally for formal proofs in Coq.

Can I use this model extraction approach to verify C or Python algorithms in Coq?

Yes, you can verify C or Python algorithms in Coq by extracting abstract mathematical models from the imperative code. This creates verifiable Coq models suitable for proving the correctness of critical algorithms implemented in those languages.

Do I need prior mathematical modeling experience to formalize imperative programs in Coq?

Prior mathematical modeling experience is beneficial to formalize imperative programs in Coq. The Skill bridges formal verification and imperative programming by extracting abstract models, but understanding explicit state modeling helps facilitate formal proofs.

What are the limitations of extracting abstract models from imperative code for Coq?

The limitations of extracting abstract models from imperative code for Coq involve handling complex imperative constructs. While it supports loops, conditionals, and state mutations, highly complex program synthesis or advanced mathematical modeling may require manual intervention for formal reasoning.