Allegro Graph

Document Sample
Allegro Graph Powered By Docstoc
					                     Allegro Graph:
                    RDF Triple Database

Franz, Inc.
Jans Aasman
(ja at franz.com)
               Contents


          Why a triple database
          RDF: serialize semantic networks
          RDFS + OWL: constraints and reasoning
          Where RDF(S) and OWL are used
          The basics of the allegrograph triple store
          Prolog with the triple store
          Demo’s


July 06                   Phone: 510-452-2000           2
          Franz & Semantic Web




                                           RacerPro




                                        AllegroGraph



July 06           Phone: 510-452-2000           3
                  Summary of Racer


          A knowledge representation system that implements a highly
          optimized tableau calculus for a very expressive description logic.
          Reasoning services for multiple TBoxes and for multiple ABoxes
          as well.
          The system implements the description logic ALCQHIR+ also
          known as SHIQ. This is the basic logic ALC augmented with
          qualifying number restrictions, role hierarchies, inverse roles, and
          transitive roles. In addition to these basic features, Racer also
          provides facilities for algebraic reasoning including concrete
          domains for dealing with:
             min/max restrictions over the integers,
             linear polynomial (in-)equations over the reals or cardinals with order
             relations,
             nonlinear multivariate polynomial (in-)equations over complex
             numbers,
             equalities and inequalities of strings.
          The perfect tool for OWL and RDFS reasoning
July 06                         Phone: 510-452-2000                          4
          Franz & Semantic Web




                                           RacerPro




                                        AllegroGraph



July 06           Phone: 510-452-2000           5
                RDF: Resource Description Framework

          W3C’s knowledge representation standard for the
          semantic web.
          Semantic web is basically the Web 3.0
            Meta data for content (webpages, multimedia contents,
            versioning) allows machines to help people search
            information and organize their lives.
          Quickly became standard for meta data in general

          Nothing more than a way to serialize old-fashioned
          semantic networks.


July 06                   Phone: 510-452-2000                6
                      A typical semantic network from the late sixties.

                                 class                    property

                                        type                   type

              2                                                            domain
                                Animal                     owns                       Human

                         eyes           subclassoOf            subProperty
          4
                                                 range
                  Legs          Mammal                     hasPet
                                                                                               type
                  subclassOf                                   inverseOf
     Dog
                                 type
                                                           petOf                     sameAs



                                         petOf                                      sameAs
                  Robbie                                     Jans                             MrAasman

                                                             petOf
                                                             owns


July 06                                          Phone: 510-452-2000                                     7
                The same network serialized into
                <subject, predicate, object> triples


          Animal type class
          Mammal subclassOf Animal
          Mammal eyes 2
          Mammal legs 4
          Dog subclassOf Mammal
          owns type Property
          owns domain Human
          hasPet subproperty owns
          hasPet range Mammal
          hasPet inverseOf petOf
          Robbie petOf Jans
          MrAasman sameAs Jans


July 06                    Phone: 510-452-2000         8
               RDF


          From graph to triple: subject, predicate, object
            Resource (= uri),
            Literals (= string) possibly with language and
            datatype specifier
            or blank nodes

          ntriples format: easy to read and parse

          RDFXML: to get acceptance

