Shape Derivatives in UFL

There is an alternative package for shape derivative called FEmorph, which is the predecessor to the ufl derivative and the dolfin-adjoint implementation.

I worked on cleaning up that software a couple of years back. I do not recall if it does the pull back or not, I guess have a look at the implementation paper.

The code, as i linked to above, is not actively maintained, so it is not optimal to use.

Anyhow, concluding, i would say that what you are asking for might not be implemented. I am still curious as to what the content of your function/expression is going to be (as in many cases, you could frame it as a projection of a mixture of ufl expressions/constants)