CtrlK
BlogDocsLog inGet started
Tessl Logo

cpp-to-dafny-translator

Translate C/C++ programs to equivalent Dafny code while preserving semantics and ensuring verification. Use when users ask to convert, translate, or port C/C++ code to Dafny, or when they need to formally verify C/C++ algorithms using Dafny's verification capabilities. Handles functions, structs, pointers, arrays, memory management, and ensures the generated Dafny code is well-typed, executable, verifiable, and can successfully run.

90

1.00x
Quality

86%

Does it follow best practices?

Impact

96%

1.00x

Average score across 3 eval scenarios

SecuritybySnyk

Passed

No known issues

SKILL.md
Quality
Evals
Security

Evaluation results

100%

Formal Verification of Array Utility Functions

Loop invariants and verification annotations

Criteria
Without context
With context

array<int> type mapping

100%

100%

method for imperative code

100%

100%

requires preconditions

100%

100%

ensures postconditions

100%

100%

loop bounds invariant

100%

100%

loop progress invariant

100%

100%

modifies clause

100%

100%

preservation invariant in max

100%

100%

helper spec function

100%

100%

90%

Translating a Geometry Library to Dafny for Formal Verification

Struct translation and memory management

Criteria
Without context
With context

struct as class or datatype

100%

100%

distance as function

100%

100%

reads clause on function

100%

100%

modifies clause on mutating method

100%

100%

no malloc in Dafny

100%

100%

no NULL

100%

100%

ensures on mutating method

100%

100%

ensures on create_point

100%

100%

requires on scale_point

0%

0%

100%

Verifiable Data Analysis Routines in Dafny

Type mapping and sorting verification

Criteria
Without context
With context

unsigned int to nat

100%

100%

float to real

100%

100%

explicit as conversion

100%

100%

multiset permutation postcondition

100%

100%

sorted postcondition

100%

100%

outer loop invariant

100%

100%

inner loop invariant

100%

100%

requires for division

100%

100%

modifies clause

100%

100%

Repository
ArabelaTso/Skills-4-SE
Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.