A Program Inverter for a Functional Language with Equality and Constructors [chapter]

Robert Glück, Masahiko Kawabe
2003 Lecture Notes in Computer Science  
We present a method for automatic program inversion in a first-order functional programming language. We formalize the transformation and illustrate it with several examples including the automatic derivation of a program for run-length decoding from a program for runlength encoding. This derivation is not possible with other automatic program inversion methods. One of our key observations is that the duplication of values and testing of their equality are two sides of the same coin in program
more » ... nversion. This leads us to the design of a new self-inverse primitive function that considerably simplifies the automatic inversion of programs.
doi:10.1007/978-3-540-40018-9_17 fatcat:mjwxpvxz2bcybiugckq47ethku