
module main
{
  type state_t = enum { RED, GREEN };

  var state : state_t;

  init {
    state = RED; // initial state is red
  }

  next {
    if (state == RED) {
      state' = GREEN; // transition from red to green
    } else {
      state' = RED; // transition from green to red
    }
  }
}
