Cookbook

Appendix A: ANML Code

This section provides the ANML code for all sample automata networks listed in this guide.

Comparing Values

<?xml version="1.0" encoding="UTF-8"?>
<automata-network name="comparator_3_bit" id="comparator_3_bit">
	<description></description>
	<state-transition-element id="s1" symbol-set="#" start="all-input">
		<activate-on-match element="L0"/>
		<activate-on-match element="L1"/>
		<activate-on-match element="L2"/>
		<activate-on-match element="L3"/>
		<activate-on-match element="L4"/>
		<activate-on-match element="L5"/>
		<activate-on-match element="L6"/>
		<activate-on-match element="R0"/>
		<activate-on-match element="R1"/>
		<activate-on-match element="R2"/>
		<activate-on-match element="R3"/>
		<activate-on-match element="R4"/>
		<activate-on-match element="R5"/>
		<activate-on-match element="R6"/>
	</state-transition-element>
	<state-transition-element id="L0" symbol-set="a">
		<activate-on-match element="greater"/>
		<activate-on-match element="R0"/>
	</state-transition-element>
	<state-transition-element id="L1" symbol-set="b">
		<activate-on-match element="greater"/>
		<activate-on-match element="R1"/>
	</state-transition-element>
	<state-transition-element id="L2" symbol-set="c">
		<activate-on-match element="greater"/>
		<activate-on-match element="R2"/>
	</state-transition-element>
	<state-transition-element id="L3" symbol-set="d">
		<activate-on-match element="greater"/>
		<activate-on-match element="R3"/>
	</state-transition-element>
	<state-transition-element id="L4" symbol-set="e">
		<activate-on-match element="greater"/>
		<activate-on-match element="R4"/>
	</state-transition-element>
	<state-transition-element id="L5" symbol-set="f">
		<activate-on-match element="greater"/>
		<activate-on-match element="R5"/>
	</state-transition-element>
	<state-transition-element id="L6" symbol-set="g">
		<activate-on-match element="greater"/>
		<activate-on-match element="R6"/>
	</state-transition-element>
	<state-transition-element id="R0" symbol-set="[b-h]">
		<activate-on-match element="less"/>
		<activate-on-match element="L0"/>
	</state-transition-element>
	<state-transition-element id="R1" symbol-set="[c-h]">
		<activate-on-match element="L1"/>
		<activate-on-match element="less"/>
	</state-transition-element>
	<state-transition-element id="R2" symbol-set="[d-h]">
		<activate-on-match element="less"/>
		<activate-on-match element="L2"/>
	</state-transition-element>
 <state-transition-element id="R3" symbol-set="[e-h]">
		<activate-on-match element="less"/>
		<activate-on-match element="L3"/>
	</state-transition-element>
	<state-transition-element id="R4" symbol-set="[f-h]">
		<activate-on-match element="L4"/>
		<activate-on-match element="less"/>
	</state-transition-element>
	<state-transition-element id="R5" symbol-set="[g-h]">
		<activate-on-match element="L5"/>
		<activate-on-match element="less"/>
	</state-transition-element>
	<state-transition-element id="R6" symbol-set="h" star
		<activate-on-match element="L6"/>
		<activate-on-match element="less"/>
	</state-transition-element>
	<state-transition-element id="greater" symbol-set="#">
		<report-on-match/>
	</state-transition-element>
	<state-transition-element id="less" symbol-set="#">
		<report-on-match/>
	</state-transition-element>
</automata-network>

Creating a Four-Bit Non-Contiguous Counter