July 06                  Phone: 510-452-2000            9
              ntriples format

   <http://www.cyc.com/2002/04/08/cyc#AlQaida>
      <http://www.cyc.com/2002/04/08/cyc#operatesInRegion>
      <http://www.cyc.com/2002/04/08/cyc#Palestine-Modern> .
   <http://www.cyc.com/2002/04/08/cyc#AlQaida>
      <http://www.cyc.com/2002/04/08/cyc#operatesInRegion>
      <http://www.cyc.com/2002/04/08/cyc#CityOfHamburgGermany> .
   <http://www.cyc.com/2002/04/08/cyc#AlQaida>
      <http://www.cyc.com/2002/04/08/cyc#operatesInRegion>
      <http://www.cyc.com/2002/04/08/cyc#Lebanon> .
   <http://www.cyc.com/2002/04/08/cyc#AlQaida>
      <http://www.cyc.com/2002/04/08/cyc#operatesInRegion>
      <http://www.cyc.com/2002/04/08/cyc#Afghanistan> .
   <http://www.cyc.com/2002/04/08/cyc#AlQaida>
      <http://www.cyc.com/2002/04/08/cyc#organizationHead>
      <http://www.cyc.com/2002/04/08/cyc#OsamaBinLaden> .
   <http://www.cyc.com/2002/04/08/cyc#AlQaida>
      <http://www.cyc.com/2002/04/08/cyc#physicalQuarters>
      <http://www.cyc.com/2002/04/08/cyc#McNimrStreetOffice> .
   <http://www.cyc.com/2002/04/08/cyc#AlQaida>
      <http://www.cyc.com/2002/04/08/cyc#presentInRegion>
      <http://www.cyc.com/2002/04/08/cyc#UnitedStatesOfAmerica> .


July 06                   Phone: 510-452-2000                10
July 06   Phone: 510-452-2000   11
               RDFS


          RDF was not constrained enough. Everything
          is allowed
            Mammal type class
            Dog subclass of Mammal
            Mammal subclass of Dog
          In order to allow for systematic reasoning RDF
          got semantics (schema)



July 06                 Phone: 510-452-2000        12
                RDFS


          Core classes
             rdfs:resource, rdfs:class, rdfs:literal,
             rdfs: property, rdf:statement
          Defining relationships
             rdf:type, rdfs:subClassOf, rdfs:subPropertyOf
          Core restrictions
             rdfs:domain
             rdfs:range



July 06                       Phone: 510-452-2000       13
               OWL


          The marriage between
            Object oriented type system
            Well understood Description logic
          Typical reasoning
            Class membership
            Equivalence of classes
            Consistency
            Classification

July 06                 Phone: 510-452-2000     14
               Owl language


          Object properties and data type properties
          Things can be subclass of ‘restriction’
            On-property
            someValuesFrom (existential quantification),
            allValuesFrom (universal quantification),
            hasValue
            Cardinality (minCardinality, maxCardinality)



July 06                  Phone: 510-452-2000           15
                Special properties


          owl:inverseOf
            hasA inverseOf ownedBy
          owl:TransitiveProperty
            greaterThan type TransitiveProperty
          owl:SymmetricProperty
            siblingOf type SymmetricProperty
          owl:FunctionalProperty
            only one value allowed: ex: age.
          owl:InverseFunctionalProperty
            two different objects cannot have same value


July 06                    Phone: 510-452-2000             16
                Our example again

                                         (query (MrAasman owns ?x)
          Animal type class                     (?x eyes 2))
          Mammal subclassOf Animal
          Mammal eyes 2
          Mammal legs 4
          Dog subclassOf Mammal
          owns type Property
          owns domain Human
          hasPet subproperty owns
          hasPet range Mammal
          hasPet inverseOf petOf
          Robbie petOf Jans
          MrAasman sameAs Jans


July 06                    Phone: 510-452-2000                 17
                         Example of RDFS (                            and a little bit of OWL   ) Reasoning
                                 class                    property

                                        type                   type

              2                                                            domain
                                Animal                     owns                           Human

                         eyes           subclassoOf            subProperty
          4
                                                 range
                  Legs          Mammal                     hasPet
                                                                                                    type
                  subclassOf                                   inverseOf
     Dog
                                 type
                                                           petOf                        sameAs



                                         petOf                                        sameAs
                  Robbie                                     Jans                                  MrAasman

                                                             petOf
                                                             owns


July 06                                          Phone: 510-452-2000                                          18
               Where is RDF/S OWL used


          Software configuration
          Telecom
          Enterprise modeling
          Life Sciences
          (Military) Intelligence Agencies
          Government for standardization
          Unifying databases
          Meta data for Multimedia

