The following article is to appear in ISBA Bulletin, Vol. 10 No. 3 (2003):
WinBUGS Development Interface (WBDev)
Imperial College School of Medicine, London, UK
Version 1.4 of WinBUGS was released in January 2003 and contains some major new features, in particular the long-awaited scripting facility, which allows the software to be run in 'batch-mode' and, also, to be called remotely from within other packages. The software can be downloaded from http://www.mrc-bsu.cam.ac.uk/bugs/ (currently, new registrations are coming in at a rate of around 500 per month). However, this is intended to be the last major release of WinBUGS (in its current packaged, stand-alone form) for some time. Development work is now focused instead in two main areas: (i) decoupling and documenting of core components to make them more accessible/deployable from within other software/programming environments, e.g. R ; and (ii) peripheral extensions such as specialized interfaces for complex models. We believe that the peripheral areas of the software's source code have now reached a point where they can be considered more or less static; that is, we do not envisage any significant changes to 'top-level' components over the coming years. Hence, we are now at a stage where we can safely allow users of the software access to those peripheral areas of code. The idea is to empower the user to facilitate and/or expedite their own research by implementing specialized labour- and/or computation-saving devices. Some of these new software components will undoubtedly be of use to other WinBUGS users working in similar areas. By encouraging new authors to share their work across the user-community we hope to foster within that community a desire to contribute to (and eventually take responsibility for) the overall evolution of the software.
The release of the WinBUGS Development Interface (WBDev) represents our first step towards establishing a community of contributors to the software. The interface is designed to allow restricted access to areas of the WinBUGS source that have been used for defining elements of the BUGS language, i.e. the various distributions and functions that are available for specifying statistical models. Hence, users may implement their own specialized functions and distributions, 'hard-wiring' them into the WinBUGS framework via compiled Pascal code. There are three main advantages to doing this: first, function evaluations associated with 'hard-wired' components can be computed much more quickly than with their BUGS-language counterparts; second, the full flexibility of a general-purpose computer language is available for specifying each new component, and so piecewise functions, for example, can be specified straightforwardly whereas their specification via the BUGS language (using the "step(.)" function) can be somewhat awkward; finally, the practice of hiding the details of complex entities within 'hard-wired' components can lead to vastly simplified WinBUGS code for the required statistical model, which reduces the likelihood of coding errors occurring and is easier both to read and to modify.
As mentioned above, access to the source code is currently restricted. Most importantly, this has allowed us to hide, from the budding WinBUGS developer, much of the complex detail that is required in order to implement any new distributions or functions; thus the implementation process is, we believe, as simple as it could possibly be for the user. Also, restricted access makes the project more manageable and allows us time to gauge the amount of effort/documentation that might be required to get people writing even more ambitious extensions to the software, such as new MCMC samplers, or specialized user-interfaces for model specification and/or graphical diagnostics. Depending on the success of these initiatives, we plan, eventually, to release a full version of WinBUGS as 'open-source'.
A copy of WBDev can be obtained by following relevant links from the WinBUGS Development home-page: http://winbugs-development.mrc-bsu.cam.ac.uk/. At the time of writing this article, the interface supports the implementation of new functions only, but the facility to incorporate new distributions into the BUGS language should be available very soon. A set of 'shared components' can also be downloaded from the above web-site; these are new distributions and functions that have been written by WinBUGS users, using WBDev, and then submitted for public release. ISBA Bulletin readers are invited to visit the WBDev web-site and have a go at writing their own WinBUGS functions and distributions -- any feedback and/or suggestions would be very welcome! (Note that the interface comes with its own step-by-step, tutorial-style documentation.) This is our first step towards opening up the WinBUGS software to the user community; the success of this venture and, ultimately, the long-term survival of the software will depend very much on the active participation of the software's users.
 R. Ihaka and R. Gentleman. R: A language for data analysis and graphics. Journal of Computational and Graphical Statistics, 5:299--314, 1996.