Runtime verification of fail-uncontrolled and ambient intelligence systems: A uniform approach