Title: Lisp and the Semantic Web: It aint all hype.
1Lisp and the Semantic WebIt aint all hype.
- Yarden Katz
- University of Maryland
- College Park
2A Hype-Free Approach
- Legitimate frustration with XML and its vision
- ..Especially in Lisp community
- Present The Semantic Web differently not as a
new phenomenon, but as an application of existing
research (in the AI and KR worlds) to the Web
that leads to new possibilities.
3What is the Semantic Web?
- "The Semantic Web is an extension of the current
web in which information is given well-defined
meaning, better enabling computers and people to
work in cooperation." (W3C) - An attempt to represent and intelligently link
data on the web using ontologies. - A Lisper's Definition The Semantic Web is an
attempt to apply AI to the web.
4What can the Semantic Web do?
- "My agent will talk to your agent" replacing
mundane human tasks with automated agents.
Example scheduling an appointment at the
doctor's office (more on this later.) - Search engines on crack better, more precise
searches, better languages support,
5How does it work? Ontologies and W3C Standards
- Resource Description Framework (RDF) make
statements about "resources" (anything that has a
URI) - RDF Schema (RDFS) Class hierarchy for RDF (Not
important for today) - OWL (Web Ontology Language) for writing
ontologies definitions of concepts that we
refer to when marking up our data. - OWL-S (DAML-S, for now) Web Services in OWL
6Making statements in RDF
- Statement John Steinbeck is the author of "The
Grapes of Wrath", which is identified by
http//www.grapes-of-wrath.com and was published
in November 1939.
7RDF/XML Serialization
- ltrdfRDF xmlnsrdf"http//www.w3.org/1999/02/22-r
df-syntax-ns" xmlnsdchttp//purl.org/d
c/elements/1.1/ - ltrdfDescription rdfabout"http//www.grapes-of
-wrath.com"gt - ltdctitlegtThe Grapes of Wrathlt/dctitlegt
- ltdccreatorgtJohn Steinbecklt/dccreatorgt
- ltdcdategtNovember 1939lt/dcdategt
- lt/rdfDescriptiongt
- lt/rdfRDFgt
8Making Models with OWL - 1
- A basic class
- ltowlClass rdfID"Wine"gt
- ltrdfssubClassOf rdfresource"foodPotableLiqui
d"/gt - ltrdfslabel xmllang"en"gtwinelt/rdfslabelgt
- ltrdfslabel xmllang"fr"gtvinlt/rdfslabelgt
- lt/owlClassgt
9Making Models with OWL - 2
- Class restrictions
- ltowlClass rdfID"Wine"gt
- ltrdfssubClassOf rdfresource"foodPotableLiquid
"/gt - ltrdfssubClassOfgt
- ltowlRestrictiongt
- ltowlonProperty rdfresource"madeFro
mGrape"/gt - ltowlminCardinalitygt1lt/owlminCardinalitygt
- lt/owlRestrictiongt
- lt/rdfssubClassOfgt
- lt/owlClassgt
- ..examples from McGuiness et al., OWL Guide
10The Semantic Layer Cake
- Tim Berners-Lees Visualization
11This stuff has some basis!
- OWL is a Description Logic.
- OWL Lite
- OWL DL
- and OWL Full, which is not a DL (more on this
later.) - OWL has a formalized foundation
12We have DLs, thus we have reasoning
- Ian Horrocks Example
- Smoking causes Cancer Cancer causes death
- inference Smoking causes death.
- Reasoning in calendars Ability to make specific
queries "Find all of Joe's afternoon flights in
the next three days", etc.
13Going back to the hype..
- A seemingly-hyped up example of Semantic Web
Application The Scienific American article
scenario by Tim Berners-Lee, James Hendler and
Ora Lassila. - Scenario follows..
14The SciAm Scenario
- Lucy and Pete must equally partition the task of
chauffeuring their ill mother to several doctor's
appointments. - Lucy's personal Semantic Web agent, built into
her PDA, will communicate with Pete's to find a
solution. - Using the siblings' respective schedule, the
agents together will not only divide the task
between the two (keeping in mind the docs
schedule), but also locate all relevant services
needed to execute it (more on this later.) - WWW03 Panel said No way
15What information do we need?
- The siblings' schedule, in marked up form.
- The doctor's schedule, with her available
appointment times - Service discovery the pharmacy's service for
ordering the drugs, the medical insurance's
service for locating a doctor that is covered
under insurance plan, etc.
16What processing capabilities are needed?
- Ability to interpret web services descriptions
- The ability to determine best meeting times for
three parties (doctor, Pete and Lucy) as well as
divide the task equally - Ability to invoke web services
17This sounds a lot like an AI planning problem..
- It is!
- Use SHOP (Simple Hierarchical Ordered Planner), a
Lisp planner (operates in Ordered Task
Decomposition) to convert the DAML-S descriptions
to problem descriptions. - Planner returns a set of web services to execute,
in order, which are called by a Java web service
interface. - Problem solved.
18A SHOP Problem Description
(defdomain PrescribedTreatmentSchedule
((method (ns_TreatmentProcess) ((SHOPTotal
?SHOPTotal) (assign ?SHOPTotal_1 (
?SHOPTotal 1)) (assign ?SHOPTotal_2 (
?SHOPTotal 2)) (assign ?SHOPTotal_3 (
?SHOPTotal 3))) ((!!UpdateInstance 3)
(!!ns_getPrescription ?SHOPTotal_1)
(!!ns_getTreatments ?SHOPTotal_2)
(TreatmentProcess_ns_FillPrescription
?Prescription ?SHOPTotal_1)
(!!ns_GetDrivers ?SHOPTotal_3)
(TreatmentProcess_ns_TwoTreatmentTwoDriverSchedule
?Treatment1 ?SHOPTotal_2 ?Treatment2
?SHOPTotal_2 ?DriverList1 ?SHOPTotal_3)
(TreatmentProcess_FollowUpDoctor ?TreatmentD1
?SHOPTotal_2 ?TreatmentD2 ?SHOPTotal_2
?DriverListD ?SHOPTotal_3)))
19SHOPs Final Plan
(((!NS_ORDERPRESCRIPTIONCVS PRESCRIPTION1)
(!MAKEAPPOINTMENTEMG1 APPOINTMENT78)
(!UPDATESCHEDULELUCY APPOINTMENT78)
(!MAKEAPPOINTMENTH1 APPOINTMENT182)
(!UPDATESCHEDULELUCY APPOINTMENT182)
(!MAKEAPPOINTMENTD APPOINTMENT203)
(!UPDATESCHEDULEPETE APPOINTMENT203)))
20Another Semantic Web Application
- Carnegie Mellon Universitys myCampus
- Uses rules (in Jess expert system)
- Example I am a professor. If a student is trying
to reach me, only return my status, i.e. if I am
on or off campus. If faculty member is looking
for me, return my location on campus. If the
president of the university is looking for me,
return the building I'm in, the room number,
coordinates of where I am standing, and telephone
number of the room.
21The Semantic Web really is AI
- The above solutions are a result of well-founded,
academic research into the areas of Knowledge
Representation (KR) and Description Logics (DL). - Semantic Web utilizes years of DL and KR research
rather than throwing it away academia is put
into practice.
22Problems in Paradise
- OWL Full v. OWL DL
- Web Explanations? What is implied and what's
explicit? - Can anybody say anything on anything?
- What sources do you trust? CYC ontology example.
- Databases are private, but markup cant be for
the Semantic Web to work
23The Lisp Developer's point of view
- To handle Semantic data programmatically, we must
be able to - Retrieve access all elements of RDF. Wilbur, an
RDF toolkit, handles this part. - Reason make inferences about ontologies.
OWLLisaKB is our solution. - All of the above software is written in Lisp.
24Wilbur RDF Toolkit
- Includes RDF parser, DAML parser, and now an
add-on OWL parser. - Node-centric uses Ivanoe, a frame-based path
language to query RDF. - Example find all labels of subClassOf relations
in a graph starting from startNode. - (all-values !startNode '(rep !rdfssubClassOf))
25MINDSWAPs Lisp Development
- OWLLisaKB
- LISA a forward-chaning rule system, able to
reason with arbitrary CLOS objects - Wilbur encodes triples from RDF graphs as CLOS
objects. - OWLLisaKB a combination of the two to create a
rule-based OWL reasoner.
26OWLLisaKB How it works
27OWLLisaKB A Simple Rule
(defrule subclass-instances () (triple
(subject ?C) (predicate "http//www.w3.org/2000
/01/rdf-schemasubClassOf") (object ?P))
(triple (subject ?I) (predicate
"http//www.w3.org/1999/02/22-rdf-syntax-nstype")
(object ?C)) (not (triple (subject
?I) (predicate "http//www.w3.org/1999/02/22-r
df-syntax-nstype") (object ?P))) gt
(assert ?I "http//www.w3.org/1999/02/22-rdf-sy
ntax-nstype" ?P))
28MINDSWAP Search Page
- A pure Lisp SW application
- Uses OWLLisaKB to reason about over entire
owl.mindswap.org database in approx. two-minutes
(ask me about a demo later!) - Interfaces the results to the browser via
AllegroServe (Go Franz!) - Ability to cross boundaries of ABox and TBox in
searches (instances and taxonomies)
29MINDSWAP Search Page
30Conclusion
Lisp may never become more popular than Java/Perl
for currently common web tasks (CGIs, servlets,
etc.) ..But it has a significant advantage over
those languages in areas that are becoming common
on the (Semantic) Web, such as reasoning and
planning. Lisp could benefit from contributing
to the basis of the Semantic Web, and we could
benefit from you. LEARN MORE http//owl.mindswap
.org
31Questions?
Credits The work presented here has been
the result of close collaboration with MINDSWAP,
namely Bijan Parsia and Jim Hendler.