We reformulate the Korf-Eppstein method for automatic inversion of
first-order functional programs using a structural operational
semantics and compare it with the program inversion method
described by Gries. We analyze the method and suggest possible
extensions. The method is noteworthy in that it was used to
construct the first automatic program inverter described in the
literature. The key features of the Korf-Eppstein method are the
simultaneous inversion of an injective system of functions, an
equation-oriented transformation, and the use of postcondition
inference heuristics.
Abstract. 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 inversion. This leads us to the design of a new self-inverse primitive function that considerably simplifies the automatic inversion of programs.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.