Transforming Mathematical Models Using Declarative Reformulation Rules