Circumstance, provenance and partial knowledge

Limiting the scope of RDF assertions

Graham Klyne, 13-Mar-2002 15:00

Table of Contents

1. Background

This note discusses attempts to explore some aspects of representing unreliable and incomplete information using RDF (and the structure defined as "reification" by RDFM&S [1]).

A simple RDF graph consists of triples, each of which corresponds to a statement that is held or asserted to be true. In this, there is no recognition that truth may vary according to circumstance:

Although these examples are very different, there is a common theme that some statement(s) may be considered true or not according to the circumstance in which they are evaluated. In his PhD thesis [13], section 1.4, R. V. Guha makes a similar argument for contexts being an appropriate solution for a diverse range of problems.

This note revisits some topics that I explored in an earlier paper [3] in the light of some subsequent discussions and experiments, and aims to move towards a goal of formalizing the representation of these ideas in RDF, and their corresponding model theoretic denotation. A key idea that I wish to preserve is that the denotation of a URI reference in an RDF graph is largely invariant according to circumstance; what may change is access to information about what is denoted. (But as Dan Brickley has pointed out [4], this is something of an idealization because there may always be circumstances in which different people use the same URI reference to indicate a different thing. I am proceeding on the assumption, for now, that such inconsistent usage can be treated as unreliable information according to the mechanisms explored here.)

2. Contexts in Notation 3

Notation 3 [5] provides the notion of a "formula", and syntax for its use in conjunction with RDF statements. There is not, to my knowledge, a clear consensus about what a formula actually is or denotes, beyond being a "set of statements". A "context" is described as being a relationship between a statement and the formula to which it belongs. (Interestingly, John McCarthy declined to offer a definition of context in his paper on formalizing context [2].)

However, it seems that this idea is intended to address the some problems like those introduced above, and maybe more. Example uses of formulae in N3 include things like these, where braces "{...}" are used to enclose a formula:

The introduction of contexts in the description of Notation 3 [5] seems to be very much associated with the introduction of primitives for expressing full first order logic. This note has a more modest goal, namely the scoping of asserted truths to some collection of statements (formula), and a consequent limitation on the conclusions that may be drawn from some rule of deduction (whose means of definition is not specified).

3. Implementation by symbol quoting

Dan Connolly [6] has suggested an implementation of contexts in Notation 3 that:

(a) treats a formula as a collection of reified RDF statements, and

(b) treats reification as a construct in which URI-references are quoted; i.e. their normal interpretation is suspended when they appear within a formula.

This has the effect that a fact asserted outside a formula cannot be used to deduce the truth of new statements inside the context of that formula. Or, as Dan Connolly points out [8]:

:Lois :accepts { :Superman rdf:type :StrongPerson } .
:ClarkKent = :Superman.
does *not* ential that 
:Lois :accepts { :ClarkKent rdf:type :StrongPerson } . 

i.e. {} are not referentially transparent.

I have concerns with this approach of treating contexts as a form of quotation:

4. An alternative: scoping assertions by context

My goal is to keep the application of rdf:Statement and friends well within the realms of "use" rather than "mention", and address the desired consequences at a logical rather than a purely structural level. (Maybe the use of rdf:Statement, etc., is not appropriate here - this topic is revisited later.)

I previously suggested in an informal email [11] that contexts might be implemented by a combination of RDF reification and containers. Dan Connolly pointed out [8] that this approach is flawed because deductions made available from one context can be inappropriately imported into other contexts. The flat space of RDF assertions is not capable of containing the modalities invoked by the circumstances noted in the first section above.

Syntactically, contexts in N3 correspond to a hierarchical nesting of statements and formulae, with the outermost level for a given expression corresponding to statements asserted by that expression. (Where "asserted by" means true in any model theoretic interpretation that is a model of that expression.) The truth or otherwise of statements contained in any formula has no direct bearing on the truth of the overall expression, but their presence may affect new expressions that can be obtained using some given rules of deduction. (This note does not address how such rules may be expressed, and particular does not require that they be expressed in RDF.)

