<?xml version="1.0" encoding="UTF-8"?>

<RuleML
xmlns="http://www.ruleml.org/0.9/xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ruleml.org/0.9/xsd http://www.ruleml.org/0.9/xsd/datalog.xsd"
>

<!-- a trivial example rulebase for testing the Datalog RuleML sublanguage -->

<Assert mapClosure="universal">

<formula>
<Implies>
  <oid><Ind>(implication) rule label</Ind></oid>
  <head>
     <Atom>
      <op><Rel>friend</Rel></op>
      <slot><Ind>t</Ind><Var>b</Var></slot>
      <arg index="1"><Var>x</Var></arg>
      <arg index="2"><Var>y</Var></arg>
      <arg index="3"><Ind>Steph</Ind></arg>
     </Atom>
  </head>
  <body>
    <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>
    </Atom>
     </formula>
    </And>
  </body>
</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>
      </Atom>
</formula>

<formula>
    <Atom>
      <op><Rel>yet another relation</Rel></op>
      <arg index="1"><Ind>constant e</Ind></arg>
      <arg index="2"><Ind>constant b</Ind></arg>
      <slot><Ind>role_name3</Ind><Ind>role 3</Ind></slot>
    </Atom>
</formula>

</Assert>

</RuleML>
