I'm having quite a lot of troubles with Event-B..
I'd like to make a relation from a group of client to a client number each
I have a relation of that type :
cli(PERSON) = NAT1
(Person is a finite set)
and in an event I have a subset of person
where group <: PERSON
and I'd like to affect to the cli relation what I'd write intuitively :
! x . x : group | cli(x) = numcli
Am I modelling it the right way? Is there any method to get the affectation I'd like to get?
I'm a little bit guessing what you want to achieve:
cli
maps a person to a number:You want an event (let's call it
ev
) that assigns to a group of persons (calledgroup
) the same number:group ** {numcli}
is a set of pairs (a relation) where the first element is an element ofgroup
and the second isnumcli
. The operator<+
(relational override) removes all elements fromcli
where the first element if one of its right operand and adds the right operand. I.e. mappings ofgroup
incli
are replaced or added to a mapping tonumcli
.