Skip to content

Commit

Permalink
add example of PSOA dependent slots in exa/datalogPSOA
Browse files Browse the repository at this point in the history
The schemas associated with this example do not yet exist.
Partial implementation of RuleML/issues-ruleml#78
  • Loading branch information
greenTara committed Jul 10, 2018
1 parent 1f7225e commit aed13be
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions exa/DatalogPSOA/datalogPSOA.ruleml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://deliberation.ruleml.org/1.03/relaxng/datalogPSOA_relaxed.rnc"?>
<!--<?xml-model href="http://deliberation.ruleml.org/1.03/xsd/datalogPSOA.xsd" type="application/xml" schematypens="http://www.w3.org/2001/XMLSchema"?>-->
<RuleML xmlns="http://ruleml.org/spec"
xmlns:this="http://example.org/datalogPSOA.ruleml"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ruleml.org/spec http://deliberation.ruleml.org/1.03/xsd/datalogPSOA.xsd">

<!-- note the addition of the XML Schema namespace because a built-in datatype is used -->

<!-- a syntactic example rulebase for testing the Datalog PSOA RuleML sublanguage -->

<Assert mapClosure="universal">

<Implies node ="this:#rule1">
<if>
<Atom>
<oid><Ind>John</Ind></oid><op><Rel>TA</Rel></op>
<slotdep><Ind>workload</Ind><Ind>high</Ind></slotdep>
</Atom>
</if>
<then>
<Atom>
<meta>
<Atom><Rel>P</Rel></Atom>
</meta>
<op>
<Rel>friend</Rel>
</op>
<slot>
<Ind>time</Ind>
<Data xsi:type="xs:dateTime">2001-10-26T21:32:52+02:00</Data>
</slot>
<Var>x</Var>
<Var>y</Var>
<Ind>Steph</Ind>
<Reify>
<Reify>
<Implies>
<And>
<Atom>
<Rel>buy</Rel>
<Var>person</Var>
<Var>merchant</Var>
<Var>object</Var>
</Atom>
<Atom>
<Rel>keep</Rel>
<Var>person</Var>
<Var>object</Var>
</Atom>
</And>
<Atom>
<Rel>own</Rel>
<Var>person</Var>
<Var>object</Var>
</Atom>
</Implies>
</Reify>
</Reify>
<slot>
<Ind>location</Ind>
<Data xsi:type="xs:positiveInteger">2</Data>
</slot>
</Atom>
</then>
</Implies>



</Assert>

</RuleML>

1 comment on commit aed13be

@rimachaudhari
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.