This is an archive of an inactive wiki and cannot be modified.

Here we assume bipartitioned constants, i.e all constants (Con) are replaced by one of two disjoint logical sorts: the sort of values (Data) or the sort of objects (Ind). This means that every constant carries with it the designation of the sort to which it belongs (indicating whether the constant is a value or an object). In the same or a subsequent extension, values (Data) can also optionally carry an IRI of their (XML Schema) datatype (e.g., TIME, Integer) and webizing can be introduced for objects (Ind). Likewise, function symbols (Fun) and relation symbols (Rel) can be webized.

SYNTAX

In A.1 Basis: Positive Conditions, replace the first four productions of BNF for human-readable syntax

  NAME       ::= a unicode string in normal form C
  Con        ::= a unicode string in normal form C
  Var        ::= '?' NAME
  TERM       ::= Con | Var | Expr
  . . .

with the following five productions:

  NAME       ::= a unicode string in normal form C
  Data       ::= a unicode string in normal form C
  Ind        ::= a unicode string in normal form C
  Var        ::= '?' NAME
  TERM       ::= Data | Ind | Var | Expr
  . . .

In the present version, variables are not bipartition-sorted and thus can range over all constants, Data or Ind. Variables sorted through RDFS/OWL-class IRIs can be introduced in this or a later extension of the language.

The semantics of conditions over bipartitioned constants is to be defined in a section SEMANTICS extending the one of A.1 Basis: Positive Conditions. This can again be based on a standard first-order logic semantics, as proposed by Peter Patel-Schneider (in the version of Chris Welty)

An XML syntax incorporating several extensions via an XML element for the operator role and XML attributes can be obtained from the above BNF and from A.1 Basis: Positive Conditions as follows:

- Data (value constant, including optional attribute for a datatype IRI,
        e.g. pointing to an XML Schema Part 2 Datatype)
- Ind (object constant; empty element with attribute, iri, for webizing;
       global: <Ind iri="http://www.w3.org"/>, local: <Ind iri="#foo"/>)
- Var (logic variable; optional type attribute, e.g. RDFS/OWL-class IRI) 
- Fun (n-ary function symbol; optional attribute designating interpreted
       [a.k.a. equation-defined] functions in contrast to uninterpreted
       [a.k.a. free] functions; optional attribute, iri, for webizing)
- Rel    (n-ary relation symbol [a.k.a. predicate], including optional
          attribute, iri, for webizing)
- Expr   (expression formula; optional op[erator] role that can contain
          a Var besides a Fun for higher-order and RDF syntax)
- Atom   (atomic formula; optional attribute for external atoms; optional
          op[erator] role that can contain a Var besides a Rel for Hilog
          extension and RDF compatibility)
- Equal  (prefix version of term equation '=')
- Exists (quantified formula for 'Exists')
- And    (conjunction; optional attribute for sequential conjunctions)
- Or     (disjunction; optional attribute for sequential disjunctions)

This can be directly rewritten as a DTD (PositiveConditionsBipart.dtd) or an XML Schema.

The condition formula of the unchanged Example 1 from A.1 Basis: Positive Conditions can now be serialized in XML as shown below (Dave Reynolds suggested to replace <Data>$49</Data> by an integer with an associated currency tag).

Example 2' (A RIF condition in XML syntax):

  <And>
    <Exists>
      <Var>Buyer</Var>
      <Atom>
        <Rel>purchase</Rel>
        <Var>Buyer</Var>
        <Var>Seller</Var>
        <Expr>
          <Fun>book</Fun>
          <Var>Author</Var>
          <Ind iri="#LeRif"/>
        </Expr>
        <Data>$49</Data>
      </Atom>
    </Exists>
    <Equal>
      <Var>Seller</Var>
      <Var>Author</Var>
    </Equal>
  </And>

Using the DTD spec, Richard Goerwitz' STG Validator succeeds with the conjunction of Example 2':

<?xml version="1.0" standalone="no"?>
<!DOCTYPE And SYSTEM "http://www.jdrew.org/rif/PositiveConditionsBipart.dtd">
<And>
  ... content of Example 2' ...
</And>

Note that the distinction between the sort of values and the sort of objects can be extended from Data vs. Ind to variables (Var) by using an optional attribute. This corresponds to the so-called d-variables and i-variables in SWRL http://www.w3.org/Submission/SWRL. Sorts can also be optionally added to function symbols and predicates in order to support sorted languages.