A Method for Automatic Program Inversion Based on LR(0) Parsing

  • Authors:
  • Robert Glück;Masahiko Kawabe

  • Affiliations:
  • DIKU, Dept. of Computer Science, University of Copenhagen, DK-2100 Copenhagen, Denmark. glueck@acm.org (Corresp.);Graduate School of Science and Engineering, Waseda University, Tokyo 169-8555, Japan. kawabe@suou.waseda.jp

  • Venue:
  • Fundamenta Informaticae - Program Transformation: Theoretical Foundations and Basic Techniques. Part 1
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

We describe a method for automatic program inversion of first-order functional programs based on methods of LR(0) parsing. We formalize the transformation and illustrate it with several example programs. We approach one of the main problems of automatic program inversion - the elimination of nondeterminism - by viewing an inverse program as a context-free grammar. We apply LR-based parsing methods to turn a nondeterministic program into a deterministic program. This improves the efficiency of the inverse programs and greatly expands the application range of our earlier method for program inversion.