<?xml version="1.0" encoding="UTF-8"?>
<automata-network name="counter_non_contig_with_4bit_display" id="counter_non_contig_with_4bit_display">
	<description></description>
	<state-transition-element id="a1" symbol-set="A" start="start-of-data">
		<activate-on-match element="a2"/>
		<activate-on-match element="a1h"/>
		<activate-on-match element="b0"/>
	</state-transition-element>
	<state-transition-element id="a2" symbol-set="A">
		<activate-on-match element="a3"/>
		<activate-on-match element="a2h"/>
		<activate-on-match element="b1"/>
	</state-transition-element>
	<state-transition-element id="a3" symbol-set="A">
		<activate-on-match element="a4"/>
		<activate-on-match element="a3h"/>
		<activate-on-match element="b1"/>
		<activate-on-match element="b0"/>
	</state-transition-element>
	<state-transition-element id="a4" symbol-set="A">
		<activate-on-match element="a5"/>
		<activate-on-match element="a4h"/>
		<activate-on-match element="b2"/>
	</state-transition-element>
	<state-transition-element id="a5" symbol-set="A">
		<activate-on-match element="a6"/>
		<activate-on-match element="a5h"/>
		<activate-on-match element="b2"/>
		<activate-on-match element="b0"/>
	</state-transition-element>
	<state-transition-element id="a6" symbol-set="A">
		<activate-on-match element="a7"/>
		<activate-on-match element="a6h"/>
		<activate-on-match element="b2"/>
		<activate-on-match element="b1"/>
	</state-transition-element>
	<state-transition-element id="a7" symbol-set="A">
		<activate-on-match element="a8"/>
		<activate-on-match element="a7h"/>
		<activate-on-match element="b2"/>
		<activate-on-match element="b1"/>
		<activate-on-match element="b0"/>
	</state-transition-element>
	<state-transition-element id="a8" symbol-set="A">
		<activate-on-match element="a9"/>
		<activate-on-match element="a8h"/>
		<activate-on-match element="b3"/>
	</state-transition-element>
	<state-transition-element id="a9" symbol-set="A">
		<activate-on-match element="a10"/>
		<activate-on-match element="a9h"/>
		<activate-on-match element="b3"/>
		<activate-on-match element="b0"/>
	</state-transition-element>
	<state-transition-element id="a10" symbol-set="A">
		<activate-on-match element="a11"/>
		<activate-on-match element="a10h"/>
		<activate-on-match element="b3"/>
		<activate-on-match element="b1"/>
	</state-transition-element>
	<state-transition-element id="a11" symbol-set="A">
		<activate-on-match element="a12"/>
		<activate-on-match element="a11h"/>
		<activate-on-match element="b3"/>
		<activate-on-match element="b1"/>
		<activate-on-match element="b0"/>
	</state-transition-element>
	<state-transition-element id="a12" symbol-set="A">
		<activate-on-match element="a13"/>
		<activate-on-match element="a12h"/>
		<activate-on-match element="b3"/>
		<activate-on-match element="b2"/>
	</state-transition-element>
	<state-transition-element id="a13" symbol-set="A">
		<activate-on-match element="a13h"/>
		<activate-on-match element="a14"/>
		<activate-on-match element="b3"/>
		<activate-on-match element="b2"/>
		<activate-on-match element="b0"/>
	</state-transition-element>
	<state-transition-element id="a14" symbol-set="A">
		<activate-on-match element="a14h"/>
		<activate-on-match element="b3"/>
		<activate-on-match element="b2"/>
		<activate-on-match element="b1"/>
		<activate-on-match element="a15"/>
	</state-transition-element>
	<state-transition-element id="a15" symbol-set="A">
		<activate-on-match element="a16"/>
		<activate-on-match element="a15h"/>
		<activate-on-match element="b3"/>
		<activate-on-match element="b2"/>
		<activate-on-match element="b1"/>
		<activate-on-match element="b0"/>
	</state-transition-element>
	<state-transition-element id="a16" symbol-set="A">
		<report-on-match/>
		<activate-on-match element="a1"/>
		<activate-on-match element="a0h"/>
	</state-transition-element>
	<state-transition-element id="a0h" symbol-set="[^A#]" start="start-of-data">
		<activate-on-match element="a1"/>
		<activate-on-match element="a0h"/>
	</state-transition-element>
	<state-transition-element id="a1h" symbol-set="[^A#]">
		<activate-on-match element="a2"/>
		<activate-on-match element="a1h"/>
		<activate-on-match element="b0"/>
	</state-transition-element>
	<state-transition-element id="a2h" symbol-set="[^A#]">
		<activate-on-match element="a3"/>
		<activate-on-match element="a2h"/>
		<activate-on-match element="b1"/>
	</state-transition-element>
	<state-transition-element id="a3h" symbol-set="[^A#]">
		<activate-on-match element="a4"/>
		<activate-on-match element="a3h"/>
		<activate-on-match element="b1"/>
		<activate-on-match element="b0"/>
	</state-transition-element>
	<state-transition-element id="a4h" symbol-set="[^A#]">
		<activate-on-match element="a5"/>
		<activate-on-match element="a4h"/>
		<activate-on-match element="b2"/>
	</state-transition-element>
	<state-transition-element id="a5h" symbol-set="[^A#]">
		<activate-on-match element="a6"/>
		<activate-on-match element="a5h"/>
		<activate-on-match element="b2"/>
		<activate-on-match element="b0"/>
	</state-transition-element>
	<state-transition-element id="a6h" symbol-set="[^A#]">
		<activate-on-match element="a7"/>
		<activate-on-match element="a6h"/>
		<activate-on-match element="b2"/>
		<activate-on-match element="b1"/>
	</state-transition-element>
	<state-transition-element id="a7h" symbol-set="[^A#]">
		<activate-on-match element="a8"/>
		<activate-on-match element="a7h"/>
		<activate-on-match element="b2"/>
		<activate-on-match element="b1"/>
		<activate-on-match element="b0"/>
	</state-transition-element>
	<state-transition-element id="a8h" symbol-set="[^A#]">
		<activate-on-match element="a9"/>
		<activate-on-match element="a8h"/>
		<activate-on-match element="b3"/>
	</state-transition-element>
	<state-transition-element id="a9h" symbol-set="[^A#]">
		<activate-on-match element="a10"/>
		<activate-on-match element="a9h"/>
		<activate-on-match element="b3"/>
		<activate-on-match element="b0"/>
	</state-transition-element>
	<state-transition-element id="a10h" symbol-set="[^A#]">
		<activate-on-match element="a11"/>
		<activate-on-match element="a10h"/>
<activate-on-match element="b3"/>
		<activate-on-match element="b1"/>
	</state-transition-element>
	<state-transition-element id="a11h" symbol-set="[^A#]">
		<activate-on-match element="a12"/>
		<activate-on-match element="a11h"/>
		<activate-on-match element="b3"/>
		<activate-on-match element="b1"/>
		<activate-on-match element="b0"/>
	</state-transition-element>
	<state-transition-element id="a12h" symbol-set="[^A#]">
		<activate-on-match element="a13"/>
		<activate-on-match element="a12h"/>
		<activate-on-match element="b3"/>
		<activate-on-match element="b2"/>
	</state-transition-element>
	<state-transition-element id="a13h" symbol-set="[^A#]">
		<activate-on-match element="a13h"/>
		<activate-on-match element="a14"/>
		<activate-on-match element="b3"/>
		<activate-on-match element="b2"/>
		<activate-on-match element="b0"/>
	</state-transition-element>
	<state-transition-element id="a14h" symbol-set="[^A#]">
		<activate-on-match element="a14h"/>
		<activate-on-match element="b3"/>
		<activate-on-match element="b2"/>
		<activate-on-match element="b1"/>
		<activate-on-match element="a15"/>
	</state-transition-element>
	<state-transition-element id="a15h" symbol-set="[^A#]">
		<activate-on-match element="a16"/>
		<activate-on-match element="a15h"/>
		<activate-on-match element="b3"/>
		<activate-on-match element="b2"/>
		<activate-on-match element="b1"/>
		<activate-on-match element="b0"/>
	</state-transition-element>
	<state-transition-element id="reset" symbol-set="!" start="all-input">
		<activate-on-match element="a1"/>
		<activate-on-match element="a0h"/>
	</state-transition-element>
	<state-transition-element id="b0" symbol-set="#">
		<report-on-match/>
	</state-transition-element>
	<state-transition-element id="b1" symbol-set="#">
		<report-on-match/>
	</state-transition-element>
	<state-transition-element id="b2" symbol-set="#">
		<report-on-match/>
	</state-transition-element>
	<state-transition-element id="b3" symbol-set="#">
		<report-on-match/>
	</state-transition-element>
