
module event_counter
{
  var temp : int;
  var count : int;
  const threshold : int = 30; // Example threshold value

  input new_temp : int;
  output event_occurred : boolean;

  init {
    temp = 0;
    count = 0;
  }

  next {
    temp' = new_temp;
    if (new_temp > threshold) {
      count' = count + 1;
      event_occurred = true;
    } else {
      event_occurred = false;
    }
  }
}
