A hierarchical structure for fault tolerant reactive programs