The DOTS code generator takes as input the user's specification of the target knowledge-acquisition tool and produces code for the target knowledge-acquisition tool. The code generator is based on a set of transformation rules that maps abstract-architecture specifications (e.g., components descriptions) into constructs constituting the target knowledge-acquisition tool. The transformation rules are similar to those used by the target knowledge-acquisition tools for knowledge-base generation. The code generated is intended to run with a run-time library consisting of core functions required by the target knowledge-acquisition tool-for example, functions for window management, internal bookkeeping, persistent storage, and knowledge-base generation.