Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Jowett <[email protected]>
  • Loading branch information
Alan Jowett committed Oct 18, 2024
1 parent 0bc118d commit b55897e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/crab_verifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static checks_db generate_report(cfg_t& cfg, const crab::invariant_table_t& pre_
const auto last_inv = post_invariants.at(cfg.exit_label());
m_db.max_loop_count = last_inv.get_loop_count_upper_bound();

// Test for the case where the exit is unreachable.
// Check if the exit is unreachable, which could indicate an infinite loop
if (last_inv.is_bottom()) {
m_db.add_unreachable(label_t::exit, "Exit is unreachable.");
}
Expand Down
10 changes: 5 additions & 5 deletions test-data/loop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ post: []

messages:
- "1:2: Code is unreachable after 1:2"
- "exit: Exit is unreachable"
- "exit: Exit is unreachable."
---
test-case: simple infinite loop, less than or equal
options: ["termination"]
Expand All @@ -300,7 +300,7 @@ post: []

messages:
- "1:2: Code is unreachable after 1:2"
- "exit: Exit is unreachable"
- "exit: Exit is unreachable."

---
test-case: simple infinite loop, equal
Expand All @@ -318,7 +318,7 @@ post: []

messages:
- "1:2: Code is unreachable after 1:2"
- "exit: Exit is unreachable"
- "exit: Exit is unreachable."

---
test-case: simple infinite loop, greater than
Expand All @@ -336,7 +336,7 @@ post: []

messages:
- "1:2: Code is unreachable after 1:2"
- "exit: Exit is unreachable"
- "exit: Exit is unreachable."

---
test-case: simple infinite loop, greater than or equal
Expand All @@ -354,4 +354,4 @@ post: []

messages:
- "1:2: Code is unreachable after 1:2"
- "exit: Exit is unreachable"
- "exit: Exit is unreachable."

0 comments on commit b55897e

Please sign in to comment.