RDF語義 推薦標準-1

TransWiki - W3CHINA.ORG开放翻译计划(OTP)

摘要_文檔狀態_目錄 第0節 第1節 第2節 第3節 第4節 第5節 第6節 第7節 附錄_參考文獻



==1. Interpretations =解释

目录

1.1 Technical note (Informative)

RDF does not impose any logical restrictions on the domains and ranges of properties; in particular, a property may be applied to itself. When classes (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossClass) are introduced in RDFS, they may contain themselves. Such 'membership loops' might seem to violate the axiom of foundation, one of the axioms of standard (Zermelo-Fraenkel) set theory, which forbids infinitely descending chains of membership. However, the semantic model given here distinguishes properties and classes considered as objects from their extensions - the sets of object-value pairs which satisfy the property, or things that are 'in' the class - thereby allowing the extension of a property or class to contain the property or class itself without violating the axiom of foundation. In particular, this use of a class extension mapping allows classes to contain themselves. For example, it is quite OK for (the extension of) a 'universal' class to contain the class itself as a member, a convention that is often adopted at the top of a classification hierarchy. (If an extension contained itself then the axiom would be violated, but that case never arises.) The technique is described more fully in [Hayes&Menzel (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#ref-HayMen)].
In this respect, RDFS differs from many conventional ontology frameworks such as UML which assume a more structured hierarchy of individuals, sets of individuals, etc., or which draw a sharp distinction between data and meta-data. However, while RDFS does not assume the existence of such structure, it does not prohibit it. RDF allows membership loops, but it does not mandate their use for all parts of a user vocabulary. If this aspect of RDFS is found worrying, then it is possible to restrict oneself to a subset of RDF graphs which do not contain any such 'loops' of class membership or property application while retaining much of the expressive power of RDFS for many practical purposes, and semantic extensions may impose syntactic conditions which forbid such looped constructions.
The use of the explicit extension mapping also makes it possible for two properties to have exactly the same values, or two classes to contain the same instances, and still be distinct entities. This means that RDFS classes can be considered to be rather more than simple sets; they can be thought of as 'classifications' or 'concepts' which have a robust notion of identity which goes beyond a simple extensional (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossExtensional) correspondence. This property of the model theory (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossModeltheory) has significant consequences in more expressive languages built on top of RDF, such as OWL [OWL (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#ref-owl)], which are capable of expressing identity between properties and classes directly. This 'intensional (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossIntensional)' nature of classes and properties is sometimes claimed to be a useful property of a descriptive language, but a full discussion of this issue is beyond the scope of this document.
Notice that the question of whether or not a class contains itself as a member is quite different from the question of whether or not it is a subclass of itself. All classes are subclasses of themselves.
Readers who are familiar with conventional logical semantics may find it useful to think of RDF as a version of existential binary relational logic in which relations are first-class entities in the universe of quantification. Such a logic can be obtained by encoding the relational atom R(a,b) into a conventional logical syntax, using a notional three-place relation Triple(a,R,b); the basic semantics described here can be reconstructed from this intuition by defining the extension of y as the set {<x,z> : Triple(x,y,z)} and noting that this would be precisely the denotation of R in the conventional Tarskian model theory of the original form R(a,b) of the relational atom. This construction can also be traced in the semantics of the Lbase axiomatic description [LBASE (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#ref-Lbase)].

1.2 URI references, Resources and Literals.

This document does not take any position on the way that URI references may be composed from other expressions, e.g. from relative URIs or QNames; the semantics simply assumes that such lexical issues have been resolved in some way that is globally coherent, so that a single URI reference can be taken to have the same meaning wherever it occurs. Similarly, the semantics has no special provision for tracking temporal changes. It assumes, implicitly, that URI references have the same meaning whenever they occur. To provide an adequate semantics which would be sensitive to temporal changes is a research problem which is beyond the scope of this document.
The semantics does not assume any particular relationship between the denotation of a URI reference and a document or Web resource which can be retrieved by using that URI reference in an HTTP transfer protocol, or any entity which is considered to be the source of such documents. Such a requirement could be added as a semantic extension, but the formal semantics described here makes no assumptions about any connection between the denotations of URI references and the uses of those URI references in other protocols.
The semantics treats all RDF name (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defname)s as expressions which denote. The things denoted are called 'resources', following [RFC 2396 (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#ref-2369)], but no assumptions are made here about the nature of resources (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossResource); 'resource' is treated here as synonymous with 'entity', i.e. as a generic term for anything in the universe of discourse.
The different syntactic forms of name (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defname)s are treated in particular ways. URI references are treated simply as logical constants. Plain literals are considered to denote themselves, so have a fixed meaning. The denotation of a typed literal is the value mapped from its enclosed character string by the datatype associated with its enclosed type. RDF assigns a particular meaning to literals typed with rdf:XMLLiteral, described (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defXMLdatatype)in section 3 (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#InterpVocab).

1.3 Interpretations

The basic intuition of model-theoretic semantics is that asserting a sentence makes a claim about the world (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossWorld): it is another way of saying that the world is, in fact, so arranged as to be an interpretation (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossInterpretation) which makes the sentence true. In other words, an assertion amounts to stating a constraint on the possible ways the world might be. Notice that there is no presumption here that any assertion contains enough information to specify a single unique interpretation. It is usually impossible to assert enough in any language to completely constrain the interpretations to a single possible world, so there is no such thing as 'the' unique interpretation of an RDF graph. In general, the larger an RDF graph is - the more it says about the world - then the smaller the set of interpretations that an assertion (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossAssertion) of the graph allows to be true - the fewer the ways the world could be, while making the asserted graph true of it.
The following definition of an interpretation is couched in mathematical language, but what it amounts to intuitively is that an interpretation provides just enough information about a possible way the world might be - a 'possible world' - in order to fix the truth-value (true or false) of any ground RDF triple. It does this by specifying for each URI reference, what it is supposed to be a name of; and also, if it is used to indicate a property, what values that property has for each thing in the universe (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossUniverse); and if it is used to indicate a datatype (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defDatatype), that the datatype (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defDatatype) defines a mapping between lexical forms and datatype values. This is just enough information to fix the truth-value of any ground (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defgd) triple, and hence any ground RDF graph. (Non-ground graphs are considered in the following section.) Note that if any of this information were omitted, it would be possible for some well-formed (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossWellformed) triple to be left without a determinate value; and also that any other information - such as the exact nature of the things in the universe (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossUniverse) - would, regardless of its intrinsic interest, be irrelevant to the actual truth-values of any triple.
All interpretations will be relative to a set of name (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defname)s, called the vocabulary of the interpretation; so that one should speak, strictly, of an interpretation of an RDF vocabulary, rather than of RDF itself. Some interpretations may assign special meanings to the symbols in a particular vocabulary. Interpretations which share the special meaning of a particular vocabulary will be named for that vocabulary, e.g. 'rdf-interpretation (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#rdfinterpdef)s', 'rdfs-interpretation (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#rdfsinterpdef)s', etc. An interpretation with no particular extra conditions on a vocabulary (including the RDF vocabulary itself) will be called a simple interpretation, or simply an interpretation.
RDF uses several forms of literal. The chief semantic characteristic of literals is that their meaning is largely determined by the form of the string they contain. Plain literals, without an embedded type URI reference, are always interpreted as referring to themselves: either a character string or a pair consisting of a character string and a language tag (http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-Literal); in either case, the character string is referred to as the "literal character string". In the case of typed literals, however, the full specification of the meaning depends on being able to access datatype (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defDatatype) information which is external to RDF itself. A full discussion of the meaning of typed literals is described in section 5 (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#dtype_interp) , where a special notion of datatype interpretation is introduced. Each interpretation defines a mapping IL from typed literals to their interpretations. Stronger conditions on IL will be defined as the notion of 'interpretation' is extended in later sections.
Throughout this document, precise semantic conditions will be set out in tables which state semantic conditions, tables containing true assertions and valid (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossValid) inference rules, and tables listing syntax, which are distinguished by background color. These tables, taken together, amount to a formal summary of the entire semantics. Note that the semantics of RDF does not depend on that of RDFS. The full semantics of RDF is defined in sections 1 (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#sinterp) and 3 (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#InterpVocab) ; the full semantics of RDFS in sections 1 (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#sinterp), 3 (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#InterpVocab) and 4 (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#rdfs_interp).
Definition of a simple interpretation.






A simple interpretation I of a vocabulary V is defined by:
1. A non-empty set IR of resources, called the domain or universe of I.
2. A set IP, called the set of properties of I.
3. A mapping IEXT from IP into the powerset of IR x IR i.e. the set of sets of pairs <x,y> with x and y in IR .
4. A mapping IS from URI references in V into (IR union IP)
5. A mapping IL from typed literals in V into IR.
6. A distinguished subset LV of IR, called the set of literal values, which contains all the plain literals in V


IEXT(x), called the extension of x, is a set of pairs which identify the arguments for which the property is true, that is, a binary relational extension. This trick of distinguishing a relation as an object from its relational extension allows a property to occur in its own extension, as noted earlier (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#technote).
The assumption that LV is a subset of IR amounts to saying that literal values are thought of as real entities that 'exist'. This amounts to saying that literal values are resources. However, this does not imply that literals should be identified with URI references. Note that LV may contain other items in addition to plain literals. There is a technical reason why the range of IL is IR rather than restricted to LV. When interpretations take account of datatype (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defDatatype) information, it is syntactically possible for a typed literal to be internally inconsistent, and such ill-typed literals are required to denote a non-literal value, as explained (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#illformedliteral) in section 5 (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#dtype_interp).
The next sections define how an interpretation of a vocabulary determines the truth-values of any RDF graph, by a recursive definition of the denotation - the semantic "value" - of any RDF expression in terms of those of its immediate subexpressions. These apply to all subsequent semantic extensions. RDF has two kinds of denotation: name (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defname)s denote things in the universe, and sets of triples denote truth-values.

1.4 Denotations of Ground Graphs

The denotation of a ground RDF graph in I is given recursively by the following rules, which extend the interpretation mapping I from name (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defname)s to ground graphs. These rules (and extensions of them given later) work by defining the denotation of any piece of RDF syntax E in terms of the denotations of the immediate syntactic constituents of E, hence allowing the denotation of any piece of RDF to be determined by a kind of syntactic recursion.
In this table, and throughout this document, the equality sign = indicates identity and angle brackets <x,y> are used to indicate an ordered pair of x and y. RDF graph syntax is indicated using the notational conventions of the N-Triples (http://www.w3.org/TR/rdf-testcases/#ntriples) syntax described in the RDF test cases document [RDF-TESTS (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#ref-rdf-tests)]: literal strings are encloded within double quote marks, language tags indicated by the use of the @ sign, and triples terminate with a 'code dot' . .
Semantic conditions for ground graphs.





















if E is a plain literal "aaa" in V then I(E) = aaa

if E is a plain literal "aaa"@ttt in V then I(E) = <aaa, ttt>

if E is a typed literal in V then I(E) = IL(E)

if E is a URI reference in V then I(E) = IS(E)

if E is a ground triple s p o. then I(E) = true if
s, p and o are in V, I(p) is in IP and <I(s),I(o)> is in IEXT(I(p))
otherwise I(E)= false.


if E is a ground RDF graph then I(E) = false if I(E') = false for some triple E' in E, otherwise I(E) =true.

If the vocabulary of an RDF graph contains names that are not in the vocabulary of an interpretation I - that is, if I simply does not give a semantic value to some name (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defname) that is used in the graph - then these truth-conditions will always yield the value false for some triple in the graph, and hence for the graph itself. Turned around, this means that any assertion of a graph implicitly asserts that all the name (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defname)s in the graph actually refer to something in the world. The final condition implies that an empty graph (an empty set of triples) is trivially true.
Note that the denotation of plain literals is always in LV; and that those of the subject and object of any true triple must be in IR; so any URI reference which occurs in a graph both as a predicate and as a subject or object must denote something in the intersection of IR and IP in any interpretation which satisfies the graph.
As an illustrative example, the following is a small interpretation for the artificial vocabulary {ex:a, ex:b, ex:c, "whatever", "whatever"^^ex:b}. Integers are used to indicate the non-literal 'things' in the universe. This is not meant to imply that interpretations should be interpreted as being about arithmetic, but more to emphasize that the exact nature of the things in the universe is irrelevant. LV can be any set satisfying the semantic conditions. (In this and subsequent examples the greater-than and less-than symbols are used in several ways: following mathematical usage to indicate abstract pairs and n-tuples; following N-Triples syntax to enclose URI references, and also as arrowheads when indicating mappings.)
IR = LV union{1, 2}
IP={1}
IEXT: 1=>{<1,2>,<2,1>}
IS: ex:a=>1, ex:b=>1, ex:c=>2
IL: "whatever"^^ex:b =>2
RDFSemanticsFigure1.jpg

Figure 1: An example of an interpretation. Note, this is not a picture of an RDF graph.

The figure does not show the infinite number of members of LV.
This interpretation makes these triples true:
  <ex:a> <ex:b> <ex:c> .
  <ex:c> <ex:a> <ex:a> .
  <ex:c> <ex:b> <ex:a> .
  <ex:a> <ex:b> "whatever"^^<ex:b> .
For example, I(<ex:a> <ex:b> <ex:c> .) = true if <I(ex:a),I(ex:c)> is in IEXT(I(<ex:b>)), i.e. if <1,2> is in IEXT(1), which is {<1,2>,<2,1>} and so does contain <1,2> and so I(<ex:a <ex:b> ex:c>) is true.
The truth of the fourth triple is a consequence of the rather idiosyncratic interpretation chosen here for typed literals.
In this interpretation IP is a subset of IR; this will be typical of RDF semantic interpretations, but is not required.
It makes these triples false:
  <ex:a> <ex:c> <ex:b> .
  <ex:a> <ex:b> <ex:b> .
  <ex:c> <ex:a> <ex:c> .
  <ex:a> <ex:b> "whatever" .
For example, I(<ex:a> <ex:c> <ex:b> .) = true if <I(ex:a), I(<ex:b>)>, i.e.<1,1>, is in IEXT(I(ex:c)); but I(ex:c)=2 which is not in IP, so IEXT is not defined on 2, so the condition fails and I(<ex:a> <ex:c> <ex:b> .) = false.
It also makes all triples containing a plain literal false, since the property extension does not have any pairs containing a plain literal.
To emphasize; this is only one possible interpretation of this vocabulary; there are (infinitely) many others. For example, if this interpretation were modified by attaching the property extension to 2 instead of 1, none of the above triples would be true.
This example illustrates that any interpretation which maps any URI reference which occurs in the predicate position of a triple in a graph to something not in IP will make the graph false.

1.5. Blank Nodes as Existential Variables

Blank nodes are treated as simply indicating the existence of a thing, without using, or saying anything about, the name of that thing. (This is not the same as assuming that the blank node indicates an 'unknown' URI reference; for example, it does not assume that there is any URI reference which refers to the thing. The discussion of Skolemization (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossSkolemization) in appendix A (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#prf) is relevant to this point.)
An interpretation can specify the truth-value of a graph containing blank nodes. This will require some definitions, as the theory so far provides no meaning for blank nodes. Suppose I is an interpretation and A is a mapping from some set of blank nodes to the universe IR 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 blank nodes. Define blank(E) to be the set of blank nodes in E. Then the above rules can be extended to include the two new cases that are introduced when blank nodes occur in the graph:
Semantic conditions for blank nodes.









If E is a blank node and A(E) is defined then [I+A](E) = A(E)

If E is an RDF graph then I(E) = true if [I+A'](E) = true for some mapping A' from blank(E) to IR, otherwise I(E)= false.

Notice that this does not change the definition of an interpretation; it still consists of the same values IR, IP, IEXT, IS, LV and IL. It simply extends the rules for defining denotations under an interpretation, so that the same interpretation that provides a truth-value for ground graphs also assigns truth-values to graphs with blank nodes, even though it provides no denotation for the blank nodes themselves. Notice also that the blank nodes themselves are perfectly well-defined entities; they differ from other nodes only in not being assigned a denotation by an interpretation, reflecting the intuition that they have no 'global' meaning (i.e. outside the graph in which they occur).
For example, the graph defined by the following triples is false in the interpretation shown in figure 1:
  _:xxx <ex:a> <ex:b> .
  <ex:c> <ex:b> _:xxx .
since if A' maps the blank node to 1 then the first triple is false in I+A', and if it maps it to 2 then the second triple is false.
Note that each of these triples, if thought of as a single graph, would be true in I, but the whole graph is not; and that if a different nodeID were used in the two triples, indicating that the RDF graph had two blank nodes instead of one, then A' could map one node to 2 and the other to 1, and the resulting graph would be true under the interpretation I.
This effectively treats all blank nodes as having the same meaning as existentially quantified variables in the RDF graph in which they occur, and which have the scope of the entire graph. In terms of the N-Triples syntax, this amounts to the convention that would place the quantifiers just outside, or at the outer edge of, the N-Triples document corresponding to the graph. This in turn means that there is a subtle but important distinction in meaning between the operation of forming the union of two graphs and that of forming the merge (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#defmerge). The simple union of two graphs corresponds to the conjunction ( 'and' ) of all the triples in the graphs, maintaining the identity of any blank nodes which occur in both graphs. This is appropriate when the information in the graphs comes from a single source, or where one is derived from the other by means of some valid (http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#glossValid) inference process, as for example when applying an inference rule to add a triple to a graph. Merging two graphs treats the blank nodes in each graph as being existentially quantified in that graph, so that no blank node from one graph is allowed to stray into the scope of the other graph's surrounding quantifier. This is appropriate when the graphs come from different sources and there is no justification for assuming that a blank node in one refers to the same entity as any blank node in the other.

个人工具
其它语言
 
 Page execution time: 521.87 ms.
网上报警 苏ICP备05002329号