This paper proposes a high-level language constituted of a small numbe
r of primitives and macros for describing recursive maximum likelihood
(ML) estimation algorithms, This language is applicable to estimation
problems involving linear Gaussian models or processes taking values
in a finite set, The use of high-level primitives allows the developme
nt of highly modular ML estimation algorithms based on simple numerica
l building blocks, The primitives, which correspond to the combination
of different measurements, the extraction of sufficient statistics, a
nd the conversion of the status of a variable from unknown to observed
, or vice versa, are first defined for linear Gaussian relations speci
fying mixed deterministic/stochastic information about the system vari
ables, These primitives are used to define other macros and are illust
rated by deriving new filtering and smoothing algorithms for linear de
scriptor systems, The primitives are then extended to finite state pro
cesses and used to implement the Viterbi ML state sequence estimator f
or a hidden Markov model.