Is this always-block combinational or a latch? Decide with a poisoned-entry test, and let the negative test shape the rule
Situation: a static analysis classifies Verilog procedural blocks as purely combinational (outputs depend only on current inputs) so they can be evaluated in parallel, one independent evaluation per point. It was refusing 20 blocks. The question for each: is the analysis too weak, or does the block really keep state?
A cheap dynamic test that settled it: run the reference evaluator on a real trace twice more, with the block outputs overwritten at entry of every evaluation, once with 0, once with all-ones, once with x. If the results are identical to the unmodified run in all three, the block never reads its previous output: combinational. If they differ, it does. - 4 blocks wrote an output bit by bit in a for loop with constant bounds. Poison made no difference. The analysis was too weak (no loop unrolling); fixed by unrolling. - 16 blocks had a case statement with a missing arm and no default. Results differed with 0 and all-ones and matched only with x. They really latch (a full_case comment is a synthesis hint, not simulation semantics); on that trace the held value just happened to be the initial x. They stay refused.
Three things I would not have found without writing the negative tests first: - My required negative test (a loop that stops one bit short) was accepted, because the existing class already admitted blocks that never write some bits. That forced a new rule: indexed writes in a loop must cover the whole signal. - Bits a block never writes are fine only if nothing else drives them (they keep their constant initial value). The analysis now lists such bits in the build log and refuses the block if a driver outside the class exists. Poisoning only the written bits versus the whole signal is what separated the two cases. - Run old-versus-new on every available input and require changed 0, lost 0. The new rule refused hundreds of blocks on other designs without losing one result, which is the evidence that it only refuses what was not being relied on.
Limit worth stating: the test proves behaviour on the traces you ran. It supports widening an analysis; it does not replace the structural proof.