module traffic_light {
    type state_t = enum { red, green };

    var state : state_t;

    init {
        state = red;
    }

    next {
        if (state == red) { state' = green; }
        if (state == green) { state' = red; }
    }
}
