acsl-annotation-assistant

Generate ACSL formal annotations for C/C++ programs to verify with Frama-C.

17|2|Updated Feb 16, 2026
One-click install
npx skills add https://github.com/rainoftime/pl-skills --skill acsl-annotation-assistant
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: acsl-annotation-assistant
Source: https://github.com/rainoftime/pl-skills/tree/main/acsl-annotation-assistant
Command: npx skills add https://github.com/rainoftime/pl-skills --skill acsl-annotation-assistant

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the generation of formal annotations for C/C++ code, enabling robust verification and ensuring memory safety and correctness.

Core Features & Use Cases

  • Function Contracts: Define precise preconditions (requires) and postconditions (ensures) for functions.
  • Loop Annotations: Generate loop invariants and variants to prove loop termination and correctness.
  • Memory Safety: Add specifications for pointer validity (\valid) and separation (\separated).
  • Use Case: When developing safety-critical C code, use this Skill to generate ACSL annotations for Frama-C, ensuring that critical functions meet their formal specifications and are free from common C vulnerabilities.

Quick Start

Use the acsl-annotation-assistant skill to generate ACSL annotations for the provided C function process_data.

Frequently Asked Questions about acsl-annotation-assistant

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

FAQPage Schema
How do I generate ACSL annotations for C code to use with Frama-C?

To generate ACSL annotations for C code, this Skill analyzes your functions and automatically produces formal specifications like function contracts, loop invariants, and assertions for Frama-C verification.

What is formal verification and how does ACSL help prove memory safety in C/C++?

Formal verification mathematically proves code correctness, and ACSL helps by adding formal annotations to specify pointer validity and separation, ensuring memory safety in C/C++ programs.

How do I add function contracts and loop invariants to my C functions?

You add function contracts and loop invariants by generating ACSL specifications such as preconditions, postconditions, and loop variants to prove termination and correctness for your C functions.

Can I use this to specify pointer validity and separation for safety-critical C code?

Yes, you can specify pointer validity and separation for safety-critical C code. The Skill generates memory safety specifications to ensure critical functions meet formal requirements and avoid vulnerabilities.

Does Frama-C support automated ACSL annotation generation for existing C/C++ programs?

Frama-C supports ACSL for formal verification, and this Skill automates the annotation generation for existing C/C++ programs, creating the necessary assertions and contracts for rigorous analysis.

Why do my Frama-C formal proofs fail when analyzing complex C loops?

Frama-C formal proofs may fail on complex C loops if loop invariants are incomplete. This Skill assists by generating proper loop invariants and variants to prove termination and correctness.