In this section we extend Positive Conditions, defined in Section Positive Conditions, with slotted Uniterms and Frame formulas. A slot can be represented by an individual symbol or, more generally, by a Uniterm. It can be represented by an IRI or be known only locally. Semantically, a frame slot is a set-valued binary function that represents a property of an object. Such a function maps an object id to a value (or a set of values) of the property. In contrast, a uniterm slot semantically behaves like a unary function symbol. In both cases, however, the order of the slots is immaterial (in contrast to positional uniterms).

Syntactically, the extension is achieved by enriching the notion of a uniterm with slots and by complementing these with frame formulas. For uniformity and greater syntactic convenience, frame formulas can be nested inside other frame formulas. This is syntactic sugar, however, as explained later in this section.

Syntax

Abstract Syntax

The abstract syntax of the slotted condition language is given in asn06 as follows:

The above asn06 is generalized with a fixed-arity list constructor (complementing the unfixed-arity list of constructor) so that the multiplicity of the side property (role) of the Equal class no longer requires the assumption of being exactly 2 (the 2 TERMs are just listed). This also allows the name and filler of a slot to be defined as a sequence of two classes. Since no set of constructor is available, list of is used to represent a set of slots, assuming that duplicates and order will not matter. Also, optional of and subproperty constructs are assumed.

The abstract syntax is visualized by a UML diagram used as a schema-level device for specifying syntactic classes with generalizations as well as multiplicity- and role-labeled associations. (***TBD***)

The syntactic classes are partitioned into classes that will not be visible in serializations (written in all-uppercase letters) and classes that will be visible in instance markup (written with a leading uppercase letter only).

The three classes Var, CONDITION, and ATOMIC will be required in the abstract syntax of Horn Rules.

Concrete Syntax

The abstract syntax of Section Abstract Syntax can be instantiated to a concrete syntax which is an extension to the concrete syntax of Positive Conditions for slotted Uniterms. The EBNF syntax below, which instantiates the abstract syntax, is used throughout this document to explain and illustrate the main ideas.

The concrete human-readable syntax, described in this (slightly modified) EBNF, is work in progress and under discussion.

A Uniterm()-applies a Const to positional TERM arguments or to slotted Const->TERM arguments. A CLASSIFICATION#-associates a TERM with a typing class TERM, or ##-associates a TERM with a superclass TERM. A Frame[]-applies a TERM or a CLASSIFICATIONto slotted TERM->(TERM | Frame) arguments.

Example 1 shows Uniterm and Frame conditions, the latter with variables for the three major (combinations of) syntactic categories, corresponding to the three components of RDF triples.

Semantics

The syntax of RIF frames permits nesting of two kinds. First, a classification formula of the form obj1#obj2 or obj1##obj2 can appear in the object position of a frame. Second, a frame may appear in the value position of an attribute. This nested notation is convenient and allows succinct representation of object properties, but is no more than a shorthand notation. A nested frame represents a conjunction of flat frames. For instance,

a#b[c -> e##f[g -> h]] == a#b /\ a[c -> e] /\ e##f /\ e[g -> h]

Formally, we define the Unnest transformation and postulate that for any frame, f, it is true in a semantic structure iff Unnest(f) is true. In this way, we reduce the semantics of nested frames to that of flat frames. Then we extend the semantic structures defined in Semantics of the Multisorted RIF Conditionsand define an interpretation for flat frames. The rest of the semantic definitions does not change, since it is defined in terms of atomic formulas (the ATOMIC production in the BNF syntax).

The Unnest Transformation

If a formula, f, has the form a#b or a##b then define Obj(f) to be a. If f has the form o[a->v], where o, a, and v are terms, then Obj(f) is defined to be Obj(o). Now, if f is a uniterm then we define Unnest(f) =true, where true is a formula that is always true (a tautology, a formula whose truth value is t). If f is a classification formula then Unnest(f) = f. Otherwise, if f is a frame of the form o[a->v] then

Unnest(f) = Unnest(o) /\ Obj(o)[a -> Obj(v)] /\ Unnest(v)

For instance, in case of the frame a#b[c->e##f[g->]] above, unnesting yields:

This is almost the same conjunction as we have seen earlier. The only difference is the trailing true, which comes from Unnest(h) and can be omitted.

Extension of Semantic Structures for Frames

A semantic structure, I, is now a tuple of the form

<D,IC, IV, IF, IR, Islot, ISR, Isub, Iisa>.

All the components except the last four, Islot, ISR, Isub, Iisa, are the same as before. The new mapping Islot is used to interpret frames; the mapping ISR interprets predicates with named arguments; Isub i gives meaning to the subclass hierarchy; and Iisa interprets class membership.

Islot is a function form D to truth-valued functions of the form D × D → TV. The intuitive meaning of frame slots is that they are functions that take objects and return sets of objects, where every member of the set has certain degree of truth. In the two-valued case, a set of objects associated with the truth value true represents the (set of) values that the slot returns when applied to an object. Formally, this is expressed by extending ITruth to flat frames as follows:

ISR is used to interpret predicates with slotted arguments. It is a function from Const to truth-valued mappings SetOfFiniteSubbags(D × D) → TV. This is analogous to the interpretation of regular (positional) predicates except for two differences:

-- Each pair <s,v> ∈ D × D represents a slot-value pair instead of just a value in positional predicates. -- A tuple in a slotted predicate is a finite bag of slot-value pairs rather than an ordered sequence.

Bags are used here because for slotted predicates the order of slot-value pairs does not matter, but sets cannot be used, since I may happen to map different slots into the same value in D.

Isub gives meaning to the subclass relationship. It is a truth-valued function D × D → TV. For the two valued case, Isub is required to define a partial order on D. More precisely, the set of all pairs <a,b> such that I(<a,b>) = t is required to be a partial order on D. When TV is multivalued, the restriction on Isub will depend on the corresponding multivalued logic. The truth valuation for classification formulas of the form sc##cl, where sc and cl are terms, is defined as follows:

ITruth(sc##cl) = Isub(I(sc), I(cl))

Iisa gives meaning to class membership. It is a truth-valued function D × D → TV. The truth valuation for classification formulas of the form o#cl, where o and cl are terms, is defined as follows:

ITruth(o#cl) = Iisa(I(o), I(cl))

MK: ***** The effect of sorts on all this stuff is to be filled in at a later time ********