Skip to content

Commit

Permalink
test: Quint model - Use indices instead of range to avoid problem…
Browse files Browse the repository at this point in the history
… with Apalache (#1741)

Use `indices` instead of `range` to avoid problem with Apalache
  • Loading branch information
bugarela authored Apr 2, 2024
1 parent 920d9d0 commit b7c470a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/mbt/model/libraries/extraSpells.qnt
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ module extraSpells {
/// Returns:
/// - The index of the first element that satisfies the predicate function, or -1 if no such element exists.
pure def firstIndex(__list: List[a], __f: a => bool): int = {
range(0, __list.length()).foldl(
__list.indices().fold(
-1,
(acc, i) => if (acc == -1 and __f(__list[i])) i else acc
)
Expand Down Expand Up @@ -297,4 +297,4 @@ module extraSpells {
assert(splitAfterFirst(List(), __x => __x > 0) == (List(), List())),
}

}
}

0 comments on commit b7c470a

Please sign in to comment.