Skip to content
Playground(another site)

bynk.invariant.duplicate_name

Error An agent declares two invariants with the same name.

Invariants are named so that a violation can say which one was broken. Two with the same name in one agent would make that report ambiguous. Rename one, or merge the two predicates if they are one claim. The same rule for steps is bynk.transition.duplicate_name.

Example

invariant bounded: count >= 0
invariant bounded: count < 100 // ✗ `bounded` is already declared
invariant capped: count < 100 // ✓ a distinct name

In the Book

See also

  • Every code in its category, Other, on the diagnostic index.
  • bynk explain bynk.invariant.duplicate_name shows the same from the installed toolchain, without a network.