Tree Editing with Zippers

3,389 views

Published on

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

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
3,389
On SlideShare
0
From Embeds
0
Number of Embeds
372
Actions
Shares
0
Downloads
42
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

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

×