Semantically Processing The Semantic Web Presented by: Kunal Patel Dr. Gopal Gupta UNIVERSITY OF...
-
Upload
dominick-cobb -
Category
Documents
-
view
216 -
download
1
Transcript of Semantically Processing The Semantic Web Presented by: Kunal Patel Dr. Gopal Gupta UNIVERSITY OF...
Semantically Processing The Semantic Web
Presented by:
Kunal Patel
Dr. Gopal Gupta
UNIVERSITY OF TEXAS AT DALLAS
Agenda
• Introduction• Problem & Solution• Proposed Framework
• Denotational Semantics• Horn Logic
• Application of Framework• Current Status • Conclusion
Introduction
• With the advent of Semantic Web, web communities have started publishing their formal data
• Different description formats are being used for representation of this data– Example: RDF, RDF Schema, DAML+OIL, etc.
• Various query languages have also been developed to query this data– Example: RDQL, RQL, SQUISH, etc.
Problem
DAML
RDF
RDFS
• Different Design Methodologies
• Different Design Goals
Difficult to Integrate DataDifficult to Query Data
Difficult to Infer New Data
•
No single query language that can handle the multiple semantics represented by these heterogeneous data models
Solution
Executable Notations
DAML
RDQL RQL
RDFS
SQUISH
RDFTranslate Description Formats and Query Languages into Executable Notations
Making a language executable means mapping the language into a notation whose semantics is mathematical
Information that is implied can then be inferred automatically from this mathematical semantics
RAPID
Main Requirement
•
•
Proposed Framework
A framework based on Denotational Semantics & Horn Logic
L1 L2
Translate
Denotational Semantics of L1 Language Constructs of L2
terms of
All components of this semantics are coded in Horn Logic rendering it executable
•
•
Denotational Semantics
• A well established methodology for design, description and analysis of programming languages
• The denotational semantics of language L has three components:
• Syntax Specification: Map sentences of Language L into syntax trees
• Semantic Algebra: Represents the Mathematical objects and associated operations
• Valuation Functions: Functions to map syntax tree to elements of semantic algebra
Horn Logical Semantics
Traditional Denotational Definitions:
Syntax BNF Grammars
Semantic Algebra
Valuation FunctionsLambda Calculus
Horn Logical Semantics:
Syntax
Semantic Algebra
Valuation Functions
Horn Logic
•
•
Advantage of using Horn Logical Semantics
• Parser can be easily obtained:
BNF specification of language L
Definite Clause Grammar
PARSER Prolog System
Semantic Algebra and Valuation Functions can also be coded in Horn Logic
•
Semantics-based Language Translation
Valuation Functions
DCG for Ls DCG for Lt
Language Ls Language Lt
Parse Trees
Application to the web
• Current Web:– Translate one XML to another
– Convert HTML to voiceXML
• Semantic Web:– RDF, RDFS, DAML+OIL and other query languages
like RDQL, RQL, etc. can be rapidly translated into executable notations
• This paper mainly focuses on RDF and RDQL
Denotational Semantics of RDF
The statements of the RDF data model (triples) can be thought of as the equivalent of ground facts in a logic based language
RDF Statements property(S, P, O)
S has property P with value O
DCG for RDF Semantic Specification
•
DCG for RDF(Syntax Specification)
Automatically yields a parser
DCG rules for RDF can easily be obtained from the BNF specification of the RDF grammar
propAttr ::= propName ‘=“’ string ‘”’
propAttr(propAttr(PN,S)) propname(PN),[‘=“’],string(S),[‘”’].
BNF rule:
DCG rule:
•
•
Example OutputRDF STATEMENT:
<rdf:RDF><rdf:Description about="http://www.w3.org">
<s:Publisher>World Wide Web Consortium</s:Publisher><s:Title>W3C Home Page</s:Title>
</rdf:Description></rdf:RDF>
PARSE TREE:
r(o (description(idaboutattr(aboutattr(uriref(string(“http://www.w3.org”)))),(propertyel(propname(qname(nsprefix(s), name(publisher))), value(string(“World Wide Web Consortium”)),
propname(qname(nsprefix(s), name(publisher)))),
propertyelt(propname(qname(nsprefix(s), name(title))), value(string(“W3C Home Page”)), propname(qname(nsprefix(s), name(publisher)))),
) ) ) ) )
Semantic Specification for RDF
The semantic function maps the parse tree to a database of ground facts (property relations)
Property(S,P,O)
Property(S,P,O)
… … … … …
… … … … …
The output parse tree is semantically processed to identify the subject, predicate and object which in turn are used to generate the ground facts
propertyelts((PE,PEs),PSTR,VSTR,IASTR) :- propertyelt(PE,IASTR,PSTR,VSTR), assemble(IASTR,PSTR,VSTR),
propertyelts(PEs,PSTR1,VSTR1,IASTR).
•
•
Example OutputPARSE TREE:
r(o (description(idaboutattr(aboutattr(uriref(string(“http://www.w3.org”)))),(propertyelt(propname(qname(nsprefix(s), name(publisher))), value(string(“World Wide Web Consortium”)),
propname(qname(nsprefix(s), name(publisher)))),
propertyelt(propname(qname(nsprefix(s), name(title))), value(string(“W3C Home Page”)), propname(qname(nsprefix(s), name(publisher)))),
) ) ) ) )
DENOTATION:
property(“http://www/w3.org”, publisher, “World Wide Web Consortium”).property(“http://www/w3.org”, title, “W3C Home Page”).
Syntax and Semantic specification of RDQL
• SQL like query language for RDF developed by HP labs
• Query of the formSELECT varsFROM documentsWHERE expressionsAND filtersUSING Namespace declarations
• Syntax and semantics can be specified in the same way as that of RDF
Example Output
RDQL Query: SELECT ?a ?bWHERE(?a, pred, ?b)AND ?b > 250
Denotation: :-property(X, pred, Y), Y > 250.•
•
r(query(slctclause(scvar(ridentifier(x)), commascvar(scvar(ridentifier(y)))), trptnclause(trpattern(varOruri(var(ridentifier(x))), varOruri(uri(uri2)), varOrliteral(var(ridentifier(y))))), constraintclause(expr(condOrexpr(condXorexpr(condAndexpr(valuelogical(streqexpr(numlogical(inclOrexpr(exclOrexpr(andexpr(aritcond(eqexpr(ltrelationalexpr(numericexpr(shiftexpr(addexpr(multexpr(unaryexpr(unaryexprntplmi(primaryexpr(var(ridentifier(y))))))))), numericexpr(shiftexpr(addexpr(multexpr(unaryexpr(unaryexprntplmi(primaryexpr(literal(numliteral(2)))))))))))))))))))))))))
Parse Tree:•
Querying the Data
property(S,P,O)property(S,P,O)
… … … …
RDF DATA RDQL QUERIES
property(S,P,O)property(S,P,O)
… … … …
RESULTS
PROLOG
Current Status
• Developed a complete Horn Logic denotational executable semantics for RDF
• This took less than 2 weeks of work
• Tested the semantics on almost all the test cases present in RDF Test Cases working draft
• Change in syntax and semantics can be made with negligible effort
• Developed the syntax specification part of RDQL
• Working on the semantics specification part of RDQL
Current Status
Conclusion• This approach of querying RDF documents illustrates
the power of logic• Not only is the executable notation based on logic, but
the means of semantically translating RDF and Query Languages into logic also relies on logic
• The main advantage of this is that semantic translators can be rapidly developed
• As a result as the markup languages rapidly evolve as they have from HTML to XML to RDF and DAML, they can be processed and queried with the same rapidity