O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.
Tree Editing with
Zippers
Alex Miller
Revelytix
aka @puredanger
aka “Dr. Strange Loop”
Zipper node protocol
Some records
Two “child” variants
seq of records
fields holding records
Use the record zipper
Comparison
:op := :left :right
ScalarFunction
:f :+ :exprs
ScalarFunction
:f :- :exprs
2 3 6 1
“(2 +...
Use the record zipper
Comparison
:op := :left :right
ScalarFunction
:f :+ :exprs
ScalarFunction
:f :- :exprs
2 3 6 1
“(2 +...
Use the record zipper
Comparison
:op := :left :right
ScalarFunction
:f :+ :exprs
ScalarFunction
:f :- :exprs
2 3 6 1
“(2 +...
Use the record zipper
Comparison
:op := :left :right
ScalarFunction
:f :+ :exprs
ScalarFunction
:f :- :exprs
2 3 6 1
“(2 +...
Tree pattern mutator
Apply evaluation rule
Comparison
:op := :left :right
ScalarFunction
:f :- :exprs
5
6 1
Comparison
:op := :left :right
5 5
Revelytix
• Data integration using semantic web
• SPARQL -> SQL translation
• SPARQL federation
• Business rules engine
• ...
SPARQL to SQL
Parse, translate to
SPARQL algebra
Plan using
mapping
Optimize plan
Generate SQL
SELECT ?Person ?Name
WHERE ...
Próximos SlideShares
Carregando em…5
×

Tree Editing with Zippers

A quick talk on how to use Clojure zippers over trees made from records and build a tree pattern matching / mutation facility over that.

  • Seja o primeiro a comentar

  • Seja a primeira pessoa a gostar disto

Tree Editing with Zippers

  1. 1. Tree Editing with Zippers Alex Miller Revelytix aka @puredanger aka “Dr. Strange Loop”
  2. 2. Zipper node protocol
  3. 3. Some records
  4. 4. Two “child” variants seq of records fields holding records
  5. 5. Use the record zipper Comparison :op := :left :right ScalarFunction :f :+ :exprs ScalarFunction :f :- :exprs 2 3 6 1 “(2 + 3) = (6 - 1)”
  6. 6. Use the record zipper Comparison :op := :left :right ScalarFunction :f :+ :exprs ScalarFunction :f :- :exprs 2 3 6 1 “(2 + 3) = (6 - 1)”
  7. 7. Use the record zipper Comparison :op := :left :right ScalarFunction :f :+ :exprs ScalarFunction :f :- :exprs 2 3 6 1 “(2 + 3) = (6 - 1)”
  8. 8. Use the record zipper Comparison :op := :left :right ScalarFunction :f :+ :exprs ScalarFunction :f :- :exprs 2 3 6 1 “(2 + 3) = (6 - 1)”
  9. 9. Tree pattern mutator
  10. 10. Apply evaluation rule Comparison :op := :left :right ScalarFunction :f :- :exprs 5 6 1 Comparison :op := :left :right 5 5
  11. 11. Revelytix • Data integration using semantic web • SPARQL -> SQL translation • SPARQL federation • Business rules engine • Emergent analytics
  12. 12. SPARQL to SQL Parse, translate to SPARQL algebra Plan using mapping Optimize plan Generate SQL SELECT ?Person ?Name WHERE { ?Person <http://domain/Person/Name> ?name } SPARQL algebra tree SQL query plan SELECT 'http://domain/Person/' || ID, Name FROM People SQL query plan tree rules

×