Thursday, June 26, 2008

Progress Updating to PLT Scheme V4.0

Now that PLT Scheme is official released, I am updating the science, simulation, and inference collections to be compatible with the new version. These changes are incompatible with pre-V4.0 versions of PLT Scheme and will be stored in the PLaneT 4.x repository. Anyone using pre-V4.0 code should continue to use the versions in the PLaneT 3xx repository. V4.0 compatible versions of the science collection (Version 3.0) and simulation collection (Version 3.0) have been released already. I am now working on the V4.0 version of the inference collection (Version 2.0) and expect to release it this weekend.

There were several rather simple global changes that occurred in all of the code. For example, using the new #lang construct for all modules, using modules for all examples, hash table name changes, changes to require constructs, some contract changes (in particular union/c becomes or/c), and define-struct syntactic changes.

Some other changes were more difficult. The changes to keywords and keyword parameters required individual attention to each specific usage. Fortunately, much of my usage of keyword parameters is in macros and those still work the same in V4.0. I often use keywords as special values (e.g. #:now). These used to self evaluate, but now require quoting. Fortunately, these don't occur in user code. The other major problem is with mutable lists. These also have to be looked at on an individual bases. In some cases, I reverted to immutable lists (e.g. when using reverse! to reorder a constructed list being returned from a function) and in other cases I converted them to explicit mutable lists. It can be a chore to track down all of the references in a large body of code.

One big remaining issue is converting the documentation over to use Scribble. Unfortunately, the existing HTML documentation for PLaneT packages is not made available in the new Help Desk. [I honestly think that they should retain the ability for developers to distribute HTML documentation for PLaneT packages.]

PLT Scheme Science Collection: The science collection was rather straightforward to convert since I had kept the older versions compatible with both 372 and 399 (the V4.0 pre-release). Version 2.9 is the last pre-V4.0 compatible version and Version 3.0 is the new V4.0 compatible version.

PLT Scheme Simulation Collection: The simulation collection was more complicated to convert since it mutates lists in the implementation of the event list and variable histories (and probably a few others that I don't remember). I also had some problems with keywords since I had implemented my own keyword parameter scheme before it was added into PLT Scheme. Version 2.2 is the last pre-V4.0 compatible version and Version 3.0 is the new V4.0 compatible version.

PLT Scheme Inference Collection: The inference collection makes extensive use of list mutation and I am still tracking down and fixing them on an individual basis. I expect to have the V4.0 compatible version out this weekend.

If anybody runs into any problems with any of these packages, please let me know.

Labels: