We present a modular approach to implement adaptive decisions with existing scientific codes. Using a sophisticated system software tool based on the function call interception technique, an external code module is transparently combined with the given program without altering the original code structure, resulting in a newly composed application with extended behavior. This is useful for generalizing codes into using different parameter values or to switch algorithms or implementations at runtime. Applying the proposed method on a biochemical stochastic simulation software package to implement a set of exemplary use cases, which includes changing program parameters, substituting random number generators, and dynamically changing the stochastic simulation method, we demonstrate how effectively new code modules can be plugged in to construct an application with enhanced capabilities. Categories and Subject Descriptors