compute state changes in seq diagram