July 06                 Phone: 510-452-2000   19
             Network
             Management &
             Intelligent Firewall

          Full ISP management solution based on W3C
          standards.
          Ontologies for networks, firewalls, intrusion
          detection systems, aaa-services, devices, etc..
          (tboxes in OWL)
          Individual users stored as OWL individuals
          (aboxes)
          20 million users, per user multiple devices
          Every user has personal profile with preferences
          for firewalls, spam filters, types of devices
          One painful complexity: dynamic aboxes…
          > 2,000,000,000 triples
July 06                 Phone: 510-452-2000             20
July 06   Phone: 510-452-2000   21
              Graph based data mining through
              Telecom call detail records

          Telecom data mining over
          VOIP CDRs
          Social network analysis
             A > B, B > C, C > D, D > A.
             A > B, B > C, C > D, X > Y, Y > D, relation A/Y?
          100,000,000 CDRs
          Each CDR generates ~ 7 triples
          > 1,000,000,000 for initial prototype



July 06                  Phone: 510-452-2000              22
               Intelligence Agencies


          Unify and aggregate data from separate
          databases
          Store transactions between people
          Store objects moving in time and space
          Use text mining to extract knowledge from text
          (documents, internet)
          Mostly used for Graph Search…
          10,000,000,000 triples lower bound

July 06                 Phone: 510-452-2000         23
July 06   Phone: 510-452-2000   24
                 Life Sciences focus on Ontologies


      Ontologies are important because

          Avoid confusion: people and machines are forced to describe
          knowledge or facts about a domain in a predetermined formal
          language
          So that people (and computers) can communicate and reason
          about them.
          So data and knowledge can be reused
             Biologist can now work on data from other biologists
          Contextual search can be done
             Enables meaningful search through gigantic seas of
             information.
          Ontologies can be extended & merged
             Ontologies defined by different groups can be formally unified


July 06                       Phone: 510-452-2000                    25
   NCOR




   national
 center for
ontological
  research
July 06   Phone: 510-452-2000   27
                                FMA: complete
                                ontology of human
                                anatomy.




July 06   Phone: 510-452-2000                28
July 06   Phone: 510-452-2000   29
July 06   Phone: 510-452-2000   30
               Media industry


          Uses meta data to link social network data
          with multimedia content.




July 06                 Phone: 510-452-2000            31
July 06   Phone: 510-452-2000   32
               Allegro Graph requirements for
               scalability

          Store billions of triples
          Microsecond retrieval times for most queries
          Read and write any RDF Format
          User friendly syntax and retrieval mechanism
          Focus on triples: make it the fastest enabling
          technology for reasoners




July 06                  Phone: 510-452-2000         33
                Allegro Graph Stack

          http/xml-rpc/soap/custom                   Custom Apps

                   Server                         FFI: java, c/++, .Net

               [SPARQL, RDFProlog, Lisp] query engine

                RDFS++ reasoning                  (RACERPRO)

             API: store(s,p,o), get([s],[p],[o]), read-file(uri)

             Graph Database: Dictionaries, Indices, Caches

                     ACL Btrees and AllegroCache
July 06                     Phone: 510-452-2000                       34
                Allegro Graph Stack


          http/xml-rpc/soap/custom                   Custom Apps

                   Server                         FFI: java, c/++, .Net

                  [Sparql, Prolog, Lisp] query engine

             API: store(s,p,o), get([s],[p],[o]), read-file(uri)

                         (Black Box)
             Graph Database: Dictionaries, Indices, Caches

                     ACL Btrees and AllegroCache


July 06                     Phone: 510-452-2000                       35
                Scalability tested on:


          Lehigh University Benchmark (Jeff Heflin)
          Movie and Actor database
          Reification is large part of database
            Students rate professors (in context of course)
            Professors rate students (in context of course)
            Students rate each other on inner beauty
            Students have dates, multiple times, various results
            Students rate movies and actors
            Students make phone calls (cdrs)


