Reactive diagnosis of active systems