The evaluation of statements may be related to a corresponding hierarchy of situations, or contexts. The evaluation of a statement at the outermost level of an expression is relative to some global context. The evaluation of a statement in some formula is relative to a context that is contained in the immediately surrounding expression's context.

So what is the desired relationship between the truth of a statement in an outermost context, and the truth of the same statement in some inner context? It is clear that they should not be equivalent, since that would simply correspond to a flat space of assertions, which has already been demonstrated to be inadequate for our purposes [8]. Three other possibilities spring to mind:

  1. no relationship: a statement in an inner context can be true or false independently of the same statement in a surrounding context,
  2. downward propagation: a statement in some context is also true in any context that it contains, or
  3. upward propagation: a statement true in some context is also true in the immediately surrounding context.

Dan Connolly's approach [6] seems to have the effect of (1), as the symbols used within a formula do not share a denotation with their use in the surrounding expression. Running code suggests this is a viable and useful possibility.

Any approach that had the effect of (3) is disregarded here because it would necessarily result in the same undesired results that are obtained using a flat space of assertions, as all assertions true in any context would necessarily also be true in the top-level global context.

Consider an approach that achieves the effect of (2); an immediate consequence of this is that:

:Lois :accepts { :Superman rdf:type :StrongPerson } .
:ClarkKent = :Superman.
does ential
:Lois :accepts { :ClarkKent rdf:type :StrongPerson } .

which requires us to reconsider what it means for a statement to appear in an outermost context. The above example shows that it would not be sufficient for a statement to be true; it must also be information that is universally available. The above example was the result of a deduction from a slightly more complex example [11], or which this is a revised version:

    :Lois :accepts { :Superman rdf:type :StrongPerson .
:ClarkKent rdf:type :WeakPerson } . :Reader :accepts { :Superman = :ClarkKent .
:Superman rdf:type :StrongPerson } . :Reader rdf:type :KnowsAll .

Here, having everything :Reader knows be universally true means we can deduce the universal truth of :Superman = :ClarkKent . But this is not enough to put that conclusion into the top-level context. Thus, the conclusions to be drawn in this case would be more limited:

:Reader :accepts { :ClarkKent rdf:type :StrongPerson } . 

Thus option (2) appears to be a possibility, but one that requires an awkward constraint (universal availability) to be placed on top-level assertions. Thus, I conclude that there should be no automatic relationship between the assertions in different contexts; any such relationships should be a property of any defined relationship between the contexts. Then, the top-level context simply becomes a holder for universal truths. In the above examples, the intended interpretations of :accepts and :knowsAll may allow free exchange of assertions between the :Reader :accepts and top-level contexts, but would not allow exchange between :Lois :accepts and the top-level.

So, I propose the default scope for an assertion be the context within which it appears. Incorporation of truths from one context into another context will be a matter for separately defined rules of deduction, which may depend on properties that relate the different context objects.

5. Model theory

Guha's thesis [13] presents a model theory for contexts which subsumes what is needed for RDF+contexts. However, as well as dealing with all the structures of first order logic (negation, quantification), it is very general in that it assumes each context may have a completely different class of interpretations, defined by a very general "context structure" function CS over contexts. Given the intended global nature of URIs [9], it seems that a more modest extension to the existing RDF model theory should be able to capture the intent outlined above.


Thus, in Guha's terminology, the language element of each context is the same, and the interpretations of different contexts Ci under a given context structure CS vary only in the relational extensions of the properties (and class extensions), which themselves are functions of CS and Ci. (RDF class extensions are defined in terms of the relational extension of the property named rdf:type, so in what follows I shall not make separate mention of class extensions.)

Lifting rules are not addressed here. These may be introduced, as required, as rules of deduction over statements in two more contexts. No means of defining these are specified here.

5.1 Extended RDF graph syntax