</automata-network>

Creating a Two-Bit Output Counter

<?xml version="1.0" encoding="UTF-8"?>
<automata-network name="counter_with_2bit_display" id="counter_with_2bit_display">
	<description></description>
	<state-transition-element id="a3" symbol-set="A">
		<activate-on-match element="a4"/>
		<activate-on-match element="b0"/>
		<activate-on-match element="b1"/>
	</state-transition-element>
	<state-transition-element id="a4" symbol-set="A">
		<report-on-match/>
		<activate-on-match element="a1"/>
	</state-transition-element>
	<state-transition-element id="b0" symbol-set="#">
		<report-on-match/>
		<activate-on-match element="a1"/>
	</state-transition-element>
	<state-transition-element id="b1" symbol-set="#">
		<report-on-match/>
		<activate-on-match element="a1"/>
	</state-transition-element>
	<state-transition-element id="a2" symbol-set="A">
		<activate-on-match element="a3"/>
		<activate-on-match element="b1"/>
	</state-transition-element>
	<state-transition-element id="a1" symbol-set="A" start="start-of-data">
		<activate-on-match element="b0"/>
		<activate-on-match element="a2"/>
	</state-transition-element>
</automata-network>

Finding an Ordered Sequence of a Fixed Size

STEs Only

<?xml version="1.0" encoding="UTF-8"?>
<automata-network name="abc17" id="abc17_ste">
    <description></description>
    <state-transition-element id="c7" symbol-set="c">
        <activate-on-match element="c8"/>
    </state-transition-element>
    <state-transition-element id="c8"symbol-set="c">
        <report-on-match/>
    </state-transition-element>
    <state-transition-element id="c6"symbol-set="c">
        <activate-on-match element="c7"/>
    </state-transition-element>
    <state-transition-element id="c5" symbol-set="c">
        <activate-on-match element="c6"/>
    </state-transition-element>
    <state-transition-element id="b7" symbol-set="b">
        <activate-on-match element="c8"/>
    </state-transition-element>
    <state-transition-element id="b6" symbol-set="b">
        <activate-on-match element="c7"/>
        <activate-on-match element="b7"/>
    </state-transition-element>
    <state-transition-element id="b5" symbol-set="b">
        <activate-on-match element="c6"/>
        <activate-on-match element="b6"/>
    </state-transition-element>
    <state-transition-element id="b4" symbol-set="b">
        <activate-on-match element="c5"/>
        <activate-on-match element="b5"/>
    </state-transition-element>
    <state-transition-element id="b3" symbol-set="b">
        <activate-on-match element="b4"/>
        <activate-on-match element="c4"/>
    </state-transition-element>
    <state-transition-element id="b2" symbol-set="b">
        <activate-on-match element="b3"/>
        <activate-on-match element="c3"/>
    </state-transition-element>
    <state-transition-element id="a6" symbol-set="a">
        <activate-on-match element="b7"/>
    </state-transition-element>
    <state-transition-element id="a5" symbol-set="a">
        <activate-on-match element="b6"/>
        <activate-on-match element="a6"/>
    </state-transition-element>
    <state-transition-element id="a3" symbol-set="a">
        <activate-on-match element="b4"/>
        <activate-on-match element="a4"/>
    </state-transition-element>
    <state-transition-element id="a4" symbol-set="a">
        <activate-on-match element="b5"/>
        <activate-on-match element="a5"/>
    </state-transition-element>
    <state-transition-element id="a2" symbol-set="a">
        <activate-on-match element="b3"/>
        <activate-on-match element="a3"/>
    </state-transition-element>
    <state-transition-element id="start" symbol-set="a" start="all-input">
        <activate-on-match element="b2"/>
        <activate-on-match element="a2"/>
    </state-transition-element>
    <state-transition-element id="c4" symbol-set="c">
        <activate-on-match element="c5"/>
    </state-transition-element>
    <state-transition-element id="c3" symbol-set="c">
        <activate-on-match element="c4"/>
    </state-transition-element>
        </automata-network>

