Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extending Deliberation RuleML 1.01 syntax #31

Open
agiurca opened this issue Aug 22, 2014 · 1 comment
Open

Extending Deliberation RuleML 1.01 syntax #31

agiurca opened this issue Aug 22, 2014 · 1 comment

Comments

@agiurca
Copy link

agiurca commented Aug 22, 2014

Some rule languages, particularly F-logic, provide compact syntax for individual descriptions, e.g., isaac:man[hasFather->abraham; hasMother->sarah].. Would be able to provide an object -oriented syntax for individuals such as:

<Ind type="http://example.com/ontology/classes/Man" 
        iri="http://example.com/ontology/instances/12345">       
    <name>isaac</name>
     <slot>
       <Rel iri="http://example.com/ontology/classes/hasFather">hasFather</Rel>
       <Ind http://example.com/ontology/instances/123456>abraham</Ind>
     </slot>
     <slot>
       <Rel iri="http://example.com/ontology/classes/hasMother">hasMother</Rel>
       <Ind http://example.com/ontology/instances/1234567>sarah</Data>
     </slot>
</Ind>

This would encode the more verbose, making the encoding more accesible to OO-skilled developers:

<And>
 <Atom>
   <Rel iri="http://example.com/ontology/classes/Man">person</Rel>
   <Ind iri="http://example.com/ontology/instances/12345">isaac</Ind>   
 </Atom>
 <Atom>
  <Rel iri="http://example.com/ontology/properties/hasFather">hasFather</Rel>
  <Ind iri="http://example.com/ontology/instances/12345">isaac</Ind>   
  <Ind iri="http://example.com/ontology/instances/123456">abraham</Ind>
 </Atom>
 <Atom>
  <Rel iri="http://example.com/ontology/properties/hasMother">hasMother</Rel>
  <Ind iri="http://example.com/ontology/instances/12345">isaac</Ind>   
  <Ind iri="http://example.com/ontology/instances/1234567">sarah</Ind>
 </Atom>
</And>

Note that the same structure would also work for (e.g., allowing easy encoding of Y:man[hasMother->X])

@greenTara
Copy link
Member

The slotted syntax of RuleML would capture this as follows (if I am not mistaken)

<Atom>
  <oid><Ind type="http://example.com/ontology/classes/Man" 
        iri="http://example.com/ontology/instances/12345">isaac</Ind></oid>
  <slot>
       <Ind iri="http://example.com/ontology/classes/hasFather">hasFather</Ind>
       <Ind http://example.com/ontology/instances/123456>abraham</Ind>
     </slot>
     <slot>
       <Ind iri="http://example.com/ontology/classes/hasMother">hasMother</Indl>
       <Ind http://example.com/ontology/instances/1234567>sarah</Data>
     </slot>
</Atom>

or

<Atom>
  <oid><Ind iri="http://example.com/ontology/instances/12345">isaac</Ind></oid>
  <Rel iri="http://example.com/ontology/classes/Man"/>
  <slot>
       <Ind iri="http://example.com/ontology/classes/hasFather">hasFather</Ind>
       <Ind http://example.com/ontology/instances/123456>abraham</Ind>
     </slot>
     <slot>
       <Ind iri="http://example.com/ontology/classes/hasMother">hasMother</Indl>
       <Ind http://example.com/ontology/instances/1234567>sarah</Data>
     </slot>
</Atom>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants