DSLs with fold algebras

Download DSLs with fold algebras

Post on 27-Nov-2014

425 views

Category:

Software

2 download

Embed Size (px)

DESCRIPTION

This presentation shows how to use "fold algebras" to implement a toy DSL for paths

TRANSCRIPT

<ul><li> 1. Writing a DSL witha Fold-AlgebraScalaSyd</li></ul> <p> 2. OverviewThe expression problemFold-algebrasFile pathsDSLs tips and tricksScala types 3. Ive had this problemResultFailure Success PendingConsole HtmlScreenshot?Pdf? 4. The Expression ProblemAdd(Lit(1), Lit(2)) 5. The Expression Problem 6. The Expression Problem 7. Solved in Java?!? 8. Data as an ADT 9. List as a fold 10. List as a fold 11. Data types encodingsList[A] = Nil + (A, List[A])F[A] -&gt; ANil + (A, List[A]) -&gt; A(Nil -&gt; A, (A, List[A]) -&gt; A) 12. A Fold-algebra for directoriesName Name Name Name 13. A Fold-algebra for directories 14. A DSL for directories 15. Whats in a name? 16. Whats in a name? 17. A DSL for directories 18. A DSL for directories 19. A DSL for directories 20. A Fold-algebra for files 21. A DSL for files 22. A DSL for files 23. A Fold-algebra for paths 24. A Fold-algebra for paths 25. A DSL for relative paths 26. A DSL for relative paths 27. A DSL for relative paths 28. A DSL for relative paths 29. A DSL for relative paths 30. A DSL for relative paths 31. ConclusionPapers! Play!Present at!3Ps </p>