July 06                    Phone: 510-452-2000                 36
                             A small part of the class hierarchy of LUBM

                                    Employee                                               Person


                        Faculty                Administrative Staff
                                                                                         Student

               Professor            Lecturer          Clerical Staff
                                                                                UnderGraduate St

          Full Professor                                 Systems Staff
                                                                                                PostDoc
             Associative Prof

                 Assistant Prof                                                 Grad Student

                      Visiting Prof
                                                                                  restriction

                     Chair                       Director
                                                                         takesCourse        Grad Course
                      collection                  collection
                                                                             Research Assistant
                      restriction
                                                  restriction
                                                                            collection
                                                                                                restriction
            headof            Department
                                                       Organization
                                            worksfor                        worksfor
                                                                                                Research group
                                                                                                       37
July 06                                    Phone: 510-452-2000
                       A small part of the property descriptions
                       of LUBM

             Advisor
                                                        Person
           Affilated org
            Affilliateof                               Professor

               Age                                     University
            degreeFrom                                Organization
          DoctDegreeFrom
           emailAddress
                                                Domain
           hasAlumnus                           Range
                                                InverseOf
                                                SubpropertyOf
July 06                       Phone: 510-452-2000                    38
                Scalability tested on:


          Lehigh University Benchmark (Jeff Heflin)
          Movie and Actor database
          Reification is large part of database
            Students rate professors (in context of course)
            Professors rate students (in context of course)
            Students rate each other on inner beauty
            Students have dates, multiple times, various results
            Students rate movies and actors
            Students make phone calls (cdrs)


July 06                    Phone: 510-452-2000                 39
               Parsing RDF and storing



          AMD 64, 2Ghz, 4 processor, 16 Gig, $14,000
          Burst rate parsing RDF and storing triples:
            OpenCyc: 18 Megabytes of RDF
            14,000 triples per second (1 M in 100 seconds)
            6 indices
          Above 200 Million steady rate down to 10,000
          trip/sec for Bulk input. Using buffered inserts.
          Average overhead per triple = 200 bytes.

July 06                  Phone: 510-452-2000          40
                  Retrieving RDF triples


          Get-Triple (!o:person1, X, Y)
             Retrieving 10 triples instantiated in memory.
             Time per triple

          Btree-miss                       0.00003    sec**
          Btree-hit                        0.0000018 sec
          Query-cache                      0.00000029 sec

  ** the 10 triples will be probably in the same btree page,
  So multiply by ten for one isolated triple!
July 06                           Phone: 510-452-2000          41
               What makes Allegro Graph unique?


          Scalability and Retrieval Speed..
          Specialized Database for Graph Search and
          Graph Matching
          RDF Prolog as a very expressive query
          language
            SQL (or SPARQL) are sub optimal
            find semantic relations between nodes
            automatically
            Not a DL


July 06                 Phone: 510-452-2000         42
              RDF Prolog


          An Industrial strength Prolog embedded in
          ACL, completely geared to RDF
          Prolog clauses are compiled to machine code
          Conforms to Clocksin & Mellish Prolog and
          ISO kernel specification
          Competitive with commercial Prologs




July 06               Phone: 510-452-2000       43
                               The Kennedy family


