(hak) 36> hrl Test.hrl
*** Total parsing time = 0 ms
*** There are no errors
*** Do you want to see the XML serialization? (y/n) [y] > y

<rif:RuleSet>
  <rif:HornRule>
    <hrl:Implies>
      <hrl:Antecedent>
        <rcl:And>
          <rcl:Atom>
            <Rel>perishable</Rel>
            <Var>item</Var>
          </rcl:Atom>
          <rcl:Atom>
            <Rel>delivered</Rel>
            <Var>item</Var>
            <Var>deliverydate</Var>
          </rcl:Atom>
          <rcl:Atom>
            <Rel>scheduled</Rel>
            <Var>item</Var>
            <Var>scheduledate</Var>
          </rcl:Atom>
          <rcl:Atom>
            <Rel>timediff</Rel>
            <Var>diffdate</Var>
            <Var>deliverydate</Var>
            <Var>scheduledate</Var>
          </rcl:Atom>
          <rcl:Atom>
            <Rel>greaterThan</Rel>
            <Var>diffdate</Var>
            <rcl:Data>
              <Value>10</Value>
            </rcl:Data>
          </rcl:Atom>
        </rcl:And>
      </hrl:Antecedent>
      <hrl:Consequent>
        <rcl:Atom>
          <Rel>reject</Rel>
          <rcl:Ind>
            <Object>John</Object>
          </rcl:Ind>
          <Var>item</Var>
        </rcl:Atom>
      </hrl:Consequent>
    </hrl:Implies>
  </rif:HornRule>
  <rif:HornRule>
    <hrl:Implies>
      <hrl:Antecedent>
        <rcl:Naf>
          <rcl:Atom>
            <Rel>reject</Rel>
            <Var>customer</Var>
            <Var>item</Var>
          </rcl:Atom>
        </rcl:Naf>
      </hrl:Antecedent>
      <hrl:Consequent>
        <rcl:Atom>
          <Rel>accept</Rel>
          <Var>customer</Var>
          <Var>item</Var>
        </rcl:Atom>
      </hrl:Consequent>
    </hrl:Implies>
  </rif:HornRule>
</rif:RuleSet>

(hak) 37> hrl Test2.hrl 
*** Total parsing time = 16 ms
*** There are no errors
*** Do you want to see the XML serialization? (y/n) [y] > y

<rif:RuleSet>
  <rif:HornRule>
    <hrl:Implies>
      <hrl:Antecedent>
        <rcl:And>
          <rcl:Atom>
            <Rel>perishable</Rel>
            <Var>item</Var>
          </rcl:Atom>
          <rcl:Atom>
            <Rel>delivered</Rel>
            <Var>item</Var>
            <Var>deliverydate</Var>
          </rcl:Atom>
          <rcl:Atom>
            <Rel>scheduled</Rel>
            <Var>item</Var>
            <Var>scheduledate</Var>
          </rcl:Atom>
          <rcl:Atom>
            <Rel>timediff</Rel>
            <Var>diffdate</Var>
            <Var>deliverydate</Var>
            <Var>scheduledate</Var>
          </rcl:Atom>
          <rcl:Atom>
            <Rel>greaterThan</Rel>
            <Var>diffdate</Var>
            <rcl:Data>
              <Value>10</Value>
            </rcl:Data>
          </rcl:Atom>
        </rcl:And>
      </hrl:Antecedent>
      <hrl:Consequent>
        <rcl:Atom>
          <Rel>reject</Rel>
          <rcl:Ind>
            <Object>John</Object>
          </rcl:Ind>
          <Var>item</Var>
        </rcl:Atom>
      </hrl:Consequent>
    </hrl:Implies>
  </rif:HornRule>
  <rif:HornRule>
    <hrl:Implies>
      <hrl:Antecedent>
        <rcl:Or>
          <rcl:And>
            <rcl:Exists>
              <Var>buyer</Var>
              <rcl:Atom>
                <Rel>purchase</Rel>
                <Var>buyer</Var>
                <Var>seller</Var>
                <rcl:Expr>
                  <Fun>book</Fun>
                  <Var>author</Var>
                  <rcl:Ind>
                    <Object>LeRif</Object>
                  </rcl:Ind>
                </rcl:Expr>
                <rcl:Data>
                  <Value>49</Value>
                </rcl:Data>
              </rcl:Atom>
            </rcl:Exists>
            <rcl:Equal>
              <Var>seller</Var>
              <Var>author</Var>
            </rcl:Equal>
          </rcl:And>
          <rcl:And>
            <rcl:Equal>
              <Var>seller</Var>
              <rcl:Ind>
                <Object>Rifle</Object>
              </rcl:Ind>
            </rcl:Equal>
            <rcl:Forall>
              <Var>buyer</Var>
              <rcl:Neg>
                <rcl:Equal>
                  <Var>buyer</Var>
                  <Var>author</Var>
                </rcl:Equal>
              </rcl:Neg>
            </rcl:Forall>
          </rcl:And>
        </rcl:Or>
      </hrl:Antecedent>
      <hrl:Consequent>
        <rcl:Atom>
          <Rel>special</Rel>
          <Var>author</Var>
        </rcl:Atom>
      </hrl:Consequent>
    </hrl:Implies>
  </rif:HornRule>
</rif:RuleSet>
