| | |
Summary: Relating Graph and Term Rewriting via B¨ohm
Models
Zena M. Ariola
Computer & Information Science Department, University of Oregon
Eugene, OR 974031202
Abstract. Dealing properly with sharing is important for expressing
some of the common compiler optimizations, such as common subex
pressions elimination, lifting of free expressions and removal of invariants
from a loop, as sourcetosource transformations. Graph rewriting is a
suitable vehicle to accommodate these concerns. In [4] we have presented
a term model for graph rewriting systems (GRSs) without interfering
rules, and shown the partial correctness of the aforementioned optimiza
tions. In this paper we define a different model for GRSs, which allows us
to prove total correctness of those optimizations. Differently from [4] we
will discard sharing from our observations and introduce more restric
tions on the rules. We will introduce the notion of B¨ohm tree for GRSs,
and show that in a system without interfering and nonleft linear rules
(orthogonal GRSs), B¨ohm tree equivalence defines a congruence. Total
correctness then follows in a straightforward way from showing that if a
program M contains less sharing than a program N , then both M and
|