Affiliation:
1. University of Oxford
2. University of Copenhagen
Abstract
Many classical compiler optimizations can be elegantly expressed using rewrite rules of form:
I
⇒
I
′ if
φ
, where
I
,
I
′ are intermediate language instructions and
φ
is a property expressed in a temporal logic suitable for describing program data flow. Its reading: If the current program π contains an instruction of form
I
at some control point
p
, and if flow condition
φ
is satisfied at
p
, then replace
I
by
I
′.The purpose of this paper is to show how such transformations may be proven correct. Our methodology is illustrated by three familiar optimizations, dead code elimination, constant folding and code motion. The meaning of correctness is that for any program π, if
Rewrite
(π, π′,
p
,
I
⇒
I
′ if φ) then [[π]] = [[π′]], i.e. π and π′ have exactly the same semantics.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
14 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献