Difference Analysis Generated by HtmlDiff on 18/10/2010 1:27 PM  

 
<?xml version="1.0" encoding="utf-8"?>
<RuleML xmlns="http://www.ruleml.org/1.0/xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ruleml.org/1.0/xsd http://www.ruleml.org/1.0/xsd/hornlog.xsd">

  <!-- a trivial example rulebase for testing the Hornlog RuleML sublanguage -->
  <content>
  <Assert mapClosure="universal">
      <formula>
    <Implies>
      <then>
        <Atom>
          <op>
            <Rel>asf</Rel>
          </op>
          <slot>
            <Ind>t</Ind>
            <Ind>b</Ind>
          </slot>
          <resl>
            <Var>c</Var>
          </resl>
        </Atom>
      </then>
      <if>
        <And>
              <formula>
          <Atom>
            <op>
              <Rel>friend</Rel>
            </op>
                  <arg index="1">
            <Ind>Jane</Ind>
                  </arg>
                  <arg index="2">
            <Ind>Joan</Ind>
                  </arg>
                  <arg index="3">
            <Ind>Jack</Ind>
                  </arg>
                  <arg index="4">
            <Var>y</Var>
                  </arg>
                  <arg index="5">
            <Ind>Frank</Ind>
                  </arg>
            <slot>
              <Ind>yar</Ind>
              <Expr>
                <op>
                  <Fun>constructor</Fun>
                </op>
                      <arg index="1">
                <Plex>
                  <slot>
                    <Ind>yar2</Ind>
                    <Ind>c</Ind>
                  </slot>
                  <resl>
                    <Var>c</Var>
                  </resl>
                </Plex>
                      </arg>
              </Expr>
            </slot>
          </Atom>
              </formula>
        </And>
      </if>
    </Implies>
      </formula>
      <formula>
    <Atom>
      <op>
        <Rel>some relation</Rel>
      </op>
      <slot>
        <Ind>role_name1</Ind>
        <Ind>role 1</Ind>
      </slot>
          <arg index="1">
      <Ind>constant a</Ind>
          </arg>
          <arg index="2">
      <Ind>constant b</Ind>
          </arg>
      <slot>
        <Ind>role_name2</Ind>
        <Ind>role 2</Ind>
      </slot>
    </Atom>
      </formula>
      <formula>
    <Atom>
      <op>
        <Rel>another relation</Rel>
      </op>
          <arg index="1">
      <Ind>constant c</Ind>
          </arg>
          <arg index="2">
      <Ind>constant d</Ind>
          </arg>
      <Expr>
        <op>
          <Fun>yac</Fun>
        </op>
        <repo>
          <Var>b</Var>
        </repo>
        <resl>
          <Plex>
            <slot>
              <Ind />
              <Ind>test</Ind>
            </slot>
          </Plex>
        </resl>
      </Expr>
    </Atom>
      </formula>
      <formula>
    <Atom>
      <op>
        <Rel>some relation</Rel>
      </op>
      <slot>
        <Ind>role_name1</Ind>
        <Ind>role 1</Ind>
      </slot>
          <arg index="1">
      <Ind>constant a</Ind>
          </arg>
      <Expr>
        <op>
          <Fun>empty</Fun>
        </op>
      </Expr>
          <arg index="3">
      <Ind>constant b</Ind>
          </arg>
          <arg index="4">
      <Skolem>constant b</Skolem>
          </arg>
      <repo>
        <Var>b</Var>
      </repo>
      <slot>
        <Ind>role_name2</Ind>
        <Ind>role 2</Ind>
      </slot>
    </Atom>
      </formula>
      <formula>
    <Atom>
      <op>
        <Rel>another relation</Rel>
      </op>
          <arg index="1">
      <Ind>constant c</Ind>
          </arg>
          <arg index="2">
      <Ind>constant d</Ind>
          </arg>
      <repo>
        <Var>x</Var>
      </repo>
      <slot>
        <Ind>role_name3</Ind>
        <Ind>role 3</Ind>
      </slot>
      <resl>
        <Plex>
          <slot>
            <Ind />
            <Ind>test</Ind>
          </slot>
        </Plex>
      </resl>
    </Atom>
      </formula>
      <formula>
    <Atom>
      <op>
        <Rel>yet another relation</Rel>
      </op>
          <arg index="1">
      <Skolem>constant b</Skolem>
          </arg>
          <arg index="2">
      <Ind>constant e</Ind>
          </arg>
          <arg index="3">
      <Ind>constant b</Ind>
          </arg>
      <slot>
        <Ind>role_name3</Ind>
        <Ind>role 3</Ind>
      </slot>
      <resl>
        <Var>b</Var>
      </resl>
    </Atom>
      </formula>
  </Assert>
  </content>
</RuleML>