The notion of an RDF graph [14] is extended to include the concept of a formula node. A formula node may occur wherever any other kind of node can appear. Associated with a formula node is an RDF graph that is completely disjoint from all other graphs; i.e. has no nodes in common with any other graph. (It may contain the same labels as other RDF graphs; because this is, by definition, a separate graph, considerations of tidiness do not apply between the graph at a formula node and any other graph.)

This is intended to map the idea of "{ N3-expression }" that is used by N3 into an RDF graph upon which RDF semantics is defined.

So, for basic RDF, we have the following abstract syntax for a graph, following a style suggested by John McCarthy [15]:

graph(g)      = isSet(g) & eachMember(g,statement)
statement(s)  = isTriple(s) &
nonLiteral(sub(s)) &
isUriref(prop(s)) &
nonLiteral(n) = isUriref(n) | isBlank(n)
anyNode(n)    = nonLiteral(n) | isLiteral(n)

where isSet(s), isTriple(t), isUriref(n), isBlank(n), isLiteral(n) are primitive functions that recognize the elementary syntactic structures and components in an RDF graph, eachMember(s,f) is true if the function f yields true when applied to each member of the set s, and sub(t), prop(t) and obj(t) are selectors that return the subject, property and object respectively of a triple.

This is extended to account for formula nodes by extending the definition of nonLiteral(n):

nonLiteral(n) = isUriref(n) | isBlank(n) | isFormula(n)

where isFormula(n) is a new primitive function that recognizes a formula node.

5.2 Extended RDF graph interpretation

The following revised interpretation is adapted from [14]:

An interpretation I on the vocabulary V is defined by:

1. A non-empty set IR of resources, called the domain or universe of I.

2. A subset IP of IR corresponding to properties

3. A subset IF of IR corresponding to contexts (formulae).

5. A mapping IEXT from IFxIP into the powerset of IRx(IR union LV) (i.e. the set of sets of pairs <x,y> with x in IR and y in IR or LV)

6. A mapping IS: V -> IR

IEXT(f,x) is a set of pairs, i.e. a binary relational extension, called the extension of x in context f.

The denotation [I+F](E) of a ground RDF graph E (containing only nodes that are urirefs or literals) under interpretation I and context F in IF is then given recursively by the following rules, which extend the interpretation mapping I from labels to graphs:

if isLiteral(E) then [I+F](E) = XL(E)
if isUriref(E) then [I+F](E) = IS(E)
if isTriple(E) [[[and is asserted]]] then
[I+F](E) = true if <[I+F](sub(E)),[I+F]obj(E)> is in IEXT(F,[I+F](prop(E))),
otherwise [I+F](E)= false.
if graph(E) then [I+F](E) = false if [I+F](E') = false for some [[[asserted]]] triple E' in E,
otherwise [I+F](E) = true.

Suppose I is an interpretation and A is a mapping from some set of unlabeled nodes to the domain of I, and define I+A to be an extended interpretation which is like I except that it uses A to give the interpretation of unlabeled nodes. Define anon(E) to be the set of unlabeled nodes in E

And for formula nodes: suppose I is an interpretation and B is a mapping from some set of formula nodes to the contexts IF of I, and define I+B to be an extended interpretation which is like I except that it uses B to give the interpretation of formula nodes. Define form(E) to be the set of formula nodes in E.

Now we can extend the above rules to include the new cases that are introduced when unlabeled nodes and formula nodes occur in the graph:

If isBlank(E) then [I+F+A+B](E) = A(E)
If isFormula(E) then [I+F+A+B](E) = B(E)
If graph(E) then [I+F](E) = true if [I+F+A'+B'](E) = true for some mappings A' from anon(E) to IR and B' from form(E) to IF,
otherwise [I+F](E)= false.

Thus, formula nodes are treated very much like blank nodes, except that they indicate the existence of a value in IF rather than in all of IR.

5.3 Dealing with modalities: asserting contexts

Thus far, the details of the graph attached to a formula node has no effect on the evaluation of the containing RDF graph. The foregoing extensions add no expressive power to RDF. To utilize contexts, we define:

The truth of a context is evaluated using the same interpretation that is used to evaluate the containing graph; thus, for some I, F, A and B (defined as above), we define the evaluation of a context node in graph E with attached graph FG to be:

[IEVAL+F](E,FG) = true if [I+F+A'+B'](E) = true for some mappings A' from anon(E) to IR, B' from form(E) to IF, and [I+F'](G) = true for F'=B'(G),
otherwise [IEVAL+F](E,FG) = false.

Recall that the extended definition of an interpretation (above) defines a relational extension for each property in each context in the domain of interpretation. The containing expression E must be true under the designated context F of I, and the contained formula must be true in some context F' determined, in part, by the satisfisfaction of E. Because these contexts (may) have different relational extensions for their properties, the satisfaction of E as part of the condition for satisfying FG does not, of itself, imply any entailment between E and FG.

Note that this definition can anly apply to formula contained directly in graph E, by virtue of being a node of that graph. To evaluate more deeply nested contexts, the process must be applied recursively starting from the top level and descending one level of nesting at a time.

This function IEVAL gives us a way of saying what it means to enter a context, in the sense this term is used by McCarthy [2] and Guha [13]. In particular, section 3.1 of [13] discusses the use of contexts to deal with different but related situations, and in particular: "The process of asking a query in a context is done by entering that context and then asking the query as would normally be done in a system without contexts".

5.4 A survey of relationships between contexts

An RDF graph describes some possible world or situation. To describe what it means to enter a context, we can use IEVAL to construct a new RDF graph that describes the world of that context. Thus evaluation of contexts provide a way of describing a hierarchically related collection of possible worlds. However, the definition of IEVAL does not, of itself, allow us to say anything about the relationships between these possible worlds. Without any way to describe or characterize such relationships, these graphs (and their possible worlds) might as well be completely independent of each other; thus it seems appropriate to consider the kinds of relationship that may be useful.

Consider some applications of contexts. Some of these have been taken from Guha's thesis [13], and more detailed discussion of the scenarios may be found there. Below, a simple example is given for each, using contexts and RDF-like statements, to explore the different logical relationships that arise between contexts. The survey is not intended to be exhaustive or definitive, but is used to explore some different ways in which truth can be related across contexts. The discussion refers to truths contained in a context; this refers to the relationship between interpretations defined by a context structures. Thus, the statement that the truths in context A are contained in context B means: if a context structure CS defines interpretations Ca for context A and Cb for context B, then any expression that is true under interpretation Ca is also true under Cb.

Logical implication

A consistsOf Metal .
B consistsOf Water .
{ Metal denserThan Water } log:implies { A sinksIn B } .

Here, the contexts are used to contain the premiss P and conclusion C of a rule of deduction, with respect to a containing context G. The intent of this form is to constrain a single global interpretation G when applied to all the expressions. Interpretations that make P and/or C true in isolation are not relevant.

Logical negation

{ Metal floatsIn Water } a Falsehood .

The intent here is to express that truths of the contained context F are NOT contained in the surrounding context G. Negation is a tricky topic in RDF, and I don't intend to try and define it here. But, as in the preceding case, the intent can be seen to constrain a single global interpretation for G, so any particular interpretation that makes F true is not relevant.

[[[One approach to defining negation might be to say (recursively) that if the truth of the expression in F can be deduced from the surrounding context G, then the expression in G is also a Falsehood.]]]

Logical assertion

{ Metal sinksIn Water } a Truth .

This example is motivated by the previous one. In this case, it is presumed that formula in the contained context T is also true in the surrounding context G. Following the preceding cases, the intent can be seen to constrain a single global interpretation for G, so any particular interpretation that makes T true in isolation is not considered.

Grouping related assertions by assumptions/representations

{ Holmes a Detective } accordingTo StoriesOfSherlockHolmes .

In this case, statements in the context S are true in some possible world described as "according to the stories of Sherlock Holmes". There is no presumed relationship between the interpretations of S and the surrounding context G.

Belief/availability of knowledge

Lois accepts { Superman a StrongPerson . ClarkKent a WeakPerson } .

In this re-run of the earlier example, there is no fixed relationship between the truths according to Lois' beliefs L and the truths of the surrounding context G.

One might expect that most of the truths of G are also truths of L; to express this would take us into the area of non-monotonic reasoning. (See discussion below of defaults.)

Grouping related assertions by trust, or reliability of information

John aCandidateFor AGoodJob .
Referee asserts { John qualityOfWork Good } .

The goal here is to give some statements R that might be considered to be true in the containing context G if some other (unspecified) conditions are satisfied. There is no a priori presumption of a relationship between the truths of R and G, but at some stage we might conclude that the forumula in R is true in G. This can be viewed as a variation on logical implication, where the premise is not specified.

Specializing a theory

FreezingTemperature lessThan BoilingTemperature .
{ FreezingTemperature equalTo "0C" .
  BoilingTemperature  equalTo "100C" } appliesTo Water .

This example shows a general theory for a liquid that asserts that the freezing temperature is less than the boiling temperature, and a specialization of that theory to a specific liquid, water, in which specific values are given for the freezing and boilinmg temperatures. All truths of the general theory G are also truths of the specialized theory W.

Limiting the scope of assertions

Cinderella notFriendOf UglySisters .
{ Cinderella attends TheBall .
  Cinderella wears GlassSlipper } until Midnight .

This example shows a temporal limitation on the scope of a statement in C when applied to the containing context C, but other limitations might be imagined. It is presumed that the truths of G are also truths of C, but under some conditions we may also conclude that the the formula in C is also true in G.

Multiple models

GravitationalAttraction proportionalTo Mass .
{ Mass a FixedValue } in NewtonianMechanics .
{ Mass a Variable } in RelativityTheory .

There are different ways of looking at a possible world, characterized by different assumptions. Some truths may be common to all G, and some may be specific to the working assumptions, N or R. In this case, truths of G are presumed to be contained in both N and R.

Compactness of representation:

Today date "2002-03-12" .
{ Weather precipitation Raining .
  Weather temperature "8" .
  Weather windStrength Breezy } atPlace Oxford .

A context may be used to factor out some common assumptions from a set of statements, thus avoiding the need to make that information part of each statement. In this case, truths of the containing context G are presumed to be true in the contained context C.

Combining different theories

{ Mass a FixedValue } in NewtonianMechanics .
{ Mass a Variable } in RelativityTheory .
{ RelativityTheory approximates NewtonianMechanics }
  when { RelativeVelocities lessThan halfC } .

This scenario combines elements of two earlier scenarios: multiple models and logical implication.

Default values

Penguin rdfs:subClassOf Bird .
Birds capableOf Flight .
{ Stuart a Sparrow .
  Pingu a Penguin . Pingu notCapableOf Flight } .

This is probably one of the most attractive and most difficult uses for contexts. We have a situation in which most truths of the containing context G are presumed to be true in the contained context P, with the exception of some that are explicitly contradicted. The very notion of contradiction is something that goes beyond the expressive capability of RDF.

Another way to formulate this might be:

Penguin rdfs:subClassOf Bird .
{ Birds capableOf Flight }
{ Stuart a Sparrow .
  Pingu a Penguin . Pingu notCapableOf Flight } .

Now we have a property defaultIn that relates subject and object forumulae in some unspecified way, whose definition is a property of the interpretation. Additional semantic constraints imposed (ex-RDF) on the allowable interpretation of defaultIn might be used to capture the intention here. But still, there is no clear presumed relationship between truths of the default context D and P.

The logic here may be beyond the capability of RDF to express, but the use of context interpretations is similar to the case of logical implication. The intent is to constrain a single interpretation to satisfy the the formulae in G and P, and also to satisfy "most" of the formula in D. Interpretations that satisfy D or P in isolation are not of interest.

De-contextualization of terms

This application of contexts is not attempted here.

De-contextualization of terms is explored at some length in Guha's thesis [13, sections 2.6.1, 2.6.2], and seems to be a source of considerable complexity in his model theoretic account of lifting rules, partly because of the difficulties of dealing with different domains for different contexts.

The approach described here aims to avoid these complexities by appealing to the notion, stated above, that the denotation of a URI reference in an RDF graph is largely invariant according to circumstance; what may change is information about what is denoted. In particular, the domain of discourse is presumed here to be the same across all contexts. Variations in background theories across contexts are accommodated by variations in the relational extensions of RDF properties (see definition of IEVAL, section 5.3 above).

This choice also seems to avoid some of the complications that arise when dealing with modal logics (c.f. "Some things do not exist", in section 4.6 of Rod Girle's Modal Logics and Philosophy [16]). By asserting a common domain of discourse across all possible worlds, the tangled questions of existential import would be dealt with by using more explicit predicates.

5.5 Summarizing context relationships

The preceding section has surveyed a number of proposed applications of contexts, and suggested how the truth of expressions in different contexts may be related in different circumstances. A small number of distinct cases can be identified. In considering the interactions between contexts, there are two kinds of relationship to consider:

  1. Entailments involving the formulae contained in contexts, and
  2. Relationship of different interpretations within a context structure.

The definition of entailment presumes a common interpretation for all formulae used (A|=B if every interpretation that makes A true also makes B true). So applications of contexts that yield logical results (implication, etc.) should be seen as expressing constraints on a common entailment applied to all of the formulae -- specifically, interpretation defined for the containing context.

Other applications of contexts are used to describe different worlds, or different world-views: in these cases, we expect to find different interpretations, which may be related as indicated below.

For the purposes of this discussion, the following syntactic arrangement of contexts is used for illustrative purposes:

The following relationships are identified (where 'ist(C,e)' means expression 'e' is true in context 'C').

For the first case, there is nothing else to say.

For the second case, we can say that in a given context structure the interpretation of C is related to the interpretation of G by subset relationships between the property relational extensions IEXT(G,p) and IEXT(C,p):

FORALL (x) x in IP => IEXT(G,x) subset IEXT(C,x)

so if <s,o> us in IEXT(G,x) then it is also in IEXT(C,x).

No method is defined for indicating within a graph which of these two cases may apply between any given contexts. See next section for further discussion.

Orthogonally to the relationships between context interpretations, there is the matter of entailment between the formulae in the different contexts that may be viewed as a constraint on the interpretations of the global context G. The core of RDF does not provide means to express these constraints, but the approach [14] used to describe RDFS-interpretations and RDFS-interpretations suggests that such rules can be defined. The introduction of contexts and the corresponding extensions to the RDF model theory provide a syntactic and semantic framework for introducing these rules without stressing the underlying RDF core semantics, or creating

5.6 Indicating Context Structure relationships

Two different possible kinds of relationship between the interpretation applied to a global context G and a contained context C in some context structure have been identified, but no means is defined for indicating in an RDF expression which of these may apply. This section explores informally the proposition that RDF statements can be used to express this relationship without introducing any inconsistencies into the overall framework. [[[A proper proof would be nice]]]

In the absence of any further information, it is natural to assume that the interpretations of any pair of contexts are unrelated in a context structure. It seems natural to allow RDF vocabulary to fulfil this role; e.g.

FreezingTemperature lessThan BoilingTemperature .
{ FreezingTemperature greaterThan "-20C" .
  FreezingTemperature lessThan "5C" .
  BoilingTemperature  lessThan "110C" .
  BoilingTemperature  greaterThan "90C" } = ImpureWaterContext .
{ FreezingTemperature equalTo "0C" .
  BoilingTemperature  equalTo "100C" } = PureWaterContext .
PureWaterContext specializes ImpureWaterContext .

The property "specializes" is intended to express the idea that the context interpretations are related such that truths of ImpureWaterContext are also truths of PureWaterContext, but that the latter context also contains some additi0onal truths. This expresses a relationship between interpretations in a context structure: the relational extensions in ImpureWaterContext are subsets of the corresponding extensions in PureWaterContext.

What can we say about the property "specializes"?

It's subject and object are both contexts. This is no problem, because section 5.2 describes IF in the domain of disourse.

Let us call the global context G, and the two contained contexts CP and CI, so we have:

[I+G](PureWaterContext) = CP
[I+G](ImpureWaterContext) = CI

Noting that denotations are independent of context, we can simplify this to:

I(PureWaterContext) = CP
I(ImpureWaterContext) = CI

The property specializes in context G relates the context values CP and CI, thus:

<CP,CI> in IEXT(G,[I+G](specializes))

or just:

<CP,CI> in IEXT(G,I(specializes))

which is intended to express a constraint on the context structure:

x in IP => IEXT(CI,x) subset IEXT(CP,x)

Generalizing this to any pair of contexts related in G by specializes, we get:

<p,i> in IEXT(G,I(specializes)) =>
  x in IP => IEXT(i,x) subset IEXT(p,x)


  IEXT(i,I(specializes)) subset IEXT(p,I(specializes))

This has the relationship between contexts being specific to the containing context in which they appear. Intuitively, the relation between contexts should be a universal truth in all contexts. So far, the results are consistent with fixing the extension of I(specializes) across contexts:

c1, c2 in IF =>
  <s,g> in IEXT(c1,I(specializes)) <=> <s,g> in IEXT(c2,I(specializes))

But what happens if we try to extend this relationship to a containing and contained context?

<s,G> in IEXT(G,I(specializes)) =>
  x in IP => IEXT(G,x) subset IEXT(s,x)


  IEXT(G,I(specializes)) subset IEXT(p,I(specializes))

which is still consistent with fixing the extension of I(specializes) across contexts. Lacking a means to name a containing context, a different way to express such a relationship is required. A monadic predicate within a context, expressed using the rdf:type property, could fulfil this role:

FreezingTemperature lessThan BoilingTemperature .
{ FreezingTemperature equalTo "0C" .
  BoilingTemperature  equalTo "100C" } appliesTo PureWater ;
                                       a Specialization .

So the class specialization in context G relates the context interpretations for G and CP, thus:

CP in ICEXT(G,I(specialization))
  <=> <CP,I(specialization)> in IEXT(G,I(rdf:type))
  <=> <CP,G> in IEXT(G,I(specializes))


x in IP => IEXT(G,x) subset IEXT(CP,x)

IEXT(G,I(rdf:type)) subset IEXT(CP,I(rdf:type))

<CP,I(specialization)> in IEXT(G,I(rdf:type))
  => <CP,I(specialization)> in IEXT(CP,I(rdf:type))

Generalizing this conclusion requires that every specialization of a containing context is also a (possibly improper) specialization of itself. This would be satisfied if the extensions of I(specialzes) and I(specialization) were held constant across all contexts in a context structure.

5.7 Modal logics to describe context relationships

Having taken the path of characterizing contexts as relating to "possible worlds", it is appealing to consider the use of modal logics with possible-world Kripke style semantics (see Gabbay [12] section 9.1, Girle [16]) to characterize the relationships between contexts. Initial study suggests that modal logic theories provide results that are descriptive of sets of possible worlds, rather than specific relations between them, so this avenue is not being pursued at this time.

[[[My thought was that the accessibility relation between possible worlds might be characterized in terms of the relationships between context interpretations, but I'm not seeing what useful results might be obtained brom this approach.]]]

[[[In some modal logics: anything true in o is true without modal qualification; thus h(o,BOX E) == h(o,E); possible world accessibility function R is "contained in" relation on contexts, thus, anything modally true in some context is also modally true in any contained contexts.]]]

6. Encoding in basic RDF

The ideas explored so far have focused on the syntax of Notation 3, without regard for how this might be represented in the basic triple structure of RDF.

Here, we will suggest that the structuire of contexts might be encoded in RDF using the groupings of triples described by the RDF specification [1] known as "reification". (The term reification is used with caution, because it has logical connotations, related to quotation, that this proposal is trying to avoid. here, we mean it simply to refer to the "reification quad" structure of 4 triples introduced by the RDF specification to encode descriptions of statements.)

The basic ideas for encoding a context are covered in an earlier note [3]. A context is viewed as a container of resources, each of which is the subject of a reification quad. Each level of nesting of contexts results in each statement of each reification quad itself being replaced by a reification quad (even the fleas have fleas!).

Semantically, any expression containing a reification quad is presumed to have the same truth value as the same expression without the reification quad. This might be achieved either by claiming that reification quads are not "asserted triples" in the sense of the RDF model theory [14], or simply claiming that any conjunction of triples corresponding to a reification quad is true in any interpretation.

Using this approach, the number of triples will increase exponentially with the depth of context nesting. I assume that implementations will find ways to encode reification quads in a way that overcomes this problem. Still, RDF/XML with reification quads would be the standard way to exchange such information in a sigle RD graph. Other work (e.g. [18]) has explored different ways to exchange RDF achieving the same effect, typically using a different document to contain the formula in a context.

7. Conclusions

This note suggests a simple extension to the RDF model theory [14], suggested by Guha's idea of a Context Structure [13], that appears to allow various applications of N3-style contexts to be accommodated with very little in the way of additional logical machinery beyond that which is already employed.

In the case when N3-style contexts are not used, the model theory reduces to exactly that defined for the RDF core language [14].

Initial exploration suggests that the relationship between interpretations in a context structure can be constrained using RDF properties and classes without introducing any inconsistencies into the overall framework. This supposition is not proven, and such proof might be a future project.

Future work might also explore whether the relationship between interpretations in a context structure would be further illuminated by using modal logics, and in particular whether the relationships can be characterized in terms of accessibility relationships between the possible worlds of modal logic.

8. References

Ora Lassila, Ralph R Swick, Resource Description Framework (RDF) Model and Syntax Specification, W3C Recommendation, 22 February 1999,
John McCarthy, Notes on Formalizing Context, Computer Science Department, Stanford University,
Graham Klyne, Contexts for RDF Information Modelling, October 2000,
Dan Brickley, (note on reliability of URI denotation in informal email),
(which was subsequent to:, where "de re" vs "de dicto" statements are noted, with further references.)
Tim Berners-Lee, Notation 3: Ideas about Web Architecture - yet another notation,
Dan Connolly, (notes on implementing N3 contexts), (reification and negation).
Jos de Roo, (Euler experiences with N3 contexts - could not find a complete account),
Dan Connolly, Re: Proposals? Re: use/mention and reification, (referential transparency of "{...}").
Tim Berners-Lee, Universal Resource Identifiers -- Axioms of Web Architecture; Global Scope,
Pat Hayes, Re: What do the ontologists want,; see also: ("intensionality") ("structural quotation") ("opacity")
Graham Klyne, Re: Proposals? Re: use/mention and reification,
Dov Gabay, Elementary Logics: A Procedural Perspective, Prentice Hall Series in Computer Science, 1998, ISBN 0-13-726365-1.
R. V. Guha, Contexts: A Formalization and Some Applications, Ph.D. Thesis, Stanford University, 1995, linked from
Patrick Hayes, RDF Model Theory,
John McCarthy, Towards a Mathematical Science of Computation, 1962/1996
Linked from, see in particular:
Rod Girle, Modal Logics and Philosophy, Acumen Publishing, 2000, ISBN 1-902683-14-5 (h/b) or 1-902683-15-3 (s/b).
Dan Brickley, Practical RDF puzzles: Photos, Unicorns and Web ontologies,
Dan Brickley, Jane Hunter, Carl Lagoze, ABC: A Logical Model for Metadata Interoperability,

Last updated: 13-Mar-2002, GK.