SlideShare uma empresa Scribd logo
1 de 28
Towards an RDF Validation Language
based on Regular Expression Derivatives
Eric Prud'hommeaux
World Wide Web
Consortium
MIT, Cambridge, MA, USA
Harold Solbrig
Mayo Clinic
USA
College of Medicine, Rochester,
MN, USA
Jose Emilio Labra Gayo
WESO Research group
University of Oviedo
Spain
Sławek Staworko
LINKS, INRIA & CNRS
University of Lille, France
Overview
Shape Expressions for RDF validation - Justification
Regular Shape Expressions
Axiomatic Semantics
Implementation based on Derivatives
Regular Shape Expression Schemas
Adapt Axiomatic Semantics to Schemas
Adapt Implementation based on Derivatives
Conclusions & Future work
Shape Expressions
Simple and intuitive language that can:
Describe the topology of RDF data
Validate that RDF instance data matches a shape
Two syntaxes
Compact syntax (inspired by RelaxNG, Turtle and SPARQL)
RDF
Related to W3c RDF Data Shapes Working Group
Example: RDF model of a Person
Person__
foaf:age xsd:integer
foaf:name xsd:string +
0..*
foaf:knows
:john foaf:age 23;
foaf:name "John";
foaf:knows :bob .
:bob foaf:age 34;
foaf:name "Bob", "Robert" .


<Person> {
foaf:age xsd:integer
, foaf:name xsd:string+
, foaf:knows @<Person>*
}
Shape Expressions Schema
Some RDF data
:mary foaf:age 50, 65 .
E-R Diagram
Why not SPARQL?
<Person> {
foaf:age xsd:integer
, foaf:name xsd:string+
, foaf:knows @<Person>*
}ASK { { SELECT ?Person {
?Person foaf:age ?o .
} GROUP BY ?Person HAVING (COUNT(*)=1)
}
{ SELECT ?Person {
?Person foaf:age ?o .
FILTER ( isLiteral(?o) &&
datatype(?o) = xsd:integer )
} GROUP BY ?Person HAVING (COUNT(*)=1)
}
...
1
2
3
4
5
6
7
8
9
10
...
...
{ SELECT ?Person (COUNT(*) AS ?Person_c0) {
?Person foaf:name ?o .
} GROUP BY ?Person HAVING (COUNT(*)>=1)
}
{ SELECT ?Person (COUNT(*) AS ?Person_c1) {
?Person foaf:name ?o .
FILTER (isLiteral(?o) &&
datatype(?o) = xsd:string)
} GROUP BY ?Person HAVING (COUNT(*)>=1) }
FILTER (?Person_c0 = ?Person_c1)
...
...
11
12
13
14
15
16
17
18
19
20
...
...
{ { { SELECT ?Person (COUNT(*) AS ?Person_c2) {
?Person foaf:knows ?o .
} GROUP BY ?Person }
{ SELECT ?Person (COUNT(*) AS ?Person_c3) {
?Person foaf:knows ?o .
FILTER ((isIRI(?o) || isBlank(?o)))
} GROUP BY ?Person HAVING (COUNT(*) >= 1)
}
FILTER (?Person_c2 = ?Person_c3)
}
...
...
21
22
23
24
25
26
27
28
29
30
...
...
UNION {
SELECT ?Person {
OPTIONAL { ?Person foaf:knows ?o }
FILTER (!bound(?o))
}
}
}
}
...
31
32
33
34
35
36
37
38
1
2
3
4
5
Regular Shape Expressions (RSEs)
Simplified version of Shape Expressions
Based on Regular Expressions
Sets of triples instead of list of characters
Interleave instead of concatenation
Abstract syntax
Shape Expressions vs RSEs*
<Shape1> {
foaf:age xsd:integer
, foaf:name xsd:string*
}
Example1:
Shape Expression RSE
* Note: We are considering a subset of Shape Expressions with Closed Shapes, and inclusive Or
<Shape2> {
:a ( 1 )
, :b ( 1 2 ) *
}
Example 2:
Cardinalities in RSEs
Cardinalities can be defined as:
Example:
Shape of a RSE:
Example
Simplification rules
It is easy to show that the operators obey:
Matching triples with RSEs
Example matching tree
Rules employed
Derivatives of RSEs
Brzozowski's algorithm (1964) developed for Regular Expressions
We adapted that algorithm to RSEs
Calculates the derivative of a RSE with respect to a triple t:
Definition:
Calculating the derivative Definitions







