Weronika Furmańska ikaf@student.agh.edu.pl
Porównać i omówić metody reprezentowania atrybutów w językach:
oraz metody reprezentowania reguł w:
co to jest datalog…
(język reguł i zapytań dla dedukcyjnych baz danych, składnia podzbiorem Prologu. W przeciwieństwie do Prologu:
Ponadto w datalogu kolejność klauzul nie ma znaczenia dla wyniku zapytania.)
business rules orchestration
tools: http://sweetrules.projects.semwebcentral.org/
people http://www.mit.edu/~bgrosof/
concepts: http://en.wikipedia.org/wiki/Description_Logics
http://www.w3.org/2005/rules/wg/wiki/negation
http://www.w3.org/2005/rules/wiki/RIF_Working_Group
)
Draft…
While talking about attribute-based languages we can recognize the following types of logic:
Let there be the following, pairwise disjoint sets of symbols:
If the set of attributes is finite and given as
then
,
where Di is the domain of attribute Ai , i=1, 2, …,n.
Attributes in AAL and VAAL
An attribute Ai is a function (or partial function) of the form:
An attribute can be a partial function, since not all the attributes must be defined for all the objects.
Generalized attributes in SAL and VSAL
A generalized attribute Ai is a function (or partial function) of the form
„RDF is based on the idea that the things being described have properties which have values, and that resources can be described by making statements that specify those properties and values. RDF uses a particular terminology for talking about the various parts of statements.” (W3C RDF Primer) Attributes are represented in RDF in a form of RDF Triples (subject, predicate, object) where subject denotes the resource being described, predicate indicates the name of the attribute and object points to the attribute (predicate) value. RDF statements (triples) consist of subject, predicate and object which all are identified by URIs.
Part of an RDF triple | Can be |
---|---|
Subject | URI, blank node |
Predicate | URI |
Object | URI, literal (constant values, plain or typed), blank node |
RDF uses VSAL
http://www.w3.org/TR/rdf-concepts/#dfn-blank-node
Triples of the Data Model (an example from W3Schools.):
Subject | Predicate | Object |
---|---|---|
http://www.w3schools.com/RDF | http://www.recshop.fake/siteinfo#author | „Jan Egil Refsnes” |
http://www.w3schools.com/RDF | http://www.recshop.fake/siteinfo#homepage | „http://www.w3schools.com” |
To avoid using URI all around we use namespaces which we define as follows: xmlns:si=„http://www.recshop.fake/siteinfo#”
In RDF/XML attributes (properties of subjects) can be defined in three ways:
<?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" <!-- rdf namespace --> xmlns:si="http://www.recshop.fake/siteinfo#"><!-- other namespace (eg. Our own website's)> <rdf:Description rdf:about="http://www.w3schools.com/RDF"> <!-- subject identifed with a resource by rdf:about attribute --> <si:author>Jan Egil Refsnes</si:author> <!-- property and its value --> <si:homepage>http://www.w3schools.com</si:homepage> <!-- another property and its value --> </rdf:Description> </rdf:RDF>
When you parse the example above with a RDF Validator, the result will look something like this
Do powyższych podpunktów nie mogłam dołączyć kodu - otrzymuje błąd, że metoda POST jest niezaimplementowana prawdopodobnie sekcja tekstu jest za długa. — Weronika Furmańska 2008/05/21 22:35
ERDF extends RDF graphs with weak and strong negation, as well as derivation rules. The main concepts of the ERDF are based on Partial Logic.
Partial Logic allows to distinguish between properties and classes that are completely represented in a knowledge base and those that are not. It is to the owner of the database to classify whether for a given property there is a complete information or not. On completely represented properties (which are by design treated as partial ones) the close-world assumption can be applied and the entailment of allows to derive . However, we can declare a property to be total. If we do so, the property can be both true or false under some interpretation and the rule „ derives ” is not applicable. There has to be an explicit negative information about a total property to infer negated statements about it.
ERDF let us define if a property or a class as total (or partial by default) and therefore support both close-world and open-world reasoning.
ERDF extends RDF and RDFSchema in a couple of ways.
<ex:likes erdf:negationMode="Sneg" rdf:resource="#Pork"/>
Part of an ERDF triple | can be |
---|---|
Subject | URI or literal (plain or typed) or a variable |
Predicate | URI |
Object | URI or literal (plain or typed) or a variable |
ERDF/XML syntax folllows the RDF/XML one and extends it in a suitable way.
RDFS is extended with the terms erdf:TotalClass and erdf:TotalProperty. We can define a property p or a class c to be total using
rdf:type(p,erdf:TotalProperty)
and
rdf:type(c,erdf:TotalClass)
statements.
Example of a regular (partial by design) property:
<rdf:Property rdf:about="#likes"> <rdfs:domain rdf:resource="#Person"/> </rdf:Property>
Example of a total property:
<erdf:TotalProperty rdf:about="#authorOf"> <rdfs:domain rdf:resource="#Person/"> <rdfs:range rdf:resource="#Book"/> </erdf:TotalProperty>
ERDF triples (and sets of ERDF triples sharing the same subject term) are encoded by means of the erdf:Description element, which has a non-empty list of (possibly negated) property-value slots about the subject term. The following rules apply:
<erdf:Description erdf:about="#Gerd"> ... </erdf:Description>
<erdf:Description> <erdf:About rdf:datatype="&xsd;string">Grigoris</erdf:About> ... </erdf:Description>
<ex:denotationOf f:resource="#Grigoris"/>
OWL Web Ontologoy Language - a language for defining and instantiating Web ontologies. Ontology is a term borrowed from philosophy that refers to the science of describing the kinds of entities in the world and how they are related. An OWL ontology may include descriptions of classes, properties and their instances. Given such an ontology, the OWL formal semantics specifies how to derive its logical consequences, i.e. facts not literally present in the ontology, but entailed by the semantics. These entailments may be based on a single document or multiple distributed documents that have been combined using defined OWL mechanisms. (from OWL Guide)
OWL provides three increasingly expressive sublanguages designed for use by specific communities of implementers and users.
Each of these sublanguages is an extension of its simpler predecessor, both in what can be legally expressed and in what can be validly concluded.
Ontologies consist of taxonomies which describe hierarchy and relations between classes and of inference rules to operate on these classes. In this section I will concentrate on the first part.
Using OWL one can represent attributes of classes and individuals.
Czy relacje typu: subclassOf, subpropertyOf to tez atrybuty, czy atrybutami są tylko „pola klasy”?
Describing OWL ontologies one can use rdf
, rdfs
and owl
vocabulary.
Sample (and incomplete) definition of a class
<owl:Class rdf:ID="Wine"> <rdfs:subClassOf rdf:resource="&food;PotableLiquid"/> <rdfs:label xml:lang="en">wine</rdfs:label> <rdfs:label xml:lang="fr">vin</rdfs:label> ... </owl:Class> <owl:Class rdf:ID="Pasta"> <rdfs:subClassOf rdf:resource="#EdibleThing" /> ... </owl:Class>
Sample description of an individual
<owl:Thing rdf:ID="CentralCoastRegion" /> <owl:Thing rdf:about="#CentralCoastRegion"> <rdf:type rdf:resource="#Region"/> </owl:Thing>
rdf:type is an RDF property that ties an individual to a class of which it is a member.
Properties let us assert general facts about the members of classes and specific facts about individuals. A property is a binary relation.
There are two types of properties in OWL:
Defining property restrictions:
<owl:ObjectProperty rdf:ID="madeFromGrape"> <rdfs:domain rdf:resource="#Wine"/> <rdfs:range rdf:resource="#WineGrape"/> </owl:ObjectProperty>
(In OWL, a sequence of elements without an explicit operator represents an implicit conjunction. The property madeFromGrape has a domain of Wine and a range of WineGrape. That is, it relates instances of the class Wine to instances of the class WineGrape. Multiple domains mean that the domain of the property is the intersection of the identified classes (and similarly for range).)
rdfs:subPropertyOf
<owl:ObjectProperty rdf:ID="hasWineDescriptor"> <rdfs:domain rdf:resource="#Wine" /> <rdfs:range rdf:resource="#WineDescriptor" /> </owl:ObjectProperty> <owl:ObjectProperty rdf:ID="hasColor"> <rdfs:subPropertyOf rdf:resource="#hasWineDescriptor" /> <rdfs:range rdf:resource="#WineColor" /> ... </owl:ObjectProperty>
See: Property characteristics for details.
owl:allValuesFrom
, owl:someValuesFrom
, owl:cardinality
, owl:hasValue
Using attributes equivalentClass
, equivalentProperty
, sameAs
one can define equivalence of classes, properties and individuals.
http://w3schools.com/rdf/default.asp
http://www.w3.org/TR/rdf-primer
http://www.ninebynine.org/RDFNotes/RDFFactsAndRules.html#xtocid-7
A.Ligęza - Logical Foundations for Rule-Based Systems
http://oxygen.informatik.tu-cottbus.de/IT/Research/ERDF-JAIR-2008.pdf
http://www.w3.org/TR/2004/REC-owl-guide-20040210/
http://www.w3.org/TR/2004/REC-owl-features-20040210/