STEs, Counter, Boolean Elements

<?xml version="1.0" encoding="UTF-8"?>
<automata-network name="abc17" id="abc17_ste">
    <description></description>
    <state-transition-element id="nab"symbol-set="[^ab]">
        <activate-on-match element="Counter:rst"/>
    </state-transition-element>
    <state-transition-element id="nbc" symbol-set="[^bc]">
        <activate-on-match element="Counter:rst"/>
    </state-transition-element>
    <state-transition-element id="nc" symbol-set="[^c]">
        <activate-on-match element="Counter:rst"/>
    </state-transition-element>
    <and id="AND_found">
        <report-on-high/>
    </and>
    <state-transition-element id="b" symbol-set="b">
        <activate-on-match element="nbc"/>
        <activate-on-match element="b"/>
        <activate-on-match element="c"/>
        <activate-on-match element="Counter:cnt"/>
    </state-transition-element>
    <state-transition-element id="c" symbol-set="c">
        <activate-on-match element="nc"/>
        <activate-on-match element="AND_found"/>
        <activate-on-match element="c"/>
        <activate-on-match element="Counter:cnt"/>
    </state-transition-element>
    <state-transition-element id="fna" symbol-set="[^a]" start="all-input">
        <activate-on-match element="fa"/>
    </state-transition-element>
    <state-transition-element id="fa" symbol-set="a" start="start-of-data">
        <activate-on-match element="nab"/>
        <activate-on-match element="b"/>
        <activate-on-match element="a"/>
    </state-transition-element>
    <state-transition-element id="a" symbol-set="a">
        <activate-on-match element="nab"/>
        <activate-on-match element="b"/>
        <activate-on-match element="a"/>
        <activate-on-match element="Counter:cnt"/>
        </state-transition-element>
    <counter id="Counter" target="6" at-target="pulse">
        <activate-on-target element="lc"/>
    </counter>
    <state-transition-element id="lc" symbol-set="c">
        <activate-on-match element="AND_found"/>
    </state-transition-element>
</automata-network>

Creating a Fuzzy Match Dictionary

<?xml version="1.0" encoding="UTF-8"?>
<automata-network name="fuzzy_match_dictionary" id="fuzzy_match_dictionary">
	<description></description>
	<state-transition-element id="start" symbol-set="!" start="all-input">
		<activate-on-match element="21"/>
		<activate-on-match element="11"/>
		<activate-on-match element="31"/>
		<activate-on-match element="p1"/>
		<activate-on-match element="cable_cnt:rst"/>
		<activate-on-match element="jelly_cnt:rst"/>
		<activate-on-match element="flaps_cnt:rst"/>
	</state-transition-element>
	<state-transition-element id="p1" symbol-set="*">
		<activate-on-match element="32"/>
		<activate-on-match element="12"/>
		<activate-on-match element="22"/>
		<activate-on-match element="p2"/>
	</state-transition-element>
	<state-transition-element id="p2" symbol-set="*">
		<activate-on-match element="p3"/>
		<activate-on-match element="33"/>
		<activate-on-match element="23"/>
		<activate-on-match element="13"/>
	</state-transition-element>
	<state-transition-element id="p3" symbol-set="*">
		<activate-on-match element="34"/>
		<activate-on-match element="24"/>
		<activate-on-match element="p4"/>
		<activate-on-match element="14"/>
	</state-transition-element>
	<state-transition-element id="p4" symbol-set="*">
		<activate-on-match element="35"/>
		<activate-on-match element="25"/>
		<activate-on-match element="15"/>
		<activate-on-match element="p5"/>
	</state-transition-element>
	<state-transition-element id="p5" symbol-set="*">
		<activate-on-match element="p6"/>
	</state-transition-element>
	<state-transition-element id="p6" symbol-set="#">
		<activate-on-match element="p7"/>
		<activate-on-match element="cable_cnt:cnt"/>
		<activate-on-match element="jelly_cnt:cnt"/>
		<activate-on-match element="flaps_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="p7" symbol-set="#">
		<activate-on-match element="p8"/>
		<activate-on-match element="cable_cnt:cnt"/>
		<activate-on-match element="jelly_cnt:cnt"/>
		<activate-on-match element="flaps_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="p8" symbol-set="#">
		<activate-on-match element="p9"/>
		<activate-on-match element="cable_cnt:cnt"/>
		<activate-on-match element="jelly_cnt:cnt"/>
		<activate-on-match element="flaps_cnt:cnt"/>
	</state-transition-element>
<state-transition-element id="p9" symbol-set="#">
		<activate-on-match element="cable_cnt:cnt"/>
		<activate-on-match element="jelly_cnt:cnt"/>
		<activate-on-match element="flaps_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="11" symbol-set="c">
		<activate-on-match element="cable_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="12" symbol-set="a">
		<activate-on-match element="cable_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="13" symbol-set="b">
		<activate-on-match element="cable_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="14" symbol-set="l">
		<activate-on-match element="cable_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="15" symbol-set="e">
		<activate-on-match element="cable_cnt:cnt"/>
	</state-transition-element>
	<counter id="cable_cnt" target="5" at-target="pulse">
		<report-on-target/>
	</counter>
	<state-transition-element id="21" symbol-set="j">
		<activate-on-match element="jelly_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="22" symbol-set="e">
		<activate-on-match element="jelly_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="23" symbol-set="l">
		<activate-on-match element="jelly_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="24" symbol-set="l">
		<activate-on-match element="jelly_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="25" symbol-set="y">
		<activate-on-match element="jelly_cnt:cnt"/>
	</state-transition-element>
	<counter id="jelly_cnt" target="5" at-target="pulse">
		<report-on-target/>
	</counter>
	<state-transition-element id="31" symbol-set="f">
		<activate-on-match element="flaps_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="32" symbol-set="l">
		<activate-on-match element="flaps_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="33" symbol-set="a">
		<activate-on-match element="flaps_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="34" symbol-set="p">
		<activate-on-match element="flaps_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="35" symbol-set="s">
		<activate-on-match element="flaps_cnt:cnt"/>
	</state-transition-element>
	<counter id="flaps_cnt" target="5" at-target="pulse">
		<report-on-target/>
	</counter>
</automata-network>

Calculating Hamming Distance