Matching using derivatives
Auxiliary function that returns true if a RSE matches the empty graph
The matching relation can be expressed as:
Example trace:






Regular Shape Expression Schemas
Given a set of labels, a RSE schema is a function
where we extend RSEs to admit label references
Example 1:
Example 2:
<Person> {
foaf:age xsd:integer
, foaf:knows @<Person>*
}
Corresponds to:
From matching to typing
We extend previous definitions to include the notion of typing
A typing associates a label to a node in a context
Definitions on typings
The matching algorithm returns the typing in the context:
Matching RSEs Schemas
We define the matching of a RSE e with a set of triples as a partial
function that returns a typing.
The function takes a typing context as argument
and we extend previous axiomatic definitions as...
Axiomatic definitions adapted RSE Schemas
Derivative of a RSE in a typing context
We adapt previous definitions to typing contexts
where
Example:
Implementations
The algorithm has been implemented in Scala
Available at: http://labra.github.io/shexcala
We have also implemented a simplified prototype following the paper
definitions in Haskell
Available at: http://labra.github.io/Haws
An online version is also available at: http://rdfshape.weso.es
First experimental results
Comparison between derivatives (deriv) and backtracking (back)
Conclusions & Future work
Declarative algorithm to match Regular Shape Expressions
Based on equational reasoning
Theoretical complexity is unaffected
However, the derivatives algorithm behaves better than backtracking in practice
Future work:
Prove the correctness of the algorithm
Experimental results
Align this work with current RDF Data Shapes development
End of Presentation
SHACL vs RSEs
At this moment, SHACL is being defined by the RDF Data Shapes WG
Some differences:
Open Shapes (allow remaining triples)
Arcs check that there are no other arcs with the same predicate and different
values
And operator instead of interleave
Inclusive vs Exclusive-or
Semantics of all these features is under discussion
Example of derivatives that don't match

Mais conteúdo relacionado

Mais procurados

SWT Lecture Session 9 - RDB2RDF direct mapping
SWT Lecture Session 9 - RDB2RDF direct mappingSWT Lecture Session 9 - RDB2RDF direct mapping
SWT Lecture Session 9 - RDB2RDF direct mapping
Mariano Rodriguez-Muro
 

Mais procurados (20)

Challenges and applications of RDF shapes
Challenges and applications of RDF shapesChallenges and applications of RDF shapes
Challenges and applications of RDF shapes
 
RDF Validation Future work and applications
RDF Validation Future work and applicationsRDF Validation Future work and applications
RDF Validation Future work and applications
 
Introduction to SPARQL
Introduction to SPARQLIntroduction to SPARQL
Introduction to SPARQL
 
SHACL Overview
SHACL OverviewSHACL Overview
SHACL Overview
 
Validating and Describing Linked Data Portals using RDF Shape Expressions
Validating and Describing Linked Data Portals using RDF Shape ExpressionsValidating and Describing Linked Data Portals using RDF Shape Expressions
Validating and Describing Linked Data Portals using RDF Shape Expressions
 
RDF Data Model
RDF Data ModelRDF Data Model
RDF Data Model
 
SHACL: Shaping the Big Ball of Data Mud
SHACL: Shaping the Big Ball of Data MudSHACL: Shaping the Big Ball of Data Mud
SHACL: Shaping the Big Ball of Data Mud
 
SHACL Specification Draft
SHACL Specification DraftSHACL Specification Draft
SHACL Specification Draft
 
Two graph data models : RDF and Property Graphs
Two graph data models : RDF and Property GraphsTwo graph data models : RDF and Property Graphs
Two graph data models : RDF and Property Graphs
 
RDF briefing
RDF briefingRDF briefing
RDF briefing
 
SWT Lecture Session 11 - R2RML part 2
SWT Lecture Session 11 - R2RML part 2SWT Lecture Session 11 - R2RML part 2
SWT Lecture Session 11 - R2RML part 2
 
SWT Lecture Session 9 - RDB2RDF direct mapping
SWT Lecture Session 9 - RDB2RDF direct mappingSWT Lecture Session 9 - RDB2RDF direct mapping
SWT Lecture Session 9 - RDB2RDF direct mapping
 
SHACL in Apache jena - ApacheCon2020
SHACL in Apache jena - ApacheCon2020SHACL in Apache jena - ApacheCon2020
SHACL in Apache jena - ApacheCon2020
 
SWT Lecture Session 10 R2RML Part 1
SWT Lecture Session 10 R2RML Part 1SWT Lecture Session 10 R2RML Part 1
SWT Lecture Session 10 R2RML Part 1
 
RDF SHACL, Annotations, and Data Frames
RDF SHACL, Annotations, and Data FramesRDF SHACL, Annotations, and Data Frames
RDF SHACL, Annotations, and Data Frames
 
Graph Data -- RDF and Property Graphs
Graph Data -- RDF and Property GraphsGraph Data -- RDF and Property Graphs
Graph Data -- RDF and Property Graphs
 
RDF, linked data and semantic web
RDF, linked data and semantic webRDF, linked data and semantic web
RDF, linked data and semantic web
 
What's New in RDF 1.1?
What's New in RDF 1.1?What's New in RDF 1.1?
What's New in RDF 1.1?
 
SWT Lecture Session 3 - SPARQL
SWT Lecture Session 3 - SPARQLSWT Lecture Session 3 - SPARQL
SWT Lecture Session 3 - SPARQL
 
JSON-LD and SHACL for Knowledge Graphs
JSON-LD and SHACL for Knowledge GraphsJSON-LD and SHACL for Knowledge Graphs
JSON-LD and SHACL for Knowledge Graphs
 

Destaque

Destaque (13)

Arquitectura de la Web y Computación en el Servidor
Arquitectura de la Web y Computación en el ServidorArquitectura de la Web y Computación en el Servidor
Arquitectura de la Web y Computación en el Servidor
 
RDF data model
RDF data modelRDF data model
RDF data model
 
Hydra: A Vocabulary for Hypermedia-Driven Web APIs
Hydra: A Vocabulary for Hypermedia-Driven Web APIsHydra: A Vocabulary for Hypermedia-Driven Web APIs
Hydra: A Vocabulary for Hypermedia-Driven Web APIs
 
2 Introducción al lenguaje Ruby
2 Introducción al lenguaje Ruby2 Introducción al lenguaje Ruby
2 Introducción al lenguaje Ruby
 
Pumping lemma for regular set h1
Pumping lemma for regular set h1Pumping lemma for regular set h1
Pumping lemma for regular set h1
 
Model Your Application Domain, Not Your JSON Structures
Model Your Application Domain, Not Your JSON StructuresModel Your Application Domain, Not Your JSON Structures
Model Your Application Domain, Not Your JSON Structures
 
4 Introducción al lenguaje Scala
4 Introducción al lenguaje Scala4 Introducción al lenguaje Scala
4 Introducción al lenguaje Scala
 
Theory of Automata and formal languages unit 1
Theory of Automata and formal languages unit 1Theory of Automata and formal languages unit 1
Theory of Automata and formal languages unit 1
 
Theory of Automata and formal languages unit 2
Theory of Automata and formal languages unit 2Theory of Automata and formal languages unit 2
Theory of Automata and formal languages unit 2
 
JSON-LD for RESTful services
JSON-LD for RESTful servicesJSON-LD for RESTful services
JSON-LD for RESTful services
 
Regular language and Regular expression
Regular language and Regular expressionRegular language and Regular expression
Regular language and Regular expression
 
JSON-LD: JSON for Linked Data
JSON-LD: JSON for Linked DataJSON-LD: JSON for Linked Data
JSON-LD: JSON for Linked Data
 
From Strings to Things to a Web of Services
From Strings to Things to a Web of ServicesFrom Strings to Things to a Web of Services
From Strings to Things to a Web of Services
 

Semelhante a Towards an RDF Validation Language based on Regular Expression Derivatives

Dsm as theory building
Dsm as theory buildingDsm as theory building
Dsm as theory building
ClarkTony
 
Information extraction for Free Text
Information extraction for Free TextInformation extraction for Free Text
Information extraction for Free Text
butest
 
Triplestore and SPARQL
Triplestore and SPARQLTriplestore and SPARQL
Triplestore and SPARQL
Lino Valdivia
 

Semelhante a Towards an RDF Validation Language based on Regular Expression Derivatives (20)

Sparql
SparqlSparql
Sparql
 
SPARQL introduction and training (130+ slides with exercices)
SPARQL introduction and training (130+ slides with exercices)SPARQL introduction and training (130+ slides with exercices)
SPARQL introduction and training (130+ slides with exercices)
 
Dsm as theory building
Dsm as theory buildingDsm as theory building
Dsm as theory building
 
Semantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorialSemantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorial
 
SPARQL Query Containment with ShEx Constraints
SPARQL Query Containment with ShEx ConstraintsSPARQL Query Containment with ShEx Constraints
SPARQL Query Containment with ShEx Constraints
 
Information extraction for Free Text
Information extraction for Free TextInformation extraction for Free Text
Information extraction for Free Text
 
SPARQL Cheat Sheet
SPARQL Cheat SheetSPARQL Cheat Sheet
SPARQL Cheat Sheet
 
Functional programming in Java 8 - workshop at flatMap Oslo 2014
Functional programming in Java 8 - workshop at flatMap Oslo 2014Functional programming in Java 8 - workshop at flatMap Oslo 2014
Functional programming in Java 8 - workshop at flatMap Oslo 2014
 
2 rel-algebra
2 rel-algebra2 rel-algebra
2 rel-algebra
 
myEquivalents, aka a new cross-reference service
myEquivalents, aka a new cross-reference servicemyEquivalents, aka a new cross-reference service
myEquivalents, aka a new cross-reference service
 
AnzoGraph DB - SPARQL 101
AnzoGraph DB - SPARQL 101AnzoGraph DB - SPARQL 101
AnzoGraph DB - SPARQL 101
 
Introduction to SPARQL
Introduction to SPARQLIntroduction to SPARQL
Introduction to SPARQL
 
Triplestore and SPARQL
Triplestore and SPARQLTriplestore and SPARQL
Triplestore and SPARQL
 
SPARQL
SPARQLSPARQL
SPARQL
 
Optimized index structures for querying rdf from the web
Optimized index structures for querying rdf from the webOptimized index structures for querying rdf from the web
Optimized index structures for querying rdf from the web
 
Facilitating Busines Interoperability from the Semantic Web
Facilitating Busines Interoperability from the Semantic WebFacilitating Busines Interoperability from the Semantic Web
Facilitating Busines Interoperability from the Semantic Web
 
Do it on your own - From 3 to 5 Star Linked Open Data with RMLio
Do it on your own - From 3 to 5 Star Linked Open Data with RMLioDo it on your own - From 3 to 5 Star Linked Open Data with RMLio
Do it on your own - From 3 to 5 Star Linked Open Data with RMLio
 
Explicit Semantics in Graph DBs Driving Digital Transformation With Neo4j
Explicit Semantics in Graph DBs Driving Digital Transformation With Neo4jExplicit Semantics in Graph DBs Driving Digital Transformation With Neo4j
Explicit Semantics in Graph DBs Driving Digital Transformation With Neo4j
 
SOLID mit Java 8
SOLID mit Java 8SOLID mit Java 8
SOLID mit Java 8
 
Relational data model
Relational data modelRelational data model
Relational data model
 

Mais de Jose Emilio Labra Gayo

Mais de Jose Emilio Labra Gayo (17)

Publicaciones de investigación
Publicaciones de investigaciónPublicaciones de investigación
Publicaciones de investigación
 
Introducción a la investigación/doctorado
Introducción a la investigación/doctoradoIntroducción a la investigación/doctorado
Introducción a la investigación/doctorado
 
Legislative data portals and linked data quality
Legislative data portals and linked data qualityLegislative data portals and linked data quality
Legislative data portals and linked data quality
 
Wikidata
WikidataWikidata
Wikidata
 
Legislative document content extraction based on Semantic Web technologies
Legislative document content extraction based on Semantic Web technologiesLegislative document content extraction based on Semantic Web technologies
Legislative document content extraction based on Semantic Web technologies
 
Introducción a la Web Semántica
Introducción a la Web SemánticaIntroducción a la Web Semántica
Introducción a la Web Semántica
 
2017 Tendencias en informática
2017 Tendencias en informática2017 Tendencias en informática
2017 Tendencias en informática
 
19 javascript servidor
19 javascript servidor19 javascript servidor
19 javascript servidor
 
Como publicar datos: hacia los datos abiertos enlazados
Como publicar datos: hacia los datos abiertos enlazadosComo publicar datos: hacia los datos abiertos enlazados
Como publicar datos: hacia los datos abiertos enlazados
 
16 Alternativas XML
16 Alternativas XML16 Alternativas XML
16 Alternativas XML
 
XSLT
XSLTXSLT
XSLT
 
XPath
XPathXPath
XPath
 
Máster en Ingeniería Web
Máster en Ingeniería WebMáster en Ingeniería Web
Máster en Ingeniería Web
 
2016 temuco tecnologias_websemantica
2016 temuco tecnologias_websemantica2016 temuco tecnologias_websemantica
2016 temuco tecnologias_websemantica
 
2015 bogota datos_enlazados
2015 bogota datos_enlazados2015 bogota datos_enlazados
2015 bogota datos_enlazados
 
17 computacion servidor
17 computacion servidor17 computacion servidor
17 computacion servidor
 
Tecnologias Web Semantica
Tecnologias Web SemanticaTecnologias Web Semantica
Tecnologias Web Semantica
 

Último

Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
shivangimorya083
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
soniya singh
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
soniya singh
 

Último (20)

GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
 
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
 

