An Implementation of View Updates (Using a Language of Bidirectional Transformations) This is an implementation of the frontend of a relational database: it includes an SQL parser and a (partial) translation from SQL into the lens language used to manipulate data internally. (See the accompanying report for more details.) There is no query optimization or persistence (and thus no buffer pool management, concurrency control, etc.). It supports many queries and updates on single relations, and contains partial support for updates of equijoins using primary keys. STATUS The lenses used to implement the supported subset of SQL are complete. However, there are a number of problems with the presentation code. While relations are represented as labeled trees, they are presented to users in the typical rows-and-columns fashion. This presentation currently makes some assumptions about the forms of trees used internally. Moreover, the code that executes updates also requires that the internal trees conform to a number of specifications (e.g. the ordering of children for certain nodes). These constraints became more and more difficult to maintain toward the end of the project, and (unfortunately) this code is in desperate need of a redesign. RUNNING This implementation was built using Standard ML of New Jersey (Version 110.0.7), but should run with any implementation of Standard ML. The Loop structure (see loop-sig.sml and loop.sml) contains the main user interface. If you'd like to run the code, look there first. One note to those brave enough to run the code: the SQL parser expects all SQL keywords to be lower case. See the examples in the sql/ directory for the sorts of things the parser will accept. BUGS There are number of other aspects of the implementation that are incomplete. They are marked "FIXME" in the source. ACKNOWLEDGMENTS Thanks to Benjamin Pierce, Alan Schmitt, Michael Greenwald, and Jonathan Moore whose work this implementation is based on. Also, thanks to Chris Okasaki, Robert Harper, Tom Murphy VII, and Kevin Watkins whose parser code is included with this implementation. Special thanks to Tom7 who took the time to answer my questions about the parser. Daniel Spoonhower spoons+@cs.cmu.edu 3 May 2004