| |||||||||||||||||||||||||
![]() |
![]() |
||||||||||||||||||||||||
סדנה במדעי המחשב
Workshop in Computer Science |
0368-3500-34 | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
מדעים מדויקים | |||||||||||||||||||||||||
|
Workshop in CS: Designing and Implementing Domain Specific Programming Languages
Instructors: Shachar Itzhaky & Mooly Sagiv
Teams: 2-3 students
Submission date: TBD
It is well known that Domain Specific Languages can drastically increase software productivity. However, they are still not widely used. First the cost of implementing an interpreter or a compiler for a domain specific language may be high. Second, it is possible to provide more efficient solutions using low level programming languages such as C. Finally, defining an appropriate semantics for a domain specific language may itself be tricky.
In this project, the students will design and implement a domain specific language. The goal is a DSL for GUI layout planning. We believe that a DSL is perfect for specifying the positioning of widgets on the window area, especially when the size of the window can be changed by the user at runtime.
If you ever tried to read Swing code you'd know what we mean.
The instructors will define a base DSL and provide a parser. The base DSL is already available from … The DSL expresses common UI idioms such as: widgets anchored in one of the four corners of the window, widgets aligned to the middle, widgets filling the entire free space left in the window after laying out other widgets (so-called "client area", much like the box containing this message text in Outlook), scrollable areas, toolbars, menus, etc.
The students will critique the definition and then implement the DSL in one of the 3 platforms: Scala, Python, and Haskell. All three languages have packages of "parser combinators", and all three have documented GUI facilities. Then they will implement one program for common UIs -- a word processor, a web browser, a spreadsheet, a mail client, a calendar, a media player, and any other idea the instructors will see fit, using the host language and the DSL. The programs will demonstrate the expressive power of DSLs. They will also be forced to integrate the DSL with its mother tongue, e.g. for accessing the web, read lists of fonts and other system operations. These features will be added as time allows.
No prior knowledge in Scala, Haskell, and Python is needed. The students will study one of these languages in the workshop with the help of the instructors. The chance to experience more exotic languages is an additional advantage of this workshop.