Monday, April 23, 2012

Interactive computation (part 2)

''First-order interactive programming

Interactive programming is a method for implementing programming languages that supports an interactive, exploratory style of program development and debugging. The basic idea is to reify the steps of a computation into a persistent data structure which can be explored interactively, and which reacts to changes to inputs like a spreadsheet.
Reifying the computation associates the computed value with provenance information, which is essential to effective program comprehension and debugging. Making the data structure persistent means that it can evolve incrementally, preserving existing structure where possible, allowing the programmer to apply fixes to a program in the middle of a complex debugging activity without having to restart the program and lose browsing context. Interactive programming lies at the intersection of incremental computation, software visualisation and reactive programming.'' [source, more details here] by Roly Perera.


The ideas presented in the paper above are great, and I would really like to implement some of them, via a meta-interpreter of some simple language like javascript (i.e. using an interpreter design pattern).
However many of the concepts relate to functional programming, while I would be more interested in imperative languages. BTW: I created a GUI where many of the ideas discussed by Perera are implemented, only it was very complex to model term rewriting with branching in a visual environment, so I got stuck in various occasions. The project is called FreeSketch and it is still going on... actually after reading the great work of Perera I'm more stimulated in resuming the work on FS :)

''Self-Adjusting Computation
Self-adjusting computation refers to a model of computing where computations can automatically respond to changes to their data.   The basic abstractions and algorithms for self-adjusting computation were invented during my Ph.D. jointly with Guy Blelloch and Robert Harper.  In subsequent work, we have extended these techniques to imperative (effectful) computations and traceable data structures, developed programming languages and systems support  self-adjusting computation. ... '' [source] by Umut A. Acar.


I will read more, then whenever I have time I will try to implement a fragment of an imperative language that enables interactive programming, to show how it could be done, in a practical unoptimized way ;)

2 comments:

limaCAT said...

Am I wrong or your Freesketch project saw the great apocalypse of 1999, the millennium bug and will soon see the Mayan apocalypse?

#IwasThere

Andrea Valente said...

LOL
Considering that I had circa 1 reboot per year of FreeSketch, since perhaps 2005, and it is still very difficult to see the end of it... I guess it sounds a bit like nuclear fusion: "ready in 10 years (since the 50s)" :>

Post a Comment