1 / 59

Sweet Talk (part 2) Tool Support for Sweet

Sweet Talk (part 2) Tool Support for Sweet. Phil Quitslund. Plan. Sweet Tooling issues Introduction to Eclipse Sweet Plugin at a glance Implementation notes Pitch and Caveats Where next. Plan. Sweet Tooling issues Introduction to Eclipse Sweet Plugin at a glance Implementation notes

emmet
Download Presentation

Sweet Talk (part 2) Tool Support for Sweet

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sweet Talk (part 2)Tool Support for Sweet Phil Quitslund

  2. Plan • Sweet Tooling issues • Introduction to Eclipse • Sweet Plugin at a glance • Implementation notes • Pitch and Caveats • Where next

  3. Plan • Sweet Tooling issues • Introduction to Eclipse • Sweet Plugin at a glance • Implementation notes • Pitch and Caveats • Where next

  4. Automating the Build The Problem: Manual builds considered painful

  5. Automating the Build The Problem: Manual builds considered painful • generative techniques require extra steps to stage builds

  6. Automating the Build The Problem: Manual builds considered painful • generative techniques require extra steps to stage builds the rub: manual builds hurt and interrupt programmer flow

  7. Automating the Build public abstract class List { public case Nil public case Cons(private int head, private List tail) } public int length() case List abstract; case Nil { return 0; } case Cons { return 1 + tail.length(); }

  8. Automating the Build public abstract class List { public case Nil public case Cons(private int head, private List tail) } public int length() case List abstract; case Nil { return 0; } case Cons { return 1 + tail.length(); }

  9. Automating the Build public abstract class List { public case Nil public case Cons(private int head, private List tail) } public int length() case List abstract; case Nil { return 0; } case Cons { return 1 + tail.length(); } 3 “Introductions”

  10. Automating the Build public abstract class List { public case Nil public case Cons(private int head, private List tail) } public int length() case List abstract; case Nil { return 0; } case Cons { return 1 + tail.length(); }

  11. S Automating the Build repository

  12. J J J S Automating the Build repository

  13. J J J S C C C Automating the Build repository

  14. Managing Dependencies The Problem: Crufty Orphans

  15. Managing Dependencies The Problem: Crufty Orphans • generated files are "orphaned" when their introductions get removed.

  16. Managing Dependencies The Problem: Crufty Orphans • generated files are "orphaned" when their introductions get removed. the rub: manual maintenance is tedious and error prone

  17. J J J S C C C Managing Dependencies repository

  18. J J J S C C C Managing Dependencies repository

  19. J J J S C C C Managing Dependencies repository

  20. J J J S C C C Managing Dependencies repository

  21. J J S C C C Managing Dependencies repository

  22. J J S C C Managing Dependencies repository

  23. J J S C C Managing Dependencies repository Done manually this is tedious and prone to error!

  24. Error Handling The Problem: Say What?

  25. Error Handling • Errors in generated files can be hard to trace back to their source The Problem: Say What?

  26. Error Handling • Errors in generated files can be hard to trace back to their source The Problem: Say What? the rub: indirection decreases understandability

  27. Error Reporting public abstract class List { public case Nil public case Cons(private int head, private List tail) } public int length() case List abstract; case Nil { return 0; } case Cons { return 1 + tail.length(); }

  28. Error Reporting public abstract class List { public case Nil public case Cons(private int head, private List tail) } public int length() case List abstract; case Nil { return 0; } case Cons { return 1 + tail.length(); } Legal Sweet

  29. Error Reporting public abstract class List { public case Nil public case Cons(private int head, private List tail) } public int length() case List abstract; case Nil { return 0; } case Cons { return 1 + tail.length(); } case Nil { return 1; } Legal Sweet?

  30. Error Reporting public abstract class List { public case Nil public case Cons(private int head, private List tail) } public int length() case List abstract; case Nil { return 0; } case Cons { return 1 + tail.length(); } case Nil { return 1; } Legal Sweet? Nope…

  31. Error Reporting public abstract class List { public case Nil public case Cons(private int head, private List tail) } public int length() case List abstract; case Nil { return 0; } case Cons { return 1 + tail.length(); } case Nil { return 1; } Conflicting declarations

  32. S S S Error Reporting (from 10,000ft) repository

  33. S S S Error Reporting (from 10,000ft) repository

  34. S S S Error Reporting (from 10,000ft) repository

  35. S S S Error Reporting (from 10,000ft) repository

  36. S S S Error Reporting (from 10,000ft) repository

  37. Plan • Sweet Tooling issues • Introduction to Eclipse • Sweet Plugin at a glance • Implementation notes • Pitch and Caveats • Where next

  38. What is Eclipse? • A universal platform for integrating development tools • “An IDE for everything and nothing in particular” • An open, extensible architecture based on plug-ins

  39. What is Eclipse? (a picture) Another Tool Eclipse Platform Workbench Help Java Development Tools (JDT) JFace SWT Team Sweet Plugin Plug-in Development Environment (PDE) Workspace Debug Stellation Platform Runtime Eclipse Project

  40. What is Eclipse? • Lot’s for free (well almost) • Tight integration of common core tools • CVS, Ant, JUnit, diff • Extensible/open architecture • Third-party plugins • ruby, c#, php, etc. • AOSD (aspectJ, hyperJ, FEAT, JQuery, etc)

  41. Plan • Sweet Tooling issues • Introduction to Eclipse • Sweet Plugin at a glance • Implementation notes • Pitch and Caveats • Where next

  42. Plugin Features • Keyword awareness • Integrated SweetBuilder • Automated House-Cleaning • Artifact Special Treatment • Basic Error-Reporting • Integrated Help

  43. DEMO!! Cross fingers please…

  44. Plan • Sweet Tooling issues • Introduction to Eclipse • Sweet Plugin at a glance • Implementation notes • Pitch and Caveats • Where next

  45. Automating the Build (Impl.) - Eclipse leverages the Observer (Listener) Design Pattern The idea is to register listeners to monitor for changes to resources that should trigger a build.

  46. Automating the Build (Impl.) • Our pipeline:

  47. Automating the Build (Impl.) • Our pipeline: • Ordered list of builders • Insert SweetBuilder before JavaBuilder SB JB

  48. Managing Dependencies (Impl.) Possible Approach: Parallel Worlds

  49. Managing Dependencies (Impl.) Possible Approach: Parallel Worlds Possible Solution: “make clean”

  50. Managing Dependencies (Impl.) - Complete rebuild - Worst case every Java file re-compiled • File-based - subtler: de-values artifacts • In a multi-view setting should be first-class! Parallel Worlds Disadvantages

More Related