You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
type node
relation active(N:node)
type int_t
interpret int_t -> int
individual num_active : int_t
after init {
active(N) := false;
num_active := 0;
}
action become_active(n:node) = {
require ~active(n);
active(n) := true;
num_active := num_active + 1;
}
The protocol maintains two invariants
invariant num_active <= COUNT n WHERE active(n) is defined (i.e., total number of nodes)
invariant num_active = COUNT n WHERE active(n) is true (i.e., number of active nodes)
However, I cannot find a way to represent either number in Ivy. Does Ivy support reasoning about cardinality of types/relations?
The text was updated successfully, but these errors were encountered:
Consider the following protocol.
The protocol maintains two invariants
However, I cannot find a way to represent either number in Ivy. Does Ivy support reasoning about cardinality of types/relations?
The text was updated successfully, but these errors were encountered: