Closed TonyZhangND closed 2 years ago
Consider a record type definition
Variables == [type : {"Variables"}, server : ServerGrant, clients : [1..5 -> ClientRecord]]
and the expression Cardinality(v.clients). Evaluating this expression leads to the error
Cardinality(v.clients)
Error: Attempted to compute cardinality of the value << [type |-> "Released"], [type |-> "Released"], [type |-> "Released"], [type |-> "Released"], [type |-> "Released"] >>
It looks like TLC cannot evaluate the cardinality of sequences, i.e. relations. For instance, Cardinality(<<1,2,3>>) results in the same error.
Cardinality(<<1,2,3>>)
To evaluate cardinality of relations in general, we need to use the expression
`Cardinality(DOMAIN(<<1,2,3>>))`
fixed in c3af6294dff01611ea2b7b2cebe5f52a70829fd5
Consider a record type definition
and the expression
Cardinality(v.clients)
. Evaluating this expression leads to the errorIt looks like TLC cannot evaluate the cardinality of sequences, i.e. relations. For instance,
Cardinality(<<1,2,3>>)
results in the same error.To evaluate cardinality of relations in general, we need to use the expression