Extending algebraic modelling languages for stochastic programming. Algebraic modelling languages have gained wide acceptance and use by researchers and practitioners in mathematical programming. At a basic level, these languages can define stochastic programming (SP) models by constructing their deterministic equivalents. Unfortunately, this leads to very large model data instances. We propose instead a direct approach in which the random values of the model coefficients and the stage structure of the decision variables and constraints are “overlaid” on the underlying deterministic (core) model of the SP problems. This leads to a natural definition of the SP model, while the resulting generated instance is also a compact representation of the otherwise large problem data. As an example of the workability of our approach, we describe the design of a stochastic extension for the AMPL language that enables the formulation of two-stage and multistage scenario-based recourse problems. This extended language, which we call SAMPL, is in turn embedded in a stochastic programming integrated environment that facilitates modelling and investigation of SP problems