cpp-to-dafny-translator

Community

Convert C/C++ to verifiable Dafny code.

AuthorArabelaTso
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill addresses the challenge of migrating or verifying C/C++ code by translating it into Dafny, a language designed for formal verification, ensuring semantic equivalence and enabling rigorous proof of correctness.

Core Features & Use Cases

  • Semantic Preservation: Translates C/C++ constructs (functions, structs, pointers, arrays) to Dafny equivalents while maintaining original program semantics.
  • Verification Enablement: Generates Dafny code that is well-typed, executable, verifiable, and includes necessary specifications (preconditions, postconditions, invariants).
  • Use Case: A critical C algorithm needs to be formally proven correct. This Skill translates the C code into Dafny, allowing engineers to use Dafny's verifier to prove its safety and functional correctness.

Quick Start

Use the cpp-to-dafny-translator skill to convert the provided C code snippet into Dafny.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: cpp-to-dafny-translator
Download link: https://github.com/ArabelaTso/Skills-4-SE/archive/main.zip#cpp-to-dafny-translator

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.