nuXmv / SMV Formal Verification Language¶
fsmc compiles statechart models into formal symbolic transition systems formatted for the nuXmv and NuSMV model checking suites.
1. SMV Translation Pipeline¶
During SMV export, fsmc:
- Constructs the discrete finite state domain
state : {StateA, StateB, ...}. - Constructs the input event alphabet
event : {Ev1, Ev2, ..., none}. - Maps discrete timer variables with discrete-time tick counters for
after/everytransitions. - Generates symbolic transition relation assignments (
next(state) := case ... esac;). - Appends all embedded LTL (
LTLSPEC) and CTL (CTLSPEC) properties.
2. Example Generated SMV Model¶
MODULE main
VAR
state : {SensorCalib, SystemReady, WaypointNav, ReturnToHome, Landed};
event : {CalibrationOk, TakeoffCmd, AreaReached, LowBatteryEvent, TouchdownEvent, none};
batteryLevel : 0..100;
ASSIGN
init(state) := SensorCalib;
init(batteryLevel) := 100;
next(state) := case
state = SensorCalib & event = CalibrationOk : SystemReady;
state = SystemReady & event = TakeoffCmd : WaypointNav;
state = WaypointNav & event = LowBatteryEvent & batteryLevel < 20 : ReturnToHome;
state = ReturnToHome & event = TouchdownEvent : Landed;
TRUE : state;
esac;
-- Formal Verification Specifications
LTLSPEC G (event = LowBatteryEvent & batteryLevel < 20 -> F (state = Landed));
INVARSPEC !(state = SensorCalib & state = WaypointNav);