example of RDF including some structural representation of variables

From: Sandro Hawke (sandro@w3.org)
Date: 08/26/03

  • Next message: Harold Boley: "Java-based parser and generator to translate between the PR syntax and OO RuleML"
    > concrete/exchange syntax alternatives (all - 25 min)
    > 
    >   ASCII syntax (e.g. n3)
    > 
    >   XML syntax
    > 
    >   RDF including some structural representation of variables
    > 
    >   RDF extended to support variables
    
    Here's an example, based on some work (called "LX") I did about a year
    ago, for encoding FOL in RDF.
    
    ====================== n3 of rule
    
    @prefix : <http://example.com/#> .
    { :a :b ?X } log:implies { :a :c ?X }.
    
    
    ====================== RDF/XML With Class Names
    
    <rdf:RDF xmlns="http://www.w3.org/2003/02/04/LX#"
        xmlns:log="http://www.w3.org/2000/10/swap/log#"
        xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    
        <UniversalQuantification>
            <rdf:type rdf:resource="http://www.w3.org/2003/02/04/LX#TrueSentence"/>
            <subformula>
              <Conditional>
                <condLeft>
                  <Triple>
                    <subjectTerm>
                      <Constant>
                        <denotation rdf:resource="http://example.com/#a"/>
                      </Constant>
                    </subjectTerm>
                    <predicateTerm>
                      <Constant>
                        <denotation rdf:resource="http://example.com/#b"/>
                      </Constant>
                    </predicateTerm>
                    <objectTerm rdf:resource="#_gg2"/>
                  </Triple>
                </condLeft>
                <condRight>
                  <Triple>
                    <subjectTerm>
                      <Constant>
                        <denotation rdf:resource="http://example.com/#a"/>
                      </Constant>
                    </subjectTerm>
                    <predicateTerm>
                      <Constant>
                        <denotation rdf:resource="http://example.com/#c"/>
                      </Constant>
                    </predicateTerm>
                    <objectTerm rdf:resource="#_gg2"/>
                  </Triple>
                </condRight>
              </Conditional>
            </subformula>
            <univar rdf:resource="#_gg2"/>
        </UniversalQuantification>
        <Variable rdf:about="#_gg2" />
    </rdf:RDF>
    
    ====================== RDF/XML Without Class Names (shorter)
    
    <rdf:RDF xmlns="http://www.w3.org/2003/02/04/LX#"
        xmlns:log="http://www.w3.org/2000/10/swap/log#"
        xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    
        <rdf:Description>
            <rdf:type rdf:resource="http://www.w3.org/2003/02/04/LX#TrueSentence"/>
            <subformula rdf:parseType="Resource">
                <condLeft rdf:parseType="Resource">
                    <objectTerm rdf:resource="#_gg2"/>
                    <predicateTerm rdf:parseType="Resource">
                        <denotation rdf:resource="http://example.com/#b"/>
                    </predicateTerm>
                    <subjectTerm rdf:parseType="Resource">
                        <denotation rdf:resource="http://example.com/#a"/>
                    </subjectTerm>
                </condLeft>
                <condRight rdf:parseType="Resource">
                    <objectTerm rdf:resource="#_gg2"/>
                    <predicateTerm rdf:parseType="Resource">
                        <denotation rdf:resource="http://example.com/#c"/>
                    </predicateTerm>
                    <subjectTerm rdf:parseType="Resource">
                        <denotation rdf:resource="http://example.com/#a"/>
                    </subjectTerm>
                </condRight>
            </subformula>
            <univar rdf:resource="#_gg2"/>
        </rdf:Description>
    </rdf:RDF>
    


    This archive was generated by hypermail 2.1.4 : 08/26/03 EST