<?xml version="1.0" encoding="UTF-8"?>
<automata-network name="hamming_distance" id="hamming_distance">
	<description></description>
	<state-transition-element id="start" symbol-set="!" start="all-input">
		<activate-on-match element="p1"/>
		<activate-on-match element="cable_cnt:rst"/>
		<activate-on-match element="11"/>
	</state-transition-element>
	<state-transition-element id="p1" symbol-set="*">
		<activate-on-match element="12"/>
		<activate-on-match element="p2"/>
	</state-transition-element>
	<state-transition-element id="p2" symbol-set="*">
		<activate-on-match element="p3"/>
		<activate-on-match element="13"/>
	</state-transition-element>
	<state-transition-element id="p3" symbol-set="*">
		<activate-on-match element="p4"/>
		<activate-on-match element="14"/>
	</state-transition-element>
	<state-transition-element id="p4" symbol-set="*">
		<activate-on-match element="15"/>
		<activate-on-match element="p5"/>
	</state-transition-element>
	<state-transition-element id="p5" symbol-set="*">
		<activate-on-match element="p6"/>
	</state-transition-element>
	<state-transition-element id="p6" symbol-set="#">
		<activate-on-match element="p7"/>
		<activate-on-match element="cable_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="p7" symbol-set="#">
		<activate-on-match element="p8"/>
		<activate-on-match element="cable_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="p8" symbol-set="#">
		<activate-on-match element="p9"/>
		<activate-on-match element="cable_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="p9" symbol-set="#">
		<activate-on-match element="cable_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="11" symbol-set="c">
		<activate-on-match element="cable_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="12" symbol-set="a">
		<activate-on-match element="cable_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="13" symbol-set="b">
		<activate-on-match element="cable_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="14" symbol-set="l">
		<activate-on-match element="cable_cnt:cnt"/>
	</state-transition-element>
	<state-transition-element id="15" symbol-set="e">
		<activate-on-match element="cable_cnt:cnt"/>
	</state-transition-element>
 <counter id="cable_cnt" target="5" at-target="pulse">
		<report-on-target/>
	</counter>
</automata-network>

Tracking Odd or Even Symbol Count

<?xml version="1.0" encoding="UTF-8"?>
<automata-network name="odd_or_even_symbol_count" id="odd_or_even_symbol_count">
	<description></description>
	<state-transition-element id="odd" symbol-set="#">
		<report-on-match/>
	</state-transition-element>
	<state-transition-element id="even" symbol-set="#">
		<report-on-match/>
	</state-transition-element>
	<state-transition-element id="odd_count" symbol-set="A">
		<activate-on-match element="odd"/>
		<activate-on-match element="even_count"/>
	</state-transition-element>
	<state-transition-element id="lead" symbol-set="#" start="start-of-data">
		<activate-on-match element="odd_count"/>
		<activate-on-match element="lead"/>
	</state-transition-element>
	<state-transition-element id="even_count" symbol-set="A">
		<activate-on-match element="even"/>
		<activate-on-match element="odd_count"/>
	</state-transition-element>
</automata-network>

Reporting Occurrences of Exactly One Value

<?xml version="1.0" encoding="UTF-8"?>
<automata-network name="report_occurrences_of_exactly_one" id="report_occurrences_of_exactly_one">
	<description></description>
	<or id="b1" high-only-on-eod="true">
		<report-on-high/>
	</or>
	<state-transition-element id="q1" symbol-set="[^a]" start="start-of-data">
		<activate-on-match element="q1"/>
		<activate-on-match element="q2"/>
	</state-transition-element>
	<state-transition-element id="q2" symbol-set="a" start="start-of-data">
		<activate-on-match element="b1"/>
		<activate-on-match element="q3"/>
	</state-transition-element>
	<state-transition-element id="q3" symbol-set="[^a]">
		<activate-on-match element="b1"/>
		<activate-on-match element="q3"/>
	</state-transition-element>
</automata-network>

Searching for a Single Mismatch

<?xml version="1.0" encoding="UTF-8"?>
<automata-network id="hello_world" name="hello_world">
    <description>This automaton reports when it finds the words "Hello World" 
        with up to 1 mismatch</description>
	<state-transition-element id="a1" symbol-set="H" start="all-input">
		<activate-on-match element="a2"/>
		<activate-on-match element="b2"/>
	</state-transition-element>
	<state-transition-element id="a2" symbol-set="e">
		<activate-on-match element="a3"/>
		<activate-on-match element="b3"/>
	</state-transition-element>
	<state-transition-element id="a3" symbol-set="l">
		<activate-on-match element="a4"/>
		<activate-on-match element="b4"/>
	</state-transition-element>
	<state-transition-element id="a4" symbol-set="l">
		<activate-on-match element="a5"/>
		<activate-on-match element="b5"/>
	</state-transition-element>
	<state-transition-element id="a5" symbol-set="o">
		<activate-on-match element="a6"/>
		<activate-on-match element="b6"/>
	</state-transition-element>
	<state-transition-element id="a6" symbol-set="[\x20]">
		<activate-on-match element="a7"/>
		<activate-on-match element="b7"/>
