
module traffic_light
{
  var red : boolean; // Represents the red state of the traffic light
  var green : boolean; // Represents the green state of the traffic light

  init {
    red = true; // Initialize the traffic light to the red state
    green = false;
  }

  transition {
    if red {
      if (condition_to_switch_to_green) {
        red' = false;
        green' = true;
      }
    } else {
      // Transition back to red after a certain duration
      red' = true;
      green' = false;
    }
  }
}
