prompt

State Machine Correctness Verifier

Verify state machine implementations for unreachable states, illegal transitions, and completeness of event handling.

Updated June 2026
The prompt
Analyze this state machine implementation:

{{state_machine_code}}

Expected behavior: {{business_requirements}}

Verify:
1. All states are reachable from initial state
2. All declared transitions are valid and used
3. Dead-end states (if any) are intentional
4. Event handling is exhaustive (no missing cases)
5. Guard conditions prevent invalid transitions
6. Entry/exit actions are idempotent
7. Timeout and error recovery paths
8. Visualize state diagram and transition matrix

Provide test scenarios for edge cases and state coverage.
Did it work? Rate this prompt

Variables

State Machine Implementation
Business Rules & Workflows

Details

Author

AI Khazna

License

Security

Type

prompt

Related assets

More curated picks in Development & Code.

Audit before you install

Run any source through our checks - AI visibility, security, performance, and stack detection.

More in Development & Code