Skip to content

Commit

Permalink
Clarify logic
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Jowett <[email protected]>
  • Loading branch information
Alan Jowett committed Nov 5, 2024
1 parent 9af5311 commit 7589b6a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/crab/fwd_analyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ std::pair<invariant_table_t, invariant_table_t> run_forward_analyzer(const cfg_t
if (thread_local_options.check_termination) {
// For every potential loop header, initialize the loop counter to 0.
for (const auto& label : cfg.potential_loop_headers()) {
// Skip non-deterministic blocks. Only deterministic blocks have loop counters.
// The initial path adds labels in the form of (from, to) where
// where from is the PC and to is -1. When the CFG is expanded to be non-deterministic
// branches with actual to labels are added, but these will not have loop counters as
// loop counters are only added to the deterministic cfg.
// Ignore labels added by the non-deterministic expansion.
if (label.to != -1) {
continue;
}
Expand Down

0 comments on commit 7589b6a

Please sign in to comment.