The implementation of differentiation by term rewriting explained in section 3.1 can be downloaded here as a program written in the Maude language.