
module main {
  var temp : int; // temperature
  var count : int; // count of events

  init {
    temp = 0;
    count = 0;
  }

  transition {
    // Increase temperature randomly
    temp' = temp + nondet();

    // Check if temperature rises above threshold
    if temp' > threshold {
      count' = count + 1;
    } else {
      count' = count;
    }
  }
}
