Reversible Abstract Machines -- Synthesizing Loops for Program Inversion -- Frugal