Revision control
++ <?xml version="1.0" encoding="UTF-8"?>
++ <!--
++ Copyright 2011-2012 Jacob Beard, INFICON, and other SCION contributors
++
++ Licensed under the Apache License, Version 2.0 (the "License");
++ you may not use this file except in compliance with the License.
++ You may obtain a copy of the License at
++
++
++ Unless required by applicable law or agreed to in writing, software
++ distributed under the License is distributed on an "AS IS" BASIS,
++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ See the License for the specific language governing permissions and
++ limitations under the License.
++ -->
++ <!--
++ This test illustrates how possibly infinite loops may be created. Here, without the counter and the cond, the big-step would never complete.
++ -->
++ <scxml
++ datamodel="ecmascript"
++ xmlns="http://www.w3.org/2005/07/scxml"
++ version="1.0">
++
++ <datamodel>
++ <data id="myArray" expr="[1,3,5,7,9]"/>
++ <data id="myItem" expr="0"/>
++ <data id="myIndex" expr="0"/>
++ <data id="sum" expr="0"/>
++ <data id="indexSum" expr="0"/>
++ </datamodel>
++
++ <state id="a">
++ <onentry>
++ <log label="before" expr="[sum,indexSum]"/>
++ <foreach array="myArray" item="myItem" index="myIndex">
++ <assign location="sum" expr="sum + myItem"/>
++ <assign location="indexSum" expr="indexSum + myIndex"/>
++ </foreach>
++ <foreach array="myArray" item="myItem">
++ <assign location="sum" expr="sum + myItem"/>
++ </foreach>
++ <log label="after" expr="[sum,indexSum]"/>
++ </onentry>
++ <transition target="c" event="t" cond="sum === 50 && indexSum === 10"/>
++ </state>
++
++ <state id="c"/>
++
++ </scxml>