European Lisp Workshop paper
I submitted a paper to the European Lisp Workshop at ECOOP 2008 and got notice that it was accepted! I'm glad to say that the reviewers provided constructive feedback and didn't write terse, dismissive reviews.
The paper is entitled Adaptive libraries and interactive code generation for Common Lisp and builds on some work I presented at ILC 2007. It is joint work with my thesis supervisors. The paper describes a library for an abstract data type (called a dynamic abstract data type or DADT) whose instances represent multiple abstract data types. When the code is evaluated, instances of the DADT note what operations are done to them and where those operations take place in the source code. Most importantly, when these instances are created, they note where in the code they were created.
In some cases, operations may be ambiguous, in which case the programmer is prompted to indicate which data types the operation is to be applied to. This takes place in the context of a certain place in the code and is remembered for disambiguation purposes in the future.
After the profiling information is analyzed, instances of the DADT are grouped together based on where in the code they were created and a specific type is generated for that place; the type is just a class with a slot for each structure inside the DADT instances that were actually used. Code to operate on that type is also produced.
The code generated is not inserted automatically, however (although there is no reason it couldn't be). Instead, the code is given to the editor to present to the programmer in much the same way as a macroexpansion. The reason for this is that the indicators of where in the source code things happen is actually provided by the editor and not the compiler. The reason for this was to make the changing of places less sensitive to edits. This way, the code generation scheme fits better with the usual workflow of Lisp programming.
I'm in the process of adjusting the paper based on the reviewers' comments, but here is a draft version of the one I submitted, if you're interested. I'll also post some code for this once I've submitted the final version (due July 11). I'm also putting together my thesis and gearing up to start a new job, so I'm rather busy of late.

0 comments:
Post a Comment