<?xml version="1.0" encoding="UTF-8"?>
<program xmlns="http://www.nomoseed.org/program" name="reaction">
  <header xmlns="http://www.nomoseed.org/project">
    <author/>
    <copyright>
      <mention xml:lang="en"/>
    </copyright>
    <license name="">
      <mention xml:lang="en"/>
    </license>
    <datetime>2014-07-08T14:14:15Z</datetime>
    <version>0.0</version>
    <annotation>
      <documentation xml:lang="en">What is the context?</documentation>
    </annotation>
  </header>
  <subprograms xmlns:xi="http://www.w3.org/2001/XInclude">
    <inherite instance="body">
      <xi:include href="body.prg"/>
    </inherite>
  </subprograms>
  <body>
    <models xmlns:xi="http://www.w3.org/2001/XInclude">
      <import instance="body" subprogram="body">
        <xi:include href="body.mod"/>
      </import>
      <new instance="reaction">
        <xi:include href="reaction.mod" parse="xml"/>
      </new>
    </models>
    <scheme xmlns="http://www.nomoseed.org/program">
<rule name="detection_inconditional">
        <premise model="body" category="perception" type="hue">
          <information value="red" tolerance="0"/>
          <credibility tolerance="INF"/> 
          <timespan value="0" tolerance="0"/>
        </premise>
        <premise model="reaction" category="conception" type="reaction" inhibitor="true">
          <information tolerance="INF"/>
          <credibility tolerance="INF"/>
          <timespan value="-1" tolerance="INF"/>
        </premise> 
        <conclusion model="reaction" category="conception" type="reaction">
          <information value="reaction_inconditional" delay="MAX"/>
        </conclusion>
      </rule>
<rule name="reaction">
        <premise model="reaction" category="conception" type="reaction">
          <information tolerance="INF"/> 
          <credibility tolerance="INF"/>
          <timespan value="MIN" tolerance="0"/>
        </premise>
        <conclusion model="body" category="conception" type="sound"> 
          <information value="red"/>
        </conclusion>
      </rule>
<rule name="end_reaction_inconditional">
        <premise model="reaction" category="conception" type="reaction">
          <information value="reaction_inconditional" tolerance="0"/> 
          <credibility tolerance="INF"/>
          <timespan value="-1" tolerance="INF"/>
        </premise>
        <premise model="body" category="command" type="sound">
          <information value="red" tolerance="0"/>
          <credibility tolerance="INF"/>
          <timespan value="0" tolerance="0"/>
        </premise>
        <conclusion model="reaction" category="conception" type="reaction">
          <information value="reaction_inconditional"/>
        </conclusion>
      </rule>
<rule name="end_reaction_conditional">
        <premise model="reaction" category="conception" type="reaction">
          <information value="reaction_conditional" tolerance="0"/> 
          <credibility tolerance="INF"/>
          <timespan value="-1" tolerance="INF"/>
        </premise>
        <premise model="body" category="perception" type="hue">
          <information value="red" tolerance="0"/>
          <credibility tolerance="INF"/> 
          <timespan value="0" tolerance="0"/>
        </premise>
        <conclusion model="reaction" category="conception" type="reaction">
          <information value="reaction_conditional"/>
        </conclusion>
      </rule>
</scheme>
  </body>
</program>
