%type: module

module Chart():
begin
  ChartEL := [];
  x := 0;
  t := 0;
  Chart_st := "Chart_A";
  {
    Chart_ret := 0;
    if (Chart_st == "Chart_A") {
      Chart_A_done := 0;
      if (t >= 1) {
        t := 0;
        if (Chart_st == "Chart_A") {
          Chart_st := "Chart_B";
          Chart_A_done := 1;
        }
      }
      Chart_ret := Chart_A_done;
    } else if (Chart_st == "Chart_B") {
      Chart_B_done := 0;
      if (t >= 1) {
        t := 0;
        if (Chart_st == "Chart_B") {
          Chart_st := "Chart_A";
          Chart_B_done := 1;
        }
      }
      Chart_ret := Chart_B_done;
    }
    if (Chart_st == "Chart_A") {
      {x_dot = 1, t_dot = 1 & t < 1}
    } else if (Chart_st == "Chart_B") {
      {x_dot = -1, t_dot = 1 & t < 1}
    }
  }*
end
endmodule
system
Chart()
endsystem
