verified-pseudocode-extractor

Extract annotated pseudocode from Dafny, Lean, and TLA+ artifacts.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill bridges the gap between rigorously verified formal specifications and practical software implementation by translating verified code into human-readable pseudocode, preserving critical proof obligations.

Core Features & Use Cases

  • Preserves Verification: Extracts preconditions, postconditions, and invariants from formal artifacts (Dafny, Lean, TLA+) as annotations in pseudocode.
  • Facilitates Reimplementation: Enables developers to reimplement verified algorithms in unverified languages while retaining the essential logic and correctness guarantees.
  • Use Case: You have a critical security algorithm formally verified in Dafny. Use this Skill to generate annotated pseudocode for your team to implement in Python, ensuring they understand the exact conditions the verifier relied upon.

Quick Start

Use the verified-pseudocode-extractor skill to convert the provided Dafny code into annotated pseudocode.

Frequently Asked Questions about verified-pseudocode-extractor

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

FAQPage Schema
How do I translate Dafny or Lean verified code to pseudocode?▼

You translate Dafny or Lean verified code to pseudocode by extracting human-readable logic while preserving preconditions, postconditions, and invariants as annotations. This ensures verified properties remain visible when moving formal specifications to standard implementations.

Why does converting formal specifications to Python lose verification guarantees?▼

Converting formal specifications to unverified languages like Python loses guarantees because the target lacks the formal prover. Annotated pseudocode preserves the original Dafny or Lean proof obligations as comments, allowing developers to manually maintain logical correctness during reimplementation.

Can I extract TLA+ specifications into human-readable pseudocode for documentation?▼

Yes, you can extract TLA+ specifications into human-readable pseudocode for documentation purposes. The process carefully maps formal constructs from TLA+ artifacts into pseudocode comments and annotations, clearly communicating the verified algorithm logic to your engineering team.

What is the best way to reimplement verified algorithms in unverified targets?▼

The best way to reimplement verified algorithms in unverified targets is to generate annotated pseudocode from the formal artifacts first. This bridges the gap by carrying over essential logic and verified properties from Dafny or Lean as explicit annotations for developers.

Does extracting pseudocode from verified code preserve preconditions and invariants?▼

Yes, extracting pseudocode from verified code preserves preconditions and invariants. The extraction process specifically maps these formal constructs from Dafny, Lean, or TLA+ artifacts into pseudocode comments, ensuring the exact conditions the verifier relied upon are maintained.

When do I need to convert formal artifacts to pseudocode?▼

You need to convert formal artifacts to pseudocode when bridging rigorously verified formal specifications with practical software implementation. It is required to facilitate reimplementation of verified algorithms in unverified languages while retaining essential logic and correctness guarantees.