</state-transition-element>
	<state-transition-element id="a7" symbol-set="W">
		<activate-on-match element="a8"/>
		<activate-on-match element="b8"/>
	</state-transition-element>
	<state-transition-element id="a8" symbol-set="o">
		<activate-on-match element="a9"/>
		<activate-on-match element="b9"/>
	</state-transition-element>
	<state-transition-element id="a9" symbol-set="r">
		<activate-on-match element="a10"/>
		<activate-on-match element="b10"/>
	</state-transition-element>
	<state-transition-element id="a10" symbol-set="l">
		<activate-on-match element="a11"/>
		<activate-on-match element="b11"/>
	</state-transition-element>
	<state-transition-element id="a11" symbol-set="d">
		<report-on-match/>
	</state-transition-element>
	<state-transition-element id="b1" symbol-set="[^H]" start="all-input">
		<activate-on-match element="c2"/>
	</state-transition-element>
	<state-transition-element id="b2" symbol-set="[^e]">
		<activate-on-match element="c3"/>
	</state-transition-element>
	<state-transition-element id="b3" symbol-set="[^l]">
		<activate-on-match element="c4"/>
	</state-transition-element>
	<state-transition-element id="b4" symbol-set="[^l]">
		<activate-on-match element="c5"/>
	</state-transition-element>
	<state-transition-element id="b5" symbol-set="[^o]">
		<activate-on-match element="c6"/>
	</state-transition-element>
	<state-transition-element id="b6" symbol-set="[^\x20]">
		<activate-on-match element="c7"/>
	</state-transition-element>
	<state-transition-element id="b7" symbol-set="[^W]">
		<activate-on-match element="c8"/>
	</state-transition-element>
	<state-transition-element id="b8" symbol-set="[^o]">
		<activate-on-match element="c9"/>
	</state-transition-element>
	<state-transition-element id="b9" symbol-set="[^r]">
		<activate-on-match element="c10"/>
	</state-transition-element>
	<state-transition-element id="b10" symbol-set="[^l]">
		<activate-on-match element="c11"/>
	</state-transition-element>
	<state-transition-element id="b11" symbol-set="[^d]">
		<report-on-match/>
	</state-transition-element>
	<state-transition-element id="c2" symbol-set="e">
		<activate-on-match element="c3"/>
	</state-transition-element>
	<state-transition-element id="c3" symbol-set="l">
		<activate-on-match element="c4"/>
	</state-transition-element>
	<state-transition-element id="c4" symbol-set="l">
		<activate-on-match element="c5"/>
	</state-transition-element>
	<state-transition-element id="c5" symbol-set="o">
		<activate-on-match element="c6"/>
	</state-transition-element>
	<state-transition-element id="c6" symbol-set="[\x20]">
		<activate-on-match element="c7"/>
	</state-transition-element>
	<state-transition-element id="c7" symbol-set="W">
		<activate-on-match element="c8"/>
	</state-transition-element>
	<state-transition-element id="c8" symbol-set="o">
		<activate-on-match element="c9"/>
	</state-transition-element>
	<state-transition-element id="c9" symbol-set="r">
		<activate-on-match element="c10"/>
	</state-transition-element>
	<state-transition-element id="c10" symbol-set="l">
		<activate-on-match element="c11"/>
	</state-transition-element>
	<state-transition-element id="c11" symbol-set="d">
		<report-on-match/>
	</state-transition-element>
</automata-network>