Are there term rewrite systems, that can rewrite complex lambda term (with nested function application) into some other lambda terms, I.e. reorde function application and, possibly, introduce new variables and add some additional functions into the final term? Google is no help here, because it says, that lamda calculi itself is term rewriting system? Maybe I should use lamda calculus on the lambda calculus? Any reference would be great, some pointers. I can study the field further myself.
E.g I would like start by complex termi with nested functions Sentence(vp(John, walks)) and end with another complex term walks#(John). There may be or may not be some kind of semantic correspondence between input and output. I am just seek i ng framework and scientific tradition that allows to specify such transformations and execute them.