This case study corresponds to the motivating example presented in Section 2.3 of the paper, showcasing HAFuzz's input requirements and a counterexample trace generated through fuzzing. The visualized outputs below utilize two distinct annotation schemes:
1. Red markers denote critical system states associated with the LTL violation.
2. Orange markers identify transitions triggered by IFTTT rule interactions.
At timestamp 8, the air conditioner was turned off, and the window was opened. However, at timestamp 9, the air conditioner was activated again (heating mode), and the window remained open at timestamp 10. This sequence violates the LTL specification.
It can be observed that we conducted a high-precision simulation, where the temperature change between the two states can take any double value in the range of [-2, 2]. This is one of the reasons why it is challenging to trigger violation scenarios under this specification.
IFTTT Rules:
1) IF Temperature Sensor.temperature < 20.5 THEN Air Conditioner.heat & Window.close
2) IF Temperature Sensor.temperature > 20.5 THEN Window.open
3) IF Clock.time > 9 & Motion Detector.motion = inactive THEN Window.close
4) IF Air Quality Monitor.carbonDioxide > 15 & Motion Detector.motion = active THEN Window.close & Air Purifier.on
LTL Spec:
G ! ( Clock.time < 8
&& X ( Window.WindowState = open && Air Conditioner.HvacMode = off )
&& XX Air Conditioner.HvacMode = heat
&& XXX ( Window.WindowState = open U Clock.time = 11 ) )
Device Json:
{"Name": "Temperature Sensor","InternalVariables": [{"Name": "temperature","LowerBound": 0,"UpperBound": 100,"NaturalChangeRate": "[-2, 2]"}],}
{"Name": "Clock", .... }
....
HAFuzz will output a counterexample trace:
Note 1: Distinct IFTTT rules may have varying impacts on the same device (e.g., the state of the window). HAFuzz sequentially evaluates these rules according to the input order to determine the device's final state at the next timestamp.
Note 2: Motion is an environmental variable.