State Coverage Report
Given an FSM definition and a simulation trace, report which states and which transitions were never exercised, so a testbench gap is visible.
Constraints
- FSM is a dict mapping state to a list of reachable states.
- Trace is a list of visited states in order.
- Report unvisited states and untaken transitions as sorted lists.
- A trace containing an undefined state must raise ValueError.
- Also report coverage percentages for both.
1def coverage_report(fsm, trace):2 # TODO3 return {}