A framework to measure the robustness of programs in the unpredictable environment (Logical Methods in Computer Science, 2023)