Skip to content
Playground(another site)

bynk.val.agent_not_generable

Error A for all/Val cannot generate an agent — fabricated agent states need not be reachable.

A for all over a declared type draws values from it, but an agent is not a value: a state that satisfies every invariant need not be one the agent can reach. So an agent cannot be a for all binding. To test an agent over generated input, bind a History of it, which drives real handler calls and so reaches only real states.

Example

tests/t.test.bynk
for all w: Wallet { … } // ✗ an agent is not generated
for all run: History[Wallet] { … } // ✓ a run of its handlers

In the Book

See also

  • The grammar rule it governs: for_all.
  • Every code in its category, Value fabrication, on the diagnostic index.
  • bynk explain bynk.val.agent_not_generable shows the same from the installed toolchain, without a network.