Lecture 15: Bidirectional Programming

19 November 2010

Motivations and concepts behind bidirectional programming. Motivations include the classic database view-update problem, as well as software engineering (“round-tripping” in model-driven development), user interface construction (implementing the Model-View-Controller pattern), data synchronization and marshalling. The basic requirements for get and put functions satisfying a loose specification. Introducing Boomerang and its semantic foundations based on lenses which encapsulate get, put and create functions. A first Boomerang example.

Homework

  • Show that the GetPut, PutGet and CreateGet laws are satisfied by the simple lenses defined on the slides.
  • Download Boomerang from the Harmony Project and try it out.

At the link above, you’ll also find pointers to research papers and slides about Boomerang. (The slides are definitely worth looking at as they have a more detailed exposition of possible behaviours for put and get functions than we went into in the lecture — they are also more pretty to look at than mine!)