Towards an RDF Validation Language based on Regular Expression Derivatives

  • 1. Towards an RDF Validation Language based on Regular Expression Derivatives Eric Prud'hommeaux World Wide Web Consortium MIT, Cambridge, MA, USA Harold Solbrig Mayo Clinic USA College of Medicine, Rochester, MN, USA Jose Emilio Labra Gayo WESO Research group University of Oviedo Spain Sławek Staworko LINKS, INRIA & CNRS University of Lille, France
  • 2. Overview Shape Expressions for RDF validation - Justification Regular Shape Expressions Axiomatic Semantics Implementation based on Derivatives Regular Shape Expression Schemas Adapt Axiomatic Semantics to Schemas Adapt Implementation based on Derivatives Conclusions & Future work
  • 3. Shape Expressions Simple and intuitive language that can: Describe the topology of RDF data Validate that RDF instance data matches a shape Two syntaxes Compact syntax (inspired by RelaxNG, Turtle and SPARQL) RDF Related to W3c RDF Data Shapes Working Group
  • 4. Example: RDF model of a Person Person__ foaf:age xsd:integer foaf:name xsd:string + 0..* foaf:knows :john foaf:age 23; foaf:name "John"; foaf:knows :bob . :bob foaf:age 34; foaf:name "Bob", "Robert" .   <Person> { foaf:age xsd:integer , foaf:name xsd:string+ , foaf:knows @<Person>* } Shape Expressions Schema Some RDF data :mary foaf:age 50, 65 . E-R Diagram
  • 5. Why not SPARQL? <Person> { foaf:age xsd:integer , foaf:name xsd:string+ , foaf:knows @<Person>* }ASK { { SELECT ?Person { ?Person foaf:age ?o . } GROUP BY ?Person HAVING (COUNT(*)=1) } { SELECT ?Person { ?Person foaf:age ?o . FILTER ( isLiteral(?o) && datatype(?o) = xsd:integer ) } GROUP BY ?Person HAVING (COUNT(*)=1) } ... 1 2 3 4 5 6 7 8 9 10 ... ... { SELECT ?Person (COUNT(*) AS ?Person_c0) { ?Person foaf:name ?o . } GROUP BY ?Person HAVING (COUNT(*)>=1) } { SELECT ?Person (COUNT(*) AS ?Person_c1) { ?Person foaf:name ?o . FILTER (isLiteral(?o) && datatype(?o) = xsd:string) } GROUP BY ?Person HAVING (COUNT(*)>=1) } FILTER (?Person_c0 = ?Person_c1) ... ... 11 12 13 14 15 16 17 18 19 20 ... ... { { { SELECT ?Person (COUNT(*) AS ?Person_c2) { ?Person foaf:knows ?o . } GROUP BY ?Person } { SELECT ?Person (COUNT(*) AS ?Person_c3) { ?Person foaf:knows ?o . FILTER ((isIRI(?o) || isBlank(?o))) } GROUP BY ?Person HAVING (COUNT(*) >= 1) } FILTER (?Person_c2 = ?Person_c3) } ... ... 21 22 23 24 25 26 27 28 29 30 ... ... UNION { SELECT ?Person { OPTIONAL { ?Person foaf:knows ?o } FILTER (!bound(?o)) } } } } ... 31 32 33 34 35 36 37 38 1 2 3 4 5
  • 6. Regular Shape Expressions (RSEs) Simplified version of Shape Expressions Based on Regular Expressions Sets of triples instead of list of characters Interleave instead of concatenation Abstract syntax
  • 7. Shape Expressions vs RSEs* <Shape1> { foaf:age xsd:integer , foaf:name xsd:string* } Example1: Shape Expression RSE * Note: We are considering a subset of Shape Expressions with Closed Shapes, and inclusive Or <Shape2> { :a ( 1 ) , :b ( 1 2 ) * } Example 2:
  • 8. Cardinalities in RSEs Cardinalities can be defined as: Example:
  • 9. Shape of a RSE: Example
  • 10. Simplification rules It is easy to show that the operators obey:
  • 13. Derivatives of RSEs Brzozowski's algorithm (1964) developed for Regular Expressions We adapted that algorithm to RSEs Calculates the derivative of a RSE with respect to a triple t: Definition:
  • 14. Calculating the derivative Definitions       
  • 15. Matching using derivatives Auxiliary function that returns true if a RSE matches the empty graph The matching relation can be expressed as:
  • 17. Regular Shape Expression Schemas Given a set of labels, a RSE schema is a function where we extend RSEs to admit label references Example 1: Example 2: <Person> { foaf:age xsd:integer , foaf:knows @<Person>* } Corresponds to:
  • 18. From matching to typing We extend previous definitions to include the notion of typing A typing associates a label to a node in a context Definitions on typings The matching algorithm returns the typing in the context:
  • 19. Matching RSEs Schemas We define the matching of a RSE e with a set of triples as a partial function that returns a typing. The function takes a typing context as argument and we extend previous axiomatic definitions as...
  • 21. Derivative of a RSE in a typing context We adapt previous definitions to typing contexts where
  • 23. Implementations The algorithm has been implemented in Scala Available at: http://labra.github.io/shexcala We have also implemented a simplified prototype following the paper definitions in Haskell Available at: http://labra.github.io/Haws An online version is also available at: http://rdfshape.weso.es
  • 24. First experimental results Comparison between derivatives (deriv) and backtracking (back)
  • 25. Conclusions & Future work Declarative algorithm to match Regular Shape Expressions Based on equational reasoning Theoretical complexity is unaffected However, the derivatives algorithm behaves better than backtracking in practice Future work: Prove the correctness of the algorithm Experimental results Align this work with current RDF Data Shapes development
  • 27. SHACL vs RSEs At this moment, SHACL is being defined by the RDF Data Shapes WG Some differences: Open Shapes (allow remaining triples) Arcs check that there are no other arcs with the same predicate and different values And operator instead of interleave Inclusive vs Exclusive-or Semantics of all these features is under discussion
  • 28. Example of derivatives that don't match