Abstraet. Imperative programs can be inverted directly from their forwarddirected program code with the use of logical inference. The relational semantics of imperative computations treats programs as logical relations over the observable state of the environment, which is taken to be the state of the variables in memory. Program relations denote both forward and backward computations, and the direction of the computation depends upon the instantiation pattern of arguments in the relation. This view of inversion has practical applications when the relational semantics is treated as a logic program. Depending on the logic programming inference scheme used, execution of this relational program can compute the inverse of the imperative program. A number of nontrivial imperative computations can be inverted with minimal logic programming tools.
Ross REF encodes relational semantics of programs and uses logic programming to compute inverses.
Running programs backwards: The logical inversion of imperative computation
Formal Aspects of Computing
Formal Aspects of Computing
Computer Science