<triple 1: "http://www.franz.com/simple#person1" "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" "http://www.franz.com/simple#person">
<triple 2: "http://www.franz.com/simple#person1" "http://www.franz.com/simple#first-name" "http://www.franz.com/simple#Joseph">
<triple 3: "http://www.franz.com/simple#person1" "http://www.franz.com/simple#middle-initial" "http://www.franz.com/simple#Patrick">
<triple 4: "http://www.franz.com/simple#person1" "http://www.franz.com/simple#last-name" "http://www.franz.com/simple#Kennedy">
<triple 5: "http://www.franz.com/simple#person1" "http://www.franz.com/simple#suffix" "http://www.franz.com/simple#none">
<triple 6: "http://www.franz.com/simple#person1" "http://www.franz.com/simple#alma-mater" "http://www.franz.com/simple#Harvard">
<triple 7: "http://www.franz.com/simple#person1" "http://www.franz.com/simple#birth-year" "http://www.franz.com/simple#1888">
<triple 8: "http://www.franz.com/simple#person1" "http://www.franz.com/simple#death-year" "http://www.franz.com/simple#1969">
<triple 9: "http://www.franz.com/simple#person1" "http://www.franz.com/simple#sex" "http://www.franz.com/simple#male">
<triple 10: "http://www.franz.com/simple#person1" "http://www.franz.com/simple#spouse" "http://www.franz.com/simple#person2">
<triple 27: "http://www.franz.com/simple#person1" "http://www.franz.com/simple#has-child" "http://www.franz.com/simple#person17">
<triple 25: "http://www.franz.com/simple#person1" "http://www.franz.com/simple#has-child" "http://www.franz.com/simple#person15">
<triple 23: "http://www.franz.com/simple#person1" "http://www.franz.com/simple#has-child" "http://www.franz.com/simple#person13">
<triple 21: "http://www.franz.com/simple#person1" "http://www.franz.com/simple#has-child" "http://www.franz.com/simple#person11">
<triple 19: "http://www.franz.com/simple#person1" "http://www.franz.com/simple#has-child" "http://www.franz.com/simple#person9">
<triple 17: "http://www.franz.com/simple#person1" "http://www.franz.com/simple#has-child" "http://www.franz.com/simple#person7">
<triple 15: "http://www.franz.com/simple#person1" "http://www.franz.com/simple#has-child" "http://www.franz.com/simple#person6">
<triple 13: "http://www.franz.com/simple#person1" "http://www.franz.com/simple#has-child" "http://www.franz.com/simple#person4">
<triple 11: "http://www.franz.com/simple#person1" "http://www.franz.com/simple#has-child" "http://www.franz.com/simple#person3">
<triple 31: "http://www.franz.com/simple#person1" "http://www.franz.com/simple#profession" "http://www.franz.com/simple#ambassador">
<triple 30: "http://www.franz.com/simple#person1" "http://www.franz.com/simple#profession" "http://www.franz.com/simple#producer">
<triple 29: "http://www.franz.com/simple#person1" "http://www.franz.com/simple#profession" "http://www.franz.com/simple#banker">




     July 06                                         Phone: 510-452-2000                                                  44
                      In shorthand notation


      <triple   32:   "person2"   "type" "person">
      <triple   33:   "person2"   "first-name" "Rose">
      <triple   34:   "person2"   "middle-initial" "Elizabeth">
      <triple   35:   "person2"   "last-name" "Fitzgerald">
      <triple   36:   "person2"   "suffix" "none">
      <triple   37:   "person2"   "alma-mater" "Sacred-Heart-Convent">
      <triple   38:   "person2"   "birth-year" "1890">
      <triple   39:   "person2"   "death-year" "1995">
      <triple   40:   "person2"   "sex" "female">
      <triple   41:   "person2"   "spouse" "person1">
      <triple   58:   "person2"   "has-child" "person17">
      <triple   56:   "person2"   "has-child" "person15">
      <triple   54:   "person2"   "has-child" "person13">
      <triple   52:   "person2"   "has-child" "person11">
      <triple   50:   "person2"   "has-child" "person9">
      <triple   48:   "person2"   "has-child" "person7">
      <triple   46:   "person2"   "has-child" "person6">
      <triple   44:   "person2"   "has-child" "person4">
      <triple   42:   "person2"   "has-child" "person3">
      <triple   60:   "person2"   "profession" "home-maker">

