The Building Block Basis (BBB) has recently been shown to be extremely useful in characterising the dynamics of genetic algorithms operating on fixed-length strings. In this paper we show that there is a natural generalisation of the BBB for variable-length strings and program trees.