Copyright © 2008 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.
This document, developed by
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.
This document is being published as one of a set of 52 documents:
The Rule Interchange Format (RIF) Working Group seeks public feedback on these Working Drafts. Please send your comments to public-rif-comments@w3.org (public archive). If possible, please offer specific changes to the text that would address your concern. You may also wish to check the Wiki Version of this document for internal-review comments and changes being drafted which may address your concerns.
Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
The RIF Framework for Logic-based Dialects (RIF-FLD) is a
formalism for specifying all logic-based dialects of RIF, including
RIF-BLD. It is a
logic in which both syntax and semantics are described through a
number of mechanisms that are commonly used for various logic
languages, but are rarely brought all together. RIF-BLD gives
precise definitions to these mechanisms, but leaves some concrete details out. Eachomits certain details.
Every logic-based RIF dialect that is based on RIF-FLDis expectedrequired to specialize
these general mechanisms (even leave out some elements of RIF-FLD)
to produce its concrete syntax and model-theoretic semantics.
The framework described in this document is very general and captures most of the popular logic-based rule languages found in Databases, Logic Programming, and on the Semantic Web. However, it is anticipated that the needs of future dialects might stimulate further evolution of RIF-FLD. In particular, future extensions might include a logic rendering of actions, as found in production and reactive rule languages.
This document is mostly intended for the designers of
future RIF dialects. The reader who is interested in using a particular dialect, such as RIF-BLDAll logic-based RIF dialects are required to
be derived from RIF-FLD by specialization, oras
explained in implementing suchSections Syntax
of a RIF Dialect can go directly to the descriptionas a Specialization of theRIF-FLD and Semantics of a RIF Dialect in question.as
a Specialization of RIF-FLD has. In addition to specialization, to
lower the following main components: Syntacticbarrier of entry for their intended audiences, some
dialects may choose to specify their syntax and semantics in a
direct, but equivalent, way, which does not require familiarity
with RIF-FLD. For instance, the RIF Basic Logic Dialect is specified both by
specialization from RIF-FLD and also directly, without references
to the framework. Thus, the reader who is only interested in
RIF-BLD can proceed
directly to that document.
RIF-FLD has the following main components:
The framework described in this document is very general, and it captures most of the popular logic-based languages found in Databases, Logic Programming, and on the Semantic Web. However, it is expected that the needs of some newly developed dialects may stimulate further evolution of RIF-FLD.Syntactic framework. The syntactic framework defines three main classessix
types of RIF terms:
RIF dialects can choose to support all or some of the aforesaid categories of terms. The syntactic framework also defines the following mechanisms for specializing these terms:
Symbol spaces are used to separate the set of all non-logical
symbols (symbols used as variables, individual constants,
predicates, and functions) into distinct subsets. These subsets can
then be given different semantics. A symbol space has one or more
identifiers and a lexical space, which defines the "shape""shape"
of the symbols in that symbol space. For instance, some symbol
spaces can be used to identify any object, and syntactically they
look like IRIs (for instance,(e.g., rif:iri in RIF Basic Logic Dialect).
Other symbol spaces may be used to describe the data types used in
RIF (for example, xsd:integer).
Signatures determine which terms and formulas are well-formed. It is a generalization of the notion of a sort in classical first-order logic [Enderton01]. Each nonlogical symbol (and some logical symbols, like =) has an associated signature. A signature defines, in a precise way, the syntactic contexts in which the symbol is allowed to occur.
For instance, the signature associated with a symbol, p, might allow p to appear in a term of the form f(p), but disallow it to occur in a term like p(a,b). The signature for f, on the other hand, might allow that symbol to appear in f(p) and f(p,q), but disallow f(p,q,r) and f(f). In this way, it is possible to control which symbols are used for predicates and which for functions, where variables can occur, and so on.
Semantic framework. This framework defines the notion of a semantic structure or interpretation (both terms are used in the literature [Enderton01, Mendelson97], but here we will mostly use the first). Semantic structures are used to interpret RIF formulas and to define logical entailment. As with the syntax, this framework includes a number of mechanisms that RIF logic-based dialects can specialize to suit their needs. These mechanisms include:
Roughly speaking, a set of formulas, G, logically
entails another formula, g, if for every semantic
structure I in some set S, if I
makes G true, then I also makes g
true. Almost all known logics define entailment this way. The
difference lies in which set S they use. For instance,
logics that are based on the classical first-order predicate
calculus, such as Description Logic, assume that S is the
set of all semantic structures. In contrast, logic
programming languages, which use default negation, assume
that S contains only the so-called "minimal""minimal" Herbrand models
of G and, furthermore, only the minimal models of a
special kind. See [Shoham87]
for a more detailed exposition of this subject.
XML serialization framework. This framework defines the general principles for serializing the various parts of the presentation syntax of RIF-FLD.
The next subsection explains the overall idea of deriving the syntax of a RIF dialect from the RIF framework. The actual syntax of the RIF framework is given in subsequent subsections.
The syntax for a RIF dialect can be obtained from the general syntactic framework of RIF by specializing the following parameters (which are defined in this document):
Signatures determine which terms in the dialect are well-formed and which are not.
The exact way this assignment is definedsignatures are assigned depends on the dialect. TheAn
assignment can be explicit or implicit (for instance, derived from
the context in which each symbol is used).
The RIF logic framework introduces the following types of terms:
A dialect might support all of themthese terms or just a subset.
Symbol spaces determine the "shapes"syntax of the symbols that are
allowed by the syntax ofin the dialect.
RIF-FLD allows to buildformulas of the following kind:
A dialect might support all of these formulas or it might impose
various restrictions. For instance, the formulas allowed in the
conclusion and theand/or premises of rulesimplications might be restricted,
certain quantificationstypes of quantification might be prohibited, classical or
default negation (or both) might not be allowed, etc.
Definition (Alphabet). The alphabet of RIF-FLD consists of
The set of connective symbols, quantifiers, =, etc., is
disjoint from Const and Var. Variables are
written as Unicode strings preceded with the symbol "?"."?".
The syntax for constant symbols is givenargument names in ArgNames are written as Unicode
strings that do not start with a "?". The syntax for
constant symbols is given in Section Symbol Spaces.
The symbols =, #, and ## are used in formulas that define equality, class membership, and subclass relationships. The symbol -> is used in terms that have named arguments and in frame terms. The symbol External indicates that an atomic formula or a function term is defined externally (e.g., a builtin).
The symbol Group is used to organize RIF-BLD rules into collections and annotate them with metadata. ☐
The language of RIF-BLDRIF-FLD is the set of formulas constructed using
the above alphabet according to the rules spelled out below.
Throughout this document, the most basic construct of a logic language is a term . RIF-FLD supports several kinds of terms: constants, variables,xsd: prefix stands for
the regular positional terms, plus terms with named argumentsXML Schema namespace URI
http://www.w3.org/2001/XMLSchema#, the rdf:
prefix stands for
http://www.w3.org/1999/02/22-rdf-syntax-ns#, equality, classification terms,and
frames .rif: stands for the word " term " willURI of the RIF namespace,
http://www.w3.org/2007/rif#. Syntax such as
xsd:string should be used to referunderstood as a compact URI
[CURIE] -- a macro that expands
to any kinda concatenation of terms. Formally, terms are defined as follows: Constantsthe character sequence denoted by the prefix
xsd and variables . If t ∈ Const or t ∈ Var then t is a simple term . Positional termsthe string string. If t and t 1 , ..., t n are terms then t(t 1 ... t n )The compact URI
notation is not part of the RIF syntax, but rather just a
positional term . Positional termsspace-saving device in RIF-FLD generalizethis document.
The regular notionset of all constant symbols in a termRIF dialect is partitioned
into a number of subsets, called symbol spaces, which are
used to represent XML Schema data types, data types defined in
first-order logic. For instance,other W3C specifications, such as rdf:XMLLiteral, and to
distinguish other sets of constants. All constant symbols have a
syntax (and sometimes also semantics) imposed by the abovesymbol space
to which they belong
Definition
allows variables everywhere. Terms with named arguments .(Symbol space). A term with named argumentssymbol space is of the form t(s 1 ->v 1 ... s n ->v n ) , where t , v 1 , ..., v n are terms (positional, witha named arguments, frame, etc.), and s 1 , ..., s n are (not necessarily distinct) symbols fromsubset
of the set ArgNamesof all constants, Const. The term t here representssemantic aspects
of symbol spaces will be described in Section Semantic Framework. Each
symbol in Const belongs to exactly one symbol space.
Each symbol space has an associated lexical space, a predicateunique
identifier, and, possibly, one or more aliases. More precisely,
To simplify the language, we will often use symbol space
identifiers to refer to the actual symbol spaces (for instance, we
may use "symbol space xsd:string" instead of classification terms: class membership terms (or just membership terms ) and subclass terms . t#s is"symbol space
identified by xsd:string").
To refer to a membership term if t and s are arbitrary terms. t##s isconstant in a subclass term if t and s are arbitrary terms. Frame terms . t[p 1 ->v 1 ... p n ->v n ]particular RIF symbol space, we use
the following presentation syntax:
"literal"^^symspace
where literal is a frame term (or simply a frame ) if t , p 1 , ..., p n , v 1 , ..., v n , n ≥ 0, are arbitrary terms. As incalled the caselexical part
of the terms with named arguments, the ordersymbol, and symspace is an identifier or an alias
of the properties p i ->v i in a framesymbol space. Here literal is immaterial. Classification and frame terms are used to describe objectsa sequence of Unicode
characters that must be an element in object-based logics like F-logic [ KLW95 ].the above definition is very general. It makes no distinction between constant symbols that represent individuals, predicates, and function symbols.lexical space of the
samesymbol can occur in multiple contexts at the same time.space symspace. For instance,
if p , a ,"1.2"^^xsd:decimal and b"1"^^xsd:decimal are legal
symbols then p(p(a) p(a p c)) is a term. Even variablesbecause 1.2 and general terms1 are allowed to occur inmembers of the positionlexical space of predicates and function symbols, so p(a)(?v(a c) p)the
XML Schema data type xsd:decimal. On the other hand,
"a+2"^^xsd:decimal is alsonot a term. Frame, classification, and other terms can be freely nested, as exemplified by p(?X q#r[p(1,2)->s](d->e f->g)) . Some language environments, like FLORA-2 [ FL2 ], OO jDREW [ OOjD ], and CycL [ CycL ] support fairly large (partially overlapping) subsetslegal symbol, since
a+2 is not part of RIF-FLD terms, but most languages support much smaller subsets. RIF dialects are expected to carve outthe appropriate subsetslexical space of
RIF-FLD terms, andxsd:decimal.
The general formset of all symbol spaces that partition Const is
considered to be part of the RIFlogic framework allows a considerable degreelanguage of freedom.RIF-FLD.
The |
RIF dialect is expectedsupports the following symbol spaces. Rule sets that are
exchanged through RIF can use additional symbol spaces as explained
below.
and all the symbol spaces that correspond to select appropriate signatures forthe symbolssubtypes of
xsd:string as specified in its alphabet,[XML-SCHEMA2].
and onlyall the termssymbol spaces that are well-formed accordingcorresponds to the selected signatures are allowedsubtypes of
xsd:decimal as specified in that particular dialect. 2.4 Signatures[XML-SCHEMA2].
The lexical spaces of the above symbol spaces are defined in the document [XML-SCHEMA2].
This section we introducesymbol space represents XML content. The conceptlexical space of
rdf:XMLLiteral is defined in the document [RDF-CONCEPTS].
This symbol space represents text strings with a signaturelanguage tag
attached. The lexical space of rif:text is the set of all
Unicode strings of the form ...@LANG, whichi.e., strings that
end with @LANG where LANG is a key mechanism that allows RIF-FLD to control the contextlanguage
identifier as defined in which the various[RFC-3066].
Constant symbols are allowedthat belong to occur. Much ofthis development is inspired bysymbol space are intended
to be used in a way similar to RDF resources [ CK95RDF-SCHEMA]. The lexical space
consists of all absolute IRIs as specified in [RFC-3987]; it shouldis unrelated to the XML
primitive type anyURI. A rif:iri constant must be
keptinterpreted as a reference to one and the same object regardless of
the context in mindwhich that constant occurs.
Symbols in this symbol space are part of a separate language for signatures, which is akinlocal to grammar rulesthe RIF documents in
that it determineswhich sequences of tokens are inthey occur. This means that occurrences of the language and which are not.same
rif:local constant in some dialects (for example RIF-BLD ), signaturesdifferent documents are derived fromviewed as
unrelated distinct constants, but occurrences of the context and no separate language for signatures is used. Other dialects may choose to specify signatures explicitly.same
rif:local constant in that case, they will needthe same document must refer to definethe
same object. The lexical space of rif:local is the same as
the lexical space of xsd:string.
The most basic construct of a concretelogic language for specifying signatures. Let SigNames beis a non-empty, partially-ordered finite or countably infinite setterm.
RIF-FLD supports several kinds of symbols, disjoint from Const , Varterms: constants, variables, the
regular positional terms, plus terms with named
arguments, equality, classification terms, and
ArgNames , called signature namesframes. We require that this set includes at leastThe following signature names: atomic --word "term" will be used to represents the syntactic context where atomic formulas are allowedrefer to appear. = -- used for representing contexts where equality terms can appear. # -- a signature name reserved for membership terms. ## -- a signature reserved for subclass terms. -> --any
kind of term.
Definition
(Term). A signature reserved for frame terms. Dialects are expected to introduce additional signature names. For instance, RIF-BLD introduces one other signature name,term . The partial order on SigNamesis dialect-specific; it is used in the definitiona statement of one of well-formed terms below. We use the symbol < to representthe
partial order on SigNames . Informally, α < β means that terms with signature α can be used wherever terms with signature β are allowed. We will write α ≤ βfollowing forms:
Positional terms in RIF-FLD generalize the regular notion of a
term used in first-order logic. For instance, () ⇒ term and ( term ) ⇒ term are arrow expressions, ifthe above definition
allows variables everywhere.
The term t here represents a predicate or a function;
s1, ..., sn -> κrepresent
argument names; and v1, ...,
vn ) => κ is an arrow expressionrepresent argument values. Terms with named
arguments . For instance, ( arg1->term arg2->term ) => termare like regular positional terms except that the
arguments are named and their order is an arrow signature expressionimmaterial. Note that a term
with no arguments, like f(), is both positional and also is
considered to have named arguments.
Classification terms are used to describe class hierarchies.
Frame terms are used to describe properties of objects. As in
the equality symbol. All arrow expressions e i here havecase of the form (κ κ) ⇒ γ (both arguments in an equation must haveterms with named arguments, the same signature) and at least oneorder of these expressions must have the form (κ κ) ⇒ atomic (i.e., some equations should be allowed as atomic formulas). Dialects may further specialize this signature. S containsthe
signature # { e 1 , ..., e n ...} where all arrow expressions eproperties pi->vi in a frame is
immaterial.
Such terms are binary (have two arguments)used for representing builtin functions and
at least one has the form (κ γ) ⇒ atomic . Dialects may further specialize this signature. S contains the signature ## { e 1 , ..., e n ...} where all arrow expressions e i havepredicates as well as "procedurally attached" terms or predicates,
which might exist in various rule-based systems, but are not
specified by RIF. ☐
The form (κ κ) ⇒ γ (both arguments must haveabove definition is very general. It makes no distinction
between constant symbols that represent individuals, predicates,
and function symbols. The same signature) andsymbol can occur in multiple
contexts at least one of these arrow expressions has the form (κ κ) ⇒ atomic . Dialects may further specialize this signature. S containsthe signature -> { e 1same time. For instance, if p, ..., e n ...}, where all arrow expressions e ia,
and b are ternary (have three arguments)symbols then
p(p(a) p(a p c)) is a term. Even variables
and at least onegeneral terms are allowed to occur in the position of
thempredicates and function symbols, so
p(a)(?v(a c) p) is of the form (κ 1 κ 2 κ 3 ) ⇒ atomic . Dialects may further specialize this signature. S has at most one signature for any given signature name. Whenever S containsalso a pair of signatures, η Sterm.
Frame, classification, and κ R , such that η<κ then R ⊆ Sother terms can be freely nested, as
exemplified by
p(?X q#r[p(1,2)->s](d->e f->g)).
Here η S denotes a signature with the name ηSome language environments, like FLORA-2 [FL2], OO jDREW [OOjD], and CycL [CycL]
support fairly large (partially overlapping) subsets of RIF-FLD
terms, but most languages support much smaller subsets. RIF
dialects are expected to carve out the associated setappropriate subsets of
arrow expression S ; similarly κ R is a signature named κ withRIF-FLD terms, and the setgeneral form of expressions R .the requirement that R ⊆ S ensures that symbols that have signature ηRIF logic framework
allows a considerable degree of freedom.
Dialects can be used whereveralso restrict the symbols with signature κ are allowed. 2.5 Well-formedcontexts in which the various
terms and Formulas Signatures are usedcan occur. The mechanism that allows to control the context
in which various symbols are allowed to occur, as explained next. Each variable symbolis associated with exactly one signature from a coherent set of signatures.called a constant symbol can have one or more signatures,signature and different symbols can be associated withworks as follows. The same signature. SinceRIF-FLD
language associates a signature names uniquely identifywith each symbol (both constant and
variable symbols) and uses signatures in coherent signature sets, we will often referto signatures simply by their names. For instance, if one of f 's signatures is atomic{ } , we may simply say that symbol f has signature atomic . Next wedefine well-formed
terms. Each RIF dialect is expected to select appropriate
signatures for the symbols in its alphabet, and their signatures. Likeonly the constant symbols,terms that
are well-formed according to the selected signatures are allowed in
that particular dialect.
|
This section introduces the notion of external schemas,
which serve as templates for externally defined terms. These
schemas determine which externally defined functions or predicates,
are acceptable as terms in a well-formed term with signature η. A positionalRIF dialect. Externally defined terms
include RIF builtins, which are specified in the document Data Types and Builtins. The
notion of an externally defined term t(t 1 ... t n ) , 0≤n,in RIF is well-formed and has a signature σ iff tvery general. It is
not necessarily a well-formed term that hasfunction or a signature that containspredicate -- it can be any
term, including frames, classification terms, and so on.
Definition (Schema for external term). An arrow expressionexternal
schema is a statement of the form (σ(?X1
... σ... ?Xn ) ⇒ σ; and Each t i; τ) where
The names of the variables in an external schema are immaterial,
but their order is. For instance,
(?X ?Y; ?X[foo->?Y]) and
has(?V ?W; ?V[foo->?W]) are considered to
be the same schema, but
(?X ?Y; ?X[foo->?Y]) and
(?Y ?X; ?X[foo->?Y]) are viewed as
different schemas.
A signature σ iffterm t is a well-formed term that has a signature that containsan arrow expression with named argumentsinstance of an external
schema (?X1 ... ?Xn; τ)
iff t can be obtained from τ by a simultaneous
substitution ?X1/s1
... ?Xn/sn or the form ( pvariables
?X1 -> σ... ?Xn with terms
s1 ... p n -> σsn ) ⇒ σ; and Each t i is a well-formed term whose signature is γ i , such that γ i, ≤ σrespectively. Some of the
terms si can be variables themselves. For
example, ?Z[foo->f(a ?P)] is an instance of
(?X ?Y; ?X[foo->?Y]) by the substitution
?X/?Z ?Y/f(a ?P). As a special case, when n=0 we obtain ☐
Observe that t( ) isa well-formed term with signature σ, if t 's signature contains the arrow expression () ⇒ σ.variable cannot be an equality terminstance of an external
schema, since τ in the form t 1 =t 2 is well-formed and hasabove definition cannot be a
signature κ iff The signature = has an arrow expression (σ σ) ⇒ κ t i and t 2 are well-formed terms with signatures γ 1 and γ 2 , respectively, suchvariable. It will be seen later that this implies that γ i ≤ σ, i=1,2 .a membershipterm of
the form t 1 #t 2External(?X) is not well-formed and hasin RIF.
Definition (Coherent set of external schemas). A signature κ iff The signature # has an arrow expression (σ 1 σ 2 ) ⇒ κset of
external schemas is coherent if there can be no term,
t i, that is an instance of two distinct schemas.
Note that the coherence condition is easy to verify
syntactically and t 2 are well-formed terms with signatures γ 1that it implies that schemas like
(?X ?Y; ?X[foo->?Y]) and
γ 2(?Y ?X; ?X[foo->?Y]), respectively, suchwhich differ only
in the order of their variables, cannot be in the same coherent
set. ☐
It important to understand that γ i ≤ σ i , i=1,2 . A subclass termexternal schemas are not
part of the form t 1 ##t 2 islogic language in RIF, since they do not appear
anywhere in the RIF formulas. Instead, like signatures, which are
defined below, they are best thought of as part of the grammar of
the language. In particular, they will be used to determine which
external terms, i.e., the terms of the forl External(t)
are well-formed and has.
In this section we introduce the concept of a signature κ iff,
which is a key mechanism that allows RIF-FLD to control the signature ## has an arrow expression (σ σ) ⇒ κ t i and t 2context
in which the various symbols are well-formed termsallowed to occur. For instance, a
symbol f with signatures γ 1 and γ 2signature {(term term) => term,
(term) => term} can occur in terms like f(a b),
respectively, such that γ i ≤ σ, i=1,2 .f(f(a b) a), f(f(a)), etc., if a
frameand b have signature term of. But f is not
allowed to appear in the form t[s 1 ->v 1 ... s n ->v n ]context f(a b a) because there is
well-formed and has a signature κ iffno =>-expression in the signature -> has arrow expressions (σ σ 11 σ 12 ) ⇒ κ, ..., (σ σ n1 σ n2 ) ⇒ κ (these n expressions need not be distinct). t , s j , and v j are well-formed terms with signatures γ, γ j1 , and γ j2 , respectively, such that γ ≤ σ and γ ji ≤ σ ji , where j=1,...,n and i=1,2 . Note that, accordingof f to
support such a context.
The above definition, f() and f are distinct terms. We define atomic formulas as follows: A term is a well-formed atomic formula iff it is a well-formed term oneexample provides intuition behind the use of
whosesignatures in RIF-FLD. Much of the development, below, is η, such that η = atomic or η < atomic . Noteinspired
by [CK95]. It should be
kept in mind that equality, membership, subclass, and frame termssignatures are always atomic formulas, since atomic is always onenot part of their signatures. More general formulasthe logic
language in RIF, since they do not appear anywhere in the RIF
formulas. Instead they are constructed outpart of atomic formulas withthe helpgrammar: they are used to
determine which sequences of logical connectives. A formula is a statement that can have onetokens are in the language and which
are not. The actual way by which signatures are assigned to the
symbols of the following forms: Atomic : If φlanguage may vary from dialect to dialect. In some
dialects (for example RIF-BLD), this assignment is a well-formed atomic formula then itderived from the context in
which each symbol occurs and no separate language for signatures is
also aused. Other dialects may choose to assign signatures explicitly. In
that case, they would require a concrete language for signatures
(which would be separate from the language for specifying the logic
formulas of the dialect).
Definition (Signature name). Let SigNames be a non-empty, partially-ordered finite or countably infinite set of symbols, called signature names. Since signatures are not part of the logic language, their names do not have to be disjoint from Const, Var, and ArgNames. We require that this set includes at least the following signature names:
Dialects are expected to introduce additional signature names.
For instance, RIF-BLD introduces one other signature name,
term. The partial order on SigNames is
dialect-specific; it is used in the definition of well-formed formula. Conjunction :terms
below.
We use the symbol < to represent the partial order
on SigNames. Informally, α < β means that
terms with signature α can be used wherever terms with
signature β are allowed. We will write α ≤ β if
φeither α = β or α < β.
Definition (Signature). A signature is a
statement of the form η{e1, ..., φen,
...} where η ∈ SigNames is the name of the
signature and {e1, ..., en ≥ 0,, ...} is
a countable set of arrow expressions. Such a set can thus be
infinite, finite, or even empty. In RIF-BLD, signatures can have at
most one arrow expression. Other dialects (such as HiLog [CKW93], for example) may require
polymorphic symbols and thus allow signatures with more than one
arrow expression in them.
An arrow expression is defined as follows:
For instance, () ⇒ term and (term) ⇒ term are arrow expressions, if term is a signature name.
For instance, (arg1->term arg2->term) => term is an arrow signature expression with named arguments. The order of the arguments in arrow expressions with named arguments is immaterial, so any permutation of arguments yields the same expression.
A set S of signatures is coherent iff
All arrow expressions ei here have the form (κ κ) ⇒ γ (the arguments in an equation must be compatible) and at least one of these expressions must have the form (κ κ) ⇒ atomic (i.e., some equations should be allowed as atomic formulas). Dialects may further specialize this signature.
Here all arrow expressions ei are binary (have two arguments) and at least one has the form (κ γ) ⇒ atomic. Dialects may further specialize this signature.
Here all arrow expressions ei have the form (κ κ) ⇒ γ (the arguments must be compatible) and at least one of these arrow expressions has the form (κ κ) ⇒ atomic. Dialects may further specialize this signature.
Here ηA denotes a signature with the name η
and the associated set of arrow expressions A; similarly
κB is treated asa tautology, i.e.,signature named κ with the set of
expressions B. The requirement that B⊆A
formulaensures that is always true. Disjunction : If φ 1 , ..., φ n , n ≥ 0,symbols that have signature η can be used
wherever the symbols with signature κ are allowed.
☐
The language of a RIF dialect is a set of all
well-formed formulas then so is Or( φ 1 ... φ n ) . When n=0, we get Or()as
a special case; itdefined below. The language is treated asdetermined by the following
parameters:
If φEach variable symbol is associated with exactly one
signature from a well-formed formulacoherent set of signatures. A constant symbol can
have one or more signatures, and different symbols can be
associated with the same signature. (If variables were allowed to
have multiple signatures then Neg φ is awell-formed formula. Default negation : If φ isterms would not have been
closed under substitutions. For instance, a well-formed formula then Naf φ isterm like
f(?X,?X) could be well-formed, but f(a,a) could
be ill-formed.)
We have already seen how the alphabet and ψthe symbol spaces are
used to define RIF terms. The
next section shows how signatures and external schemas are used to
further specialize this notion to define well-formed RIF-FLD
terms.
then φ :- ψSince signature names uniquely identify signatures in coherent
signature sets, we will often refer to signatures simply by their
names. For instance, if one of f's signatures is
atomic{ }, we may simply say that symbol f
has signature atomic.
Definition (Well-formed term).
As a special case, when n=0 we obtain that
t( ) is a well-formed term with signature term{ } .σ,
if instead p had thet's signature mysig2 {( term term )⇒ term , ( term term term )⇒ term } then p(p(a) p(a b c)) would not be a well-formed term since then p(a) would not be well-formed (in this case, p would have nocontains the arrow expression which allows p to take just one argument). For() ⇒
σ.
As a well-formed term, but alsospecial case, when n=0 we obtain that
t( ) is a well-formed atomic formula.term with signature σ,
if t's signature contains the arrow expression () ⇒
σ.
Note that, according to the actual symbol spaces (for instance, we may use "symbol space xsd:string " insteaddefinition of "symbol space identified by xsd:string "). To refer tocoherent sets of
schemas, a term can be an instance of at most one external schema.
☐
Note that, like constant in a particular RIF symbol space, we usesymbols, well-formed terms can have
more than one signature. Also note that, according to the following presentation syntax: LITERAL^^SYMSPACE where LITERALabove
definition, f() and f are distinct terms.
Definition (Well-formed formula). A well-formed term is also
a Unicode string, called the lexical partwell-formed atomic formula iff one of the symbol,its
signatures is atomic or it is < atomic.
Note that equality, membership, subclass, and SYMSPACEframe terms are
atomic formulas, since atomic is an identifierone of the symbol space in the formtheir
signatures.
More general formulas are constructed out of an absolute IRI string. LITERAL must be an element inatomic formulas
with the lexical spacehelp of logical connectives. A formula is a
statement that can have one of the symbol space. For instance, 1.2^^xsd:decimal and 1^^xsd:decimalfollowing forms:
On the other hand, a+2^^xsd:decimalAs a special case, And() is notallowed and is treated as a
legal symbol, since a+2tautology, i.e., a formula that is not part of the lexical space of xsd:decimalalways true.
The set of all symbol spacesWhen n=0, we get Or() as a special case; it is
treated as a contradiction, i.e., a formula that partition Constis considered to be part of the logic language used by RIFalways
false.
Group formulas are intended to the subtypesrepresent sets of xsd:decimal asformulas
annotated with metadata. This metadata is specified in [ XML-SCHEMA2 ]. xsd:time ( http://www.w3.org/2001/XMLSchema#time ). xsd:date http://www.w3.org/2001/XMLSchema#dateTime ). xsd:dateTime http://www.w3.org/2001/XMLSchema#dateTime ). The lexical spacesusing an
optional frame term φ. Note that some of the
above symbol spaces are defined in the document [ XML-SCHEMA2 ]. rdf:XMLLiteral ( http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral ).ρi's can be group formulas themselves, which
means that groups can be nested. This symbol space represents XML content. The lexical spaceallows one to attach metadata
to various subsets of rdf:XMLLiteral is definedformulas, which may be inside larger sets of
formulas, which in turn may be annotated. ☐
Example 1 (Signatures, well-formed terms and formulas).
We illustrate the document [ RDF-CONCEPTS ]. rif:text (for text strings with language tags attached). This symbol space represents text stringsabove definitions with a language tag attached. The lexical space of rif:text is the set of all Unicode strings ofthe form ...@LANG , i.e., strings that end with @LANG where LANG is a language identifier as definedfollowing examples.
In [ RFC-3066 ]. rif:iri (for internationalized resource identifiers or IRI s). Constant symbols that belong to this symbol space are intendedaddition to atomic, let there be used in a way similaranother signature,
term{ }, which is intended here to RDF resources [ RDF-SCHEMA ].represent the
lexical space consistscontext of all absolute IRIs as specified in [ RFC-3987 ]; it is unrelatedthe arguments to positional terms or atomic
formulas.
Consider the XML primitive type anyURIterm p(p(a) p(a b c)). If
p has the (polymorphic) signature
mysig{(term)⇒term, (term
term)⇒term, (term term
term)⇒term} and a rif:iri constant, b,
c each has the signature term{ } then
p(p(a) p(a b c)) is supposed toa well-formed term with
signature term{ }. If instead p had the
signature mysig2{(term
term)⇒term, (term term
term)⇒term} then
p(p(a) p(a b c)) would not be interpreted asa referencewell-formed
term since then p(a) would not be well-formed (in this
case, p would have no arrow expression which allows
p to take just one andargument).
For a more complex example, let r have the same object regardless ofsignature
mysig3{(term)⇒atomic, (atomic
term)⇒term, (term term
term)⇒term}. Then
r(r(a) r(a b c)) is well-formed. The
context in whichinteresting twist here is that constant occurs. rif:local (for constant symbolsr(a) is an atomic formula
that are not visible outside ofoccurs as an argument to a particular set of RIF formulas). Symbols in this symbol space are used locally in their respective rule sets.function symbol. However, this means that occurrences ofis
allowed by the same rif:local -constant in different rule sets are viewed as unrelated distinct constants, but occurrencesarrow expression (atomic term)⇒
term, which is part of r's signature. If
r's signature were
mysig4{(term)⇒atomic, (atomic
term)⇒atomic, (term term
term)⇒term} instead, then
r(r(a) r(a b c)) would be not only a
well-formed term, but also a well-formed atomic formula.
An even more interesting example arises when the same constant in the same rule set must refer to the same object. The lexical spaceright-hand side
of rif:localan arrow expression is the same as the lexical space of xsd:stringsomething other than term or
atomic. Notes on RIF-compliant supportFor symbol spaces. A RIF-compliant inference engine must support the following symbol spaces: xsd:string , xsd:decimalinstance, let John, xsd:timeMary,
xsd:dateNewYork, xsd:dateTimeand Boston have signatures
term{ }; flight and parent have
signature h2{(term term)⇒atomic}; and
closure has signature
hh1{(h2)⇒p2}, rdf:XMLLiteralwhere
p2 is the name of the signature
p2{(term term)⇒atomic}. Then
flight(NewYork Boston),
rif:textclosure(flight)(NewYork Boston),
rif:iriparent(John Mary), rif:local . Such an engine can support additional symbol spaces. A RIF-producing system includes a RIF compliant inference engineand
a transformation from the language of that engine into valid RIF XML format.closure(parent)(John Mary) would be well-formed
formulas. Such an engine must support all the symbol spaces thatformulas are mentionedallowed in languages like HiLog
[CKW93], which support
predicate constructors like closure in the documents producedabove example.
☐
Example 2 (A nested RIF-FLD group annotated with metadata).
We illustrate formulas, groups, and metadata by the aforesaid transformation. In particular,following
complete example. For better readability, we use the compact URI
notation which assumes that prefixes are macro-expanded into IRIs.
As explained earlier, this transformation must not produce invalid constant symbols, i.e., symbols whose lexical partis just a space-saving device and not
an elementpart of the RIF syntax.
Compact URI prefixes: dc expands into http://dublincore.org/documents/dces/ ex expands into http://example.org/ontology# hamlet expands into http://www.shakespeare-literature.com/Hamlet/
Group "hamlet:assertions"^^rif:iri["dc:title"^^rif:iri->"Hamlet"^^xsd:string, "dc:creator"^^rif:iri->"Shakespeare"^^xsd:string] ( Exists ?X (And(?X # "ex:RottenThing"^^rif:iri "ex:part-of"^^rif:iri(?X "http://www.denmark.dk"^^rif:iri))) Forall ?X (Or("hamlet:to-be"^^rif:iri(?X) Naf "hamlet:to-be"^^rif:iri(?X))) Forall ?X (And(Exists ?B (And("ex:has"^^rif:iri(?X ?B) ?B#"ex:business"^^rif:iri)) Exists ?D (And("ex:has"^^rif:iri(?X ?D) ?D#"ex:desire"^^rif:iri))) :- ?X#"ex:man"^^rif:iri) Group "hamlet:facts"^^rif:iri[ ] ( "hamlet:Yorick"^^rif:iri#"ex:poor"^^rif:iri "hamlet:Hamlet"^^rif:iri#"ex:prince"^^rif:iri ) )
Observe that the above set of formulas has a nested subset with its own metadata, "hamlet:facts"^^rif:iri[ ], which contains only a global IRI. ☐
Up to now we used Mathematical English to specify the lexical spacesyntax of
RIF-FLD. We will now use the symbol's symbol space. A RIF-consuming system includes a RIF-compliant inference engine andfamiliar EBNF notation in order to
provide a transformation from RIF XMLsuccinct overview of the syntax. The following points
about the EBNF notation have to be kept in mind:
Group ::= 'Group' IRIMETA? '(' (FORMULA | Group)* ')' IRIMETA ::= Frame FORMULA ::= 'And' '(' FORMULA* ')' | 'Or' '(' FORMULA* ')' | Implies | 'Exists' Var+ '(' FORMULA ')' | 'Forall' Var+ '(' FORMULA ')' | 'Neg' FORMULA | 'Naf' FORMULA | ATOMIC | 'External' '(' ATOMIC ')' Implies ::= FORMULA ':-' FORMULA ATOMIC ::= Atom | Equal | Member | Subclass | Frame Atom ::= UNITERM UNITERM ::= TERM '(' (TERM* | (Name '->' TERM)*) ')' Equal ::= TERM '=' TERM Member ::= TERM '#' TERM Subclass ::= TERM '##' TERM Frame ::= TERM '[' (TERM '->' TERM)* ']' TERM ::= Const | Var | Expr | 'External' '(' Expr ')' | Equal | Member | Subclass | Frame Expr ::= UNITERM Const ::= '"' UNICODESTRING '"^^' SYMSPACE Name ::= UNICODESTRING Var ::= '?' UNICODESTRING
The RIF-FLD semantic framework defines the notions of semantic structures and of models of RIF formulas. The semantics of a dialect is derived from these notions by specializing the following parameters.
The syntax of a dialect may limit the kinds of terms that are supported. For instance, if the dialect does not support frames or terms with named arguments then the parts of the semantic structures whose purpose is to interpret the unsupported types of terms become redundant.
The RIF-FLD semantic framework allows formulas to have truth values from an arbitrary partially ordered set of truth values, TV. A concrete dialect must select a concrete partially or totally ordered set of truth values.
A data type is a symbol space that haswhose symbols have a fixed
interpretation in any semantic structure. RIF-FLD defines a set of
core data types that each dialect is expected to support, but its
semantics does not limit support to just the core types. RIF
dialects can introduce additional data types, and each dialect is
expected to define the exact set of data types that it
supports.
Logical entailment in RIF-FLD is defined with respect to an
unspecified set of intended models. A RIF dialect must
define which models are considered to be intended. For instance,
one dialect might specify that all models are intended (which leads
to classical first-order entailment), another may consider only the
minimal models as intended, while a third one might only use
so-calledwell-founded or stable models. All of the abovemodels [GRS91, GL88].
These notions are defined in the remainder of this document.
Definition (Set of truth values). Each RIF dialect is
expected to define the set of truth values, denoted
by TV. This set must have a partial order, called the
truth order, denoted <t. As a special case,In some
dialects, <t can be a total order in some dialects.order. We write a
≤t b if either a <t b
or a and b are the same element of TV.
In addition,
RIF dialects can have additional truth values. For instance, the semantics of some versions of NAF, such as the well-founded negation, requires three truth values: t, f, and u (undefined), where f <t u <t t. Handling of contradictions and uncertainty usually requires at least four truth values: t, u, f, and i (inconsistent). In this case, the truth order is partial: f <t u <t t and f <t i <t t.
Definition (Primitive data type). A primitive data type (or just a data type, for short) is a symbol space that has
Semantic structures are always defined with respect to a particular set of data types, denoted by DTS. In a concrete dialect, DTS always includes the data types supported by that dialect. All RIF dialects are expected to support the following primitive data types:
Their value spaces and the lexical-to-value-space mappings are defined as follows:
The value space and the lexical-to-value-space mapping for rif:text defined here are compatible with RDF's semantics for strings with named tags [RDF-SEMANTICS].
The above list of supported data types will move to the document Data Types and Built-Ins. Any existing discrepancies will be fixed at that time. |
Although the lexical and the value spaces might sometimes look
similar, one should not confuse them. Lexical spaces define the
syntax of the constant symbols in the RIF language that belong to the various primitive data types. In contrast,language. Value spaces
define the meaning of thosethe constants. The lexical and the
value spaces are often not even isomorphic. For instance,example,
1.2^^xsd:decimal and 1.20^^xsd:decimal are two
legal -- and distinct -- constants in RIF because 1.2 and
1.20 belong to the lexical space of xsd:decimal.
However, these two constants are interpreted by the same
element of the value space of the xsd:decimal type.
Therefore, 1.2^^xsd:decimal = 1.20^^xsd:decimal
is a RIF tautology. Likewise, RIF semantics for data types implies
certain inequalities. For instance, abc^^xsd:string ≠
abcd^^xsd:string is a tautology, since the
lexical-to-value-space mapping of the xsd:string type maps
these two constants into distinct elements in the value space of
xsd:string.
The central step in specifying a model-theoretic semantics for a logic-based language is defining the notion of a semantic structure, also known as an interpretation. Semantic structures are used to assign truth values to RIF-FLD formulas.
Definition (Semantic structure). A semantic
structure, I, is a tuple of the form
<TV, DTS, D,
IC, IV,
IF, Iframe,
ISF, Isub,
Iisa, I=,
Iexternal,
Itruth >.>. Here D is a
non-empty set of elements called the domain of
I. We will continue to use Const to refer to
the set of all constant symbols and Var to refer to the
set of all variable symbols. TV denotes the set of
truth values that the semantic structure uses and DTS
is the set of primitive data types used in I.
The other components of I are total mappings defined as follows:
This mapping interprets constant symbols.
This mapping interprets variable symbols.
This mapping interprets positional terms.
This is analogous to the interpretation of positional terms with two differences:
To see why such repetition can occur, note that argument names
may repeat: p(a->b a->c). This can be understood as
treating a as a set-valued argument. Identical
argument/value pairs can then arise as a result of a substitution.
For instance, p(a->b a->c)p(a->?A a->?B) becomes p(a->b
a->b) if the variables ?A and ?B are both
instantiated with the symbol b.
Such repetitions arise naturally when variables are instantiated
with constants. For instance, o[?A->?B ?A->?B]
becomes o[a->b a->b] if variable ?A is
instantiated with the symbol a set that contains band c?B with
b.
The operator ## is required to be transitive, i.e., c1 ## c2 and c2 ## c3 must imply c1 ## c3. This is ensured by a restriction in Section Interpretation of Formulas.
The relationships # and ## are requiredrelationships # and ## are required to
have the usual property that all members of a subclass are also
members of the superclass, i.e., o # cl and
cl ## scl must imply o # scl.
This is ensured by a restriction in Section Interpretation of
Formulas.
It gives meaning to the equality operator.
It is used to define truth valuation for formulas.
For every external schema, σ, associated with the
language, Iexternal(σ) is assumed
to havebe specified externally in some document (hence the usual property that all members ofname
external schema). In particular, if σ is a subclass are also membersschema
of a RIF builtin predicate or function,
Iexternal(σ) is specified in the
superclass, i.e., o # cldocument Data Types and
cl ## scl must imply o # scl . ThisBuiltins so that:
It is used to define truth valuation of formulas.For convenience, we also define the following mapping
I :
Here we use {...} to denote a bag of argument/value pairs.
Here {...} denotes a bag of attribute/value pairs.
Note that, by definition, External(t) is well formed
only if t is an instance of an external schema.
Furthermore, by the definition of coherent sets of external schemas, t
can be an instance of at most one such schema, so
I(External(t)) = I = ( I ( x ), I ( y ))is well-defined.
The effect of signatures. For every signature,
sg, supported by the dialect, there is a subset
Dsg ⊆ D, called the
domain of the signature. Terms that have a given
signature, sg, are supposed tomust be mapped by I to
Dsg, and if a term has more than one
signature it is supposed tomust be mapped into the intersection of the
corresponding signature domains. To ensure this, the following is
required:
The effect of data types. The data types in DTS impose the following restrictions. If dt is a symbol space identifier of a data type, let LSdt denote the lexical space of dt, VSdt denote its value space, and Ldt: LSdt → VSdt the lexical-to-value-space mapping. Then the following must hold:
That is, IC must map the constants of a data type dt in accordance with Ldt. ☐
RIF-FLD does not impose special requirements toon
IC for constants in the lexicalsymbol spaces that
do not correspond to primitive datatypes in DTS.
Dialects may have such requirements, however. An example of such a
restriction could be a requirement that no constant in a particular
symbol space (such as rif:local) can be mapped to
VSdt of a data type dt.
Definition (Truth valuation). Truth valuation
for well-formed formulas in RIF-BLDRIF-FLD is determined using the
following function, denoted TValI:
To ensure that equality has precisely the expected properties, it is required that
To ensure that the operator ## is transitive, i.e.,
c1 ## c2 and c2 ## c3 imply
c1 ## c3, the following is required: For all
c1, c2, c3 ∈ D,
glbt(TValI(c1 ## c2),
TValI(c2 ## c3 )) ))
≤t
TValI(c1 ## c3).
To ensure that all members of a subclass are also members of the superclass, i.e., o # cl and cl ## scl implies o # scl, the following is required:
Since the different attribute/value pairs are supposed to be understood as conjunctions, the following is required:
Note that, by definition, External(t) is well-formed only if t is an instance of an external schema. Furthermore, by the definition of coherent sets of external schemas, t can be an instance of at most one such schema, so I(External(t)) is well-defined.
The empty conjunction is treated as a tautology, so TValI(And()) = t.
The empty disjunction is treated as a contradiction, so TValI(Or()) = f.
The symbol ~ here is the idempotent operator of negation on TV introduced in Section Truth Values. Note that both classical and default negation are interpreted the same way in any concrete semantic structure. The difference between the two kinds of negation comes into play when logical entailment is defined.
Here lubt (respectively, glbt) is taken
over all interpretations I* of the form
<TV, DTS, D,
IC, I*V,
IF, Iframe,
ISF, Isub,
Iisa, I=,
Iexternal,
Itruth >,>, which are exactly like
I, except that the mapping
I*V, is used instead of
IV. I*V is
defined to coincide with I V on all variables except, possibly,defined to coincide with IV on all
variables except, possibly, on ?v1,...
,?vn.
If Γ is a group formula of the form Group φ (ρ1 ... ρn) or Group (ρ1 ... ρn) then
This means that a group of formulas is treated as a conjunction. The metadata is ignored for semantic purposes.
Note that rule implications and equality formulas are always two-valued, even if TV has more than two values.
A model of a group of formulas Γ is a semantic structure I such that TValI(Γ) = t. ☐
Note that although metadata associated with RIF formulas is ignored by the semantics, it can be extracted by XML tools. Since metadata is represented by frame terms, it can be reasoned with by RIF dialects, such as RIF-BLD.
The semantics of a set of formulas, Γ, is the set of its intended semantic structures. RIF-FLD does not specify what these intended structures are, leaving this to RIF dialects. Different logic theories may have different criteria for what is considered an intended semantic structure.
For the classical first-order logic, every semantic structure is
intended. For RIF-BLD, which is based on ?v 1 ,..., ?v n . Rules : TVal I ( head :- body ) = t , if TVal I ( head ) ≥ t TVal I ( body ); TVal I ( head :- body ) = f otherwise. Note that rules and equality formulasHorn rules, intended
semantic structures are two-valued even if TV has more than two values.defined only for sets of rules: an intended
semantic structure of a RIF-BLD set Γ is the unique
minimal Herbrand model of Γ. For the dialects in which
rule bodies may contain literals negated with the
negation-as-failure connective Naf, only some of
the minimal Herbrand models of a set Rof formulasrules are intended. Each
dialect of RIF is asupposed to define the notion of intended
semantic structure I such that TVal I (φ) = t for every φ∈ R . 3.6structures precisely. The two most common theories of
intended semantic structures are the so called well-founded
models [GRS91] and
stable models [GL88].
The following example illustrates the notion of intended
semantic structures. Suppose Γ consists of a single rule
formula p :- Naf q. If Naf were
interpreted as classical negation, not, then this rule
would be simply equivalent to Or(p q), and so it would
have two kinds of models: those where p is true and those
where q is true. In contrast to first-order logic, most
rule-based systems do not consider p and q
symmetrically. Instead, they view the semantics ofrule
p :- Naf q as a set of formulas , R ,statement that p
must be true if it is not possible to establish the settruth of
its intended semantic structuresq. RIF-FLDSince it is, indeed, impossible to establish the truth
of q, such theories would derive p even though it
does not specify what theselogically follow from Or(p q). The logic
underlying rule-based systems also assumes that only the
minimal Herbrand models are intended structures are, leaving this(minimality here is
with respect to RIF dialects. There are different theoriesthe set of howtrue facts). Furthermore, although our
example has two minimal Herbrand models -- one where p is
true and q is false, and the other where p is
false, but q is true, only the first model is considered
to be intended.
The above concept of intended setsmodels and the corresponding
notion of semantic structures are supposedlogical entailment with respect to look like. Forthe classical first-order logic, every semantic structure is intended. For RIF-BLD, which is based on Horn rules,intended semantic structures aremodels,
defined onlybelow, is due to [Shoham87].
We will now define what it means for rulesets:a set of RIF formulas to
entail a RIF formula. We assume that each set of formulas has an
associated set of intended semantic structure ofstructures.
Definition
(Logical entailment). Let Γ be a RIF-BLD ruleset R is the unique minimal Herbrand model of R . For the dialects in which rule bodies may contain literals negated with the negation-as-failure connective nafRIF group formula and
φ a RIF formula. We say that Γ
entails φ, written as
Γ |= φ, if and only some of the minimal Herbrand models of a rule set are intended. Each dialectif for every intended
semantic structure I of RIFΓ it is supposed to definethe case
that TValI(Γ) ≤
TValI(φ). ☐
This general notion of intended semantic structures precisely. The two most common theories of intended semantic structures are the so called well-founded models [ GRS91 ]entailment covers both first-order logic
and stable modelsnon-monotonic logics that underlie many rule-based languages
[ GL88Shoham87].
The following example illustrates the notion of intended semantic structures. Suppose R consists ofRIF XML serialization framework defines a single rule p :- naf q . If naf were interpreted as classical negation, not , then this rule would be simply equivalentnormative mapping
from the RIF-FLD presentation syntax to p \/ q , and so it would have two kinds of models: those where p is trueXML, and those where q is true.also a normative
XML Schema for that XML syntax. As explained in contrast to first-order logic, most rule-based systems do not consider p and q symmetrically. Instead, they viewthe rule p :- naf q as a statementoverview section, RIF requires that
pthe presentation syntax of any logic-based RIF dialect must be true if it is not possible to establish the trutha
specialization of q . Since it is, indeed, impossible to establishthe truthpresentation syntax of q , such theories would derive p even though it does not logically follow from p \/ q .RIF-FLD, i.e., every
well-formed formula in the logic underlying rule-based systemspresentation syntax of a RIF dialect
must be well-formed also assumes that onlyin RIF-FLD. The minimal Herbrand models are intended (minimality heregoal of the XML
serialization framework is with respectto provide a similar yardstick for the
RIF XML syntax. This amounts to the setrequirement that any valid XML
document for a logic-based RIF dialect must also be a valid XML
document for RIF-FLD. In this way, RIF-FLD provides a framework for
extensibility and mutual compatibility between XML syntaxes of true facts). Furthermore, although our example has two minimal Herbrand models -- one where pRIF
dialects.
This section is |
The XML serialization for RIF-BLD is false,alternating or fully
striped [ANF01]. A fully striped serialization views XML documents as
objects and divides all XML tags into class descriptors, called
type tags, and property descriptors, called role
tags. We use capitalized names for type tags and lowercase
names for role tags. The other where p is false, but q is true, onlyRIF serialization framework uses the
first modelfollowing XML tags.
- Group (nested collection of formulas annotated with metadata) - meta (meta role, containing metadata, which isconsideredtobeintended.Theaboveconceptrepresented as a Frame) - Forall (quantified formula for 'Forall', containing declare and formula roles) - Exists (quantified formula for 'Exists', containing declare and formula roles) - declare (declare role, containing a Var) - formula (formula role, containing a FORMULA) - Implies (implication, containing if and then roles) - if (antecedent role, containing FORMULA) - then (consequent role, containing FORMULA) - And (conjunction) - Or (disjunction) - Neg (strong negation, containing a formula role) - Naf (negation as failure, containing a formula role) - Atom (atom formula, positional or with named arguments) - External (external call, containing a content role) - content (content role, containing an Atom, for predicates, or Expr, for functions) - Member (member formula) - Subclass (subclass formula) - Frame (Frame formula) - object (Member/Frame role containing a TERM or an object description) - op (Atom/Expr role for predicates/functions as operations) - arg (argument role) - upper (Member/Subclass upper class role) - lower (Member/Subclass lower instance/class role) - slot (Atom/Expr/Frame slot role, containing a Prop) - Prop (Property, prefix version of slot infix '->') - key (Prop key role, containing a Const) - val (Prop val role, containing a TERM) - Equal (prefix version ofintendedmodelsterm equation '=') - Expr (expression formula, positional or with named arguments) - side (Equal left-hand side andthecorrespondingnotionright-hand side role) - Const (individual, function, or predicate symbol, with optional 'type' attribute) - Name (name oflogicalentailmentnamed argument) - Var (logic variable)
Example 3 (Serialization of a nested RIF-FLD group
annotated with respect tometadata).
This example shows an XML serialization for the intended models, defined below, is due to [ Shoham87 ]. 3.7 Logical Entailment We will now define what it meansformulas in
Example 2. For a setconvenience of RIFreference, the original formulas to entail a RIF formula.are
included at the top. For better readability, we assume that each ruleset has an associated set of intended semantic structures. Let R be a set of RIF formulas and φ a closed RIF formula.again use the
compact URI syntax.
Compact URI prefixes: dc expands into http://dublincore.org/documents/dces/ ex expands into http://example.org/ontology# hamlet expands into http://www.shakespeare-literature.com/Hamlet/
Presentation syntax: Group "hamlet:assertions"^^rif:iri["dc:title"^^rif:iri->"Hamlet"^^xsd:string, "dc:creator"^^rif:iri->"Shakespeare"^^xsd:string] ( Exists ?X (And(?X # "ex:RottenThing"^^rif:iri "ex:part-of"^^rif:iri(?X "http://www.denmark.dk"^^rif:iri))) Forall ?X (Or("hamlet:to-be"^^rif:iri(?X) Naf "hamlet:to-be"^^rif:iri(?X))) Forall ?X (And(Exists ?B (And("ex:has"^^rif:iri(?X ?B) ?B#"ex:business"^^rif:iri)) Exists ?D (And("ex:has"^^rif:iri(?X ?D) ?D#"ex:desire"^^rif:iri))) :- ?X#"ex:man"^^rif:iri) Group "hamlet:facts"^^rif:iri[ ] ( "hamlet:Yorick"^^rif:iri#"ex:poor"^^rif:iri "hamlet:Hamlet"^^rif:iri#"ex:prince"^^rif:iri ) ) XML serialization: <Group> <meta> <Frame> <object> <Const type="rif:iri">hamlet:assertions</Const> </object> <slot> <Prop> <key><Const type="rif:iri">dc:title</Const></key> <val><Const type="xsd:string">Hamlet</Const></val> </Prop> </slot> <slot> <Prop> <key><Const type="rif:iri">dc:creator</Const></key> <val><Const type="xsd:string">Shakespeare</Const></val> </Prop> </slot> </Frame> </meta> <formula> <Exists> <declare><Var>X</Var></declare> <formula> <And> <formula> <Member> <lower><Var>X</Var></lower> <upper><Const type="rif:iri">ex:RottenThing</Const></upper> </Member> </formula> <formula> <Atom> <op><Const type="rif:iri">ex:part-of</Const></op> <arg><Var>X</Var></arg> <arg><Const type="rif:iri">http://www.denmark.dk</Const></arg> </Atom> </formula> </And> </formula> </Exists> </formula> <formula> <Forall> <declare><Var>X</Var></declare> <formula> <Or> <formula> <Atom> <op><Const type="rif:iri">hamlet:to-be</Const></op> <arg><Var>X</Var></arg> </Atom> </formula> <formula> <Naf> <formula> <Atom> <op><Const type="rif:iri">hamlet:to-be</Const></op> <arg><Var>X</Var></arg> </Atom> </formula> </Naf> </formula> </Or> </formula> </Forall> </formula> <formula> <Forall> <declare><Var>X</Var></declare> <formula> <Implies> <if> <Member> <lower><Var>X</Var></lower> <upper><Const type="rif:iri">ex:man</Const></upper> </Member> </if> <then> <And> <formula> <Exists> <declare><Var>B</Var></declare> <And> <formula> <Atom> <op><Const type="rif:iri">ex:has</Const></op> <arg><Var>X</Var></arg> <arg><Var>B</Var></arg> </Atom> </formula> <formula> <Member> <lower><Var>B</Var></lower> <upper><Const type="rif:iri">ex:business</Const></upper> </Member> </formula> </And> </Exists> </formula> <formula> <Exists> <declare><Var>D</Var></declare> <And> <formula> <Atom> <op><Const type="rif:iri">ex:has</Const></op> <arg><Var>X</Var></arg> <arg><Var>D</Var></arg> </Atom> </formula> <formula> <Member> <lower><Var>D</Var></lower> <upper><Const type="rif:iri">ex:desire</Const></upper> </Member> </formula> </And> </Exists> </formula> </And> </then> </Implies> </formula> </Forall> </formula> <formula> <Group> <meta> <Frame> <object> <Const type="rif:iri">hamlet:facts</Const> </object> </Frame> </meta> <formula> <Member> <lower><Const type="rif:iri">hamlet:Yorick</Const></lower> <upper><Const type="rif:iri">ex:poor</Const></upper> </Member> </formula> <formula> <Member> <lower><Const type="rif:iri">hamlet:Hamlet</Const></lower> <upper><Const type="rif:iri">ex:prince</Const></upper> </Member> </formula> </Group> </formula> </Group>
We say that R entails φ, written as R |= φ, if and only ifnow serialize the syntax of Section EBNF Grammar for every intended semantic structure Ithe Presentation
Syntax of R and every ψ ∈ R , it isRIF-FLD by defining a mapping from the case that TVal I (ψ) ≤ TVal I (φ).presentation
syntax to XML.
This |