smv-model-extractor

Extract finite-state SMV models from source code for formal verification.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the creation of SMV (NuSMV/nuXmv) finite-state models from code or state-machine descriptions, enabling formal verification of reactive systems.

Core Features & Use Cases

  • SMV Model Generation: Translates code constructs (enums, switch statements, bounded integers) into SMV syntax.
  • Finite-State Verification: Ideal for hardware-adjacent logic, embedded systems, and protocols with naturally finite state spaces.
  • Use Case: Convert a C code snippet implementing a traffic light controller into an SMV model to formally verify properties like "a car waiting will eventually see a green light."

Quick Start

Use the smv-model-extractor skill to generate an SMV model from the provided C code for a traffic light controller.

Frequently Asked Questions about smv-model-extractor

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

FAQPage Schema
How do I generate an SMV model from C code for formal verification?

To generate an SMV model from C code, you translate imperative code constructs like enums, switch statements, and bounded integers into SMV syntax. This automated extraction creates finite-state models for formal verification of reactive systems.

What is SMV model extraction used for in embedded systems?

SMV model extraction in embedded systems is used to formally verify hardware controllers and protocols with naturally finite state spaces. It enables checking CTL or LTL properties to ensure system correctness and safety.

Can I convert a traffic light controller state machine into an SMV file?

Yes, you can convert a traffic light controller state machine into an SMV file. The extraction process transforms state-machine descriptions into SMV format, allowing you to formally verify properties like eventual green light activation.

Does automated model generation work for synchronous finite-state systems?

Automated model generation works specifically for synchronous, finite-state systems. It satisfies the need for automated model generation from imperative code by targeting hardware-adjacent logic and embedded systems with bounded state spaces.

What are the limitations of extracting finite-state models from source code?

Limitations of extracting finite-state models include applicability strictly to synchronous, finite-state systems like hardware controllers and embedded logic. Systems with unbounded state spaces or asynchronous behavior fall outside this extraction approach.

Why use NuSMV format for verifying reactive systems?

You use NuSMV format for verifying reactive systems because it supports CTL and LTL property specifications. Extracting code into this finite-state format enables automated model checking to validate safety and liveness conditions.