July 06                              Phone: 510-452-2000                 45
               Building semantic relations on top of
               RDF

      (<-- (male ?x)                         (<-- (grandparent ?x ?y)
           (q ?x !o:sex !o:male))                 (parent ?x ?z)
                                                  (parent ?z ?y))
      (<-- (female ?x)
           (q ?x !o:sex !o:female))          (<-- (grandchild ?x ?y)
                                                  (grandparent ?y ?x))
      (<-- (father ?x ?y)
           (male ?x)                         (<-- (ancestor ?x ?y)
           (q ?x !o:has-child ?y))                (parent ?x ?y))

      (<-- (mother ?x ?y)                    (<-   (ancestor ?x ?y)
           (female ?x)                             (parent ?x ?z)
           (q ?x !o:has-child ?y))                 (ancestor ?z ?y))

      (<-- (parent ?x ?y)                    (<-- (descendent ?x ?y)
           (father ?x ?y))                        (ancestor ?y ?x))

      (<- (parent ?x ?y)
          (mother ?x ?y))
July 06                      Phone: 510-452-2000                        46
               Building semantic relations on top of
               RDF..
     (<-- (aunt ?x ?y)      (<-- (niece ?x ?y)
          (father ?z ?x)         (aunt ?y ?x)
          (female ?x)            (female ?x))
          (father ?z ?w)
          (not (= ?x ?w))   (<- (niece ?x ?y)
          (parent ?w ?y))       (uncle ?y ?x)
                                (female ?x))
     (<-- (uncle ?x ?y)
          (father ?z ?x)    (<-- (parent-child-ivy-league ?x ?y)
          (male ?x)              (q ?x !!o:alma-mater ?am)
          (father ?z ?w)         (q ?am !!o:ivy-league !!o:true)
          (not (= ?x ?w))        (parent ?x ?y)
          (parent ?w ?y))        (q ?y !!o:alma-mater ?am2)
                                 (q ?am2 !!o:ivy-league !!o:true))
     (<-- (nephew ?x ?y)
          (aunt ?y ?x)
          (male ?x))

     (<- (nephew ?x ?y)
         (uncle ?y ?x)
         (male ?x))                                           47
July 06                     Phone: 510-452-2000
               A straight forward query

     rdf(18): ((male ?x)   (full-name ?x ?name) (print ?name))

     "Michael nil Allen"
     "Alfred nil Tucker"
     "Cart Harmon Hood"
     "Mark nil Bailey"
     "Andrew Mark Cuomo"
     "Paul Michael Hill"
     "Jeffrey Robert Ruhe"
     "David Lee Townsend"
     "Robert B Pender"
     "James Peter McKelvy"
     "Arnold Alois Schwarzenegger"
     "Edwin Arthur Schlossberg"
     "Patrick Joseph Kennedy"
     "Edward M Kennedy"
     "William Kennedy Smith"
     "Stephen E Smith"
     … and twenty more…

July 06                     Phone: 510-452-2000                  48
               Meta relation search

      (<-- (relation ?x ?y father) (father ?x ?y))
      (<- (relation ?x ?y mother) (mother ?x ?y))
      (<- (relation ?x ?y parent) (parent ?x ?y))
      (<- (relation ?x ?y grandparent) (grandparent ?x ?y))
      (<- (relation ?x ?y grandchild) (grandchild ?x ?y))
      (<- (relation ?x ?y ancestor) (ancestor ?x ?y))
      (<- (relation ?x ?y descendent) (descendent ?x ?y))
      (<- (relation ?x ?y parent-child-have-same-name)
           (parent-child-have-same-name ?x ?y))
      (<- (relation ?x ?y parent-child-went-to-ivy-league-school)
           (parent-child-went-to-ivy-league-school ?x ?y))
      (<- (relation ?x ?y aunt) (aunt ?x ?y))
      (<- (relation ?x ?y uncle) (uncle ?x ?y))
      (<- (relation ?x ?y nephew) (nephew ?x ?y))
      (<- (relation ?x ?y niece) (niece ?x ?y))
      (<- (relation ?x ?y spouse) (spouse ?x ?y))




July 06                    Phone: 510-452-2000                 49
                Advanced query


      (?- (find-relations ?x ?y 2))

      ……
       John Fitzgerald Kennedy : Patrick Bouvier Kennedy
         --> (father parent ancestor)

      John Fitzgerald Kennedy : John F Kennedy
         --> (father parent ancestor parent-child-have-same-name
           parent-child-went-to-ivy-league-school)

      John Fitzgerald Kennedy : Caroline Bouvier Kennedy
         --> (father parent ancestor parent-child-went-to-ivy-
         league-school)

       Rose Elizabeth Fitzgerald : Patrick Joseph Kennedy
         --> (grandparent ancestor)
      …….


