<?xml version="1.0" ?>
<test>
  <!-- based on test originally written by Glenn De Jonghe -->
  <statechart>
    <semantics
      big_step_maximality="take_many"
      combo_step_maximality="combo_take_many"
      internal_event_lifeline="queue"/>

    <inport name="in">
      <event name="start"/>
    </inport>

    <outport name="out">
      <event name="check1"/>
      <event name="check2"/>
      <event name="check3"/>
    </outport>

    <root>
      <parallel id="parallel">
        <state id="orthogonal" initial="wrapper">
          <state id="wrapper" initial="state_1">

            <state id="state_1" initial="inner_1">
              <state id="inner_1"/>
              <state id="inner_2"/>
              <transition event="to_state_2" target="../state_2"/>
            </state>

            <state id="state_2" initial="inner_3">
              <state id="inner_3">
                <transition event="to_inner_4" target="../inner_4"/>
              </state>
              <state id="inner_4"/>
            </state>

            <history id="history" type="deep">
              <!-- <transition target="../state_1"/> -->
            </history>

            <transition event="to_outer" target="../outer"/>
          </state>
          <state id="outer">
            <transition event="to_history" target="../wrapper/history"/>
          </state>
        </state>
        <state id="orthogonal_tester" initial="start">
          <state id="start">
            <transition target="../step1">
              <raise event="to_state_2" />
              <raise event="to_inner_4" />
            </transition>
          </state>
          <state id="step1">
            <transition cond='INSTATE(["/parallel/orthogonal/wrapper/state_2/inner_4"])' target="../step2">
              <raise port="out" event="check1" />
              <raise event="to_outer" />
            </transition>
          </state>
          <state id="step2">
            <transition cond='INSTATE(["/parallel/orthogonal/outer"])' target="../step3">
              <raise port="out" event="check2" />
              <raise event="to_history" />
            </transition>
          </state>
          <state id="step3">
            <transition cond='INSTATE(["/parallel/orthogonal/wrapper/state_2/inner_4"])' target="../end">
              <raise port="out" event="check3" />
            </transition>
          </state>
          <state id="end"/>
        </state>
      </parallel>
    </root>
  </statechart>

  <input>
    <event port="in" name="start" time="0 d"/>
  </input>

  <output>
    <big_step>
      <event port="out" name="check1"/>
    </big_step>
    <big_step>
      <event port="out" name="check2"/>
    </big_step>
    <big_step>
      <event port="out" name="check3"/>
    </big_step>
  </output>
</test>