Framework for genetic programming over typed expressions