July 06                    Phone: 510-452-2000                   50
               Graph search:


          107,000 actors, 120,000 movies.
          Most actors play in > 10 movies, most movies
          list > 10 actors..
          Example: find Kevin Bacon Number
            Find a chain of actor-movie-actor-movie-etc
            from Kevin Bacon to actor X.
            Use breadth-first to guarantee shortest path
            Incredible fan out effect


July 06                  Phone: 510-452-2000           51
          (defun shortest-path (a1 a2)
            (let ((mht (make-hash-table :size 100000))
              (aht (make-hash-table :size 100000)))
              (setf (gethash a1 aht) t)
              (let ((path (shortest-path-m (list a1) a2 1 mht aht)))
                (and path
                 (values path
                       (nreverse
                        (cons a2
                                (loop with m
                                    do (setf m (gethash a2 aht)
                                               a2 (gethash m mht))
                                    collect m collect a2
                                    until (eql a2 a1)))))))))

          (defun shortest-path-m (a-list a2 n mht aht)
            (when a-list
              (shortest-path-a
               (loop for a in a-list
               nconc (loop for m in (get-movies a)
                       unless (gethash m mht)
                       do (setf (gethash m mht) a) and
                       collect m))
               a2 n mht aht)))

          (defun shortest-path-a (m-list a2 n mht aht)
            (when m-list
              (shortest-path-m
               (loop for m in m-list
               nconc (loop for a1 in (get-actors m)
                       unless (gethash a1 aht)
                       do (setf (gethash a1 aht) m) and
                       collect a1
                       when (eql a1 a2)
                       do (return-from shortest-path-a n)))
July 06                    Phone: 510-452-2000
               a2 (1+ n) mht aht)))
                                                                       52
              the Kevin Bacon Number:


      (Shortest-path !!Bruce !!Lee !!Kevin !!Bacon)


      Bruce Lee
             Fist Of Fear, Touch of Death
      Ernest Borgnine
             AFI's 100 Years...100 Stars
      Kevin Bacon




July 06                  Phone: 510-452-2000          53
              Some timing data:


Cold Start:

rdf(14): (time (shortest-path !!Bruce !!Lee !!Kevin !!Bacon))
; real time 63 msec

699 movies from actors… (get-triples a !o:contributes-to nil)
199 actors from movies (get-triples m !o:has-contributor nil)
7603 triples read 8.88e-6 per triple
6.666e-5 per get-triples

Rerun with Cache..

rdf(17):(time (shortest-path !!Bruce !!Lee !!Kevin !!Bacon))
;real time 17 msec




July 06                 Phone: 510-452-2000                    54
                 TwinQL:a parser and query engine for the SPARQL RDF
                 query language,




          Runs SPARQL queries against AllegroGraph
          Parsing of the SPARQL SQL-like syntax into an intermediate s-
          expression format
          Resolution of query patterns into results tables, which are
          accessible as lists of hashes for programmatic manipulation
          Output of result lists in human-readable format and in the
          SPARQL XML query result format
          Evaluation of SELECT, ASK, CONSTRUCT, and DESCRIBE
          queries (the latter returning unions of CBDs)
          Precompilation of queries
          Creation of matchers, functions that check if a given node
          satisfies a predetermined variable binding in a query.



July 06                       Phone: 510-452-2000                      55
                                  Reference Links


          Technical questions:       ja@franz.com
             510 452 2000 x 119
          Sales:                     ssears@franz.com
             510 452 2000 x 154
          Franz, Inc.                http://www.franz.com/


               http://www.franz.com/products/allegrograph/




July 06                      Phone: 510-452-2000             56

				
DOCUMENT INFO
hkksew3563rd hkksew3563rd http://
About