package CarbonMonoxideDetector
import Timer.SimulatedTimer
+//JPF's Verify API
+import gov.nasa.jpf.vm.Verify
+
public class CarbonMonoxideDetectors {
private int deviceNumbers
private List carbonMonoxideDetectors
this.sendEvent = sendEvent
this.deviceNumbers = deviceNumbers
this.carbonMonoxideDetectors = []
-
+
+ def init = Verify.getInt(0,2)
+ if (init == 0) {
+ this.carbonMonoxide = "clear"
+ this.carbonMonoxideLatestValue = "clear"
+ } else if (init == 1) {
+ this.carbonMonoxide = "detected"
+ this.carbonMonoxideLatestValue = "detected"
+ } else {
+ this.carbonMonoxide = "tested"
+ this.carbonMonoxideLatestValue = "tested"
+ }
carbonMonoxideDetectors.add(new CarbonMonoxideDetector(id, label, displayName, this.currentCarbonMonoxideValue, this.carbonMonoxideLatestValue))
}