A higher-order strategy for eliminating common subexpressions

R. Daniel Resler, Victor Winter

Research output: Contribution to journalArticle

Abstract

Optimizing compilers often perform an operation known as common subexpression elimination to improve code efficiency. Typically this is accomplished either by pruning a directed acyclic graph to replace eliminated subexpressions by memory fetches of stored values or by using partial-redundancy elimination, a data-flow analysis method. In this paper a higher-order strategic method is presented that rewrites expression trees to eliminate common subexpressions using equivalences in the lambda calculus. This approach offers several advantages-it is intuitive, transformations can be defined and applied within a high-level rewrite system, and it uses transformations for which correctness preservation can be proven.

Original languageEnglish (US)
Pages (from-to)341-364
Number of pages24
JournalComputer Languages, Systems and Structures
Volume35
Issue number4
DOIs
StatePublished - Dec 1 2009

Fingerprint

Data flow analysis
Redundancy
Data storage equipment

Keywords

  • Common subexpression elimination
  • Distributed data problem
  • Higher-order strategies
  • Program transformation
  • Rewriting
  • Strategic programming

ASJC Scopus subject areas

  • Software
  • Computer Networks and Communications

Cite this

A higher-order strategy for eliminating common subexpressions. / Resler, R. Daniel; Winter, Victor.

In: Computer Languages, Systems and Structures, Vol. 35, No. 4, 01.12.2009, p. 341-364.

Research output: Contribution to journalArticle

Resler, R. Daniel ; Winter, Victor. / A higher-order strategy for eliminating common subexpressions. In: Computer Languages, Systems and Structures. 2009 ; Vol. 35, No. 4. pp. 341-364.
@article{2462e6d4f660411da2e0fa278006ca3c,
title = "A higher-order strategy for eliminating common subexpressions",
abstract = "Optimizing compilers often perform an operation known as common subexpression elimination to improve code efficiency. Typically this is accomplished either by pruning a directed acyclic graph to replace eliminated subexpressions by memory fetches of stored values or by using partial-redundancy elimination, a data-flow analysis method. In this paper a higher-order strategic method is presented that rewrites expression trees to eliminate common subexpressions using equivalences in the lambda calculus. This approach offers several advantages-it is intuitive, transformations can be defined and applied within a high-level rewrite system, and it uses transformations for which correctness preservation can be proven.",
keywords = "Common subexpression elimination, Distributed data problem, Higher-order strategies, Program transformation, Rewriting, Strategic programming",
author = "Resler, {R. Daniel} and Victor Winter",
year = "2009",
month = "12",
day = "1",
doi = "10.1016/j.cl.2008.06.004",
language = "English (US)",
volume = "35",
pages = "341--364",
journal = "Journal of Computer Languages",
issn = "2665-9182",
publisher = "Elsevier Ltd",
number = "4",

}

TY - JOUR

T1 - A higher-order strategy for eliminating common subexpressions

AU - Resler, R. Daniel

AU - Winter, Victor

PY - 2009/12/1

Y1 - 2009/12/1

N2 - Optimizing compilers often perform an operation known as common subexpression elimination to improve code efficiency. Typically this is accomplished either by pruning a directed acyclic graph to replace eliminated subexpressions by memory fetches of stored values or by using partial-redundancy elimination, a data-flow analysis method. In this paper a higher-order strategic method is presented that rewrites expression trees to eliminate common subexpressions using equivalences in the lambda calculus. This approach offers several advantages-it is intuitive, transformations can be defined and applied within a high-level rewrite system, and it uses transformations for which correctness preservation can be proven.

AB - Optimizing compilers often perform an operation known as common subexpression elimination to improve code efficiency. Typically this is accomplished either by pruning a directed acyclic graph to replace eliminated subexpressions by memory fetches of stored values or by using partial-redundancy elimination, a data-flow analysis method. In this paper a higher-order strategic method is presented that rewrites expression trees to eliminate common subexpressions using equivalences in the lambda calculus. This approach offers several advantages-it is intuitive, transformations can be defined and applied within a high-level rewrite system, and it uses transformations for which correctness preservation can be proven.

KW - Common subexpression elimination

KW - Distributed data problem

KW - Higher-order strategies

KW - Program transformation

KW - Rewriting

KW - Strategic programming

UR - http://www.scopus.com/inward/record.url?scp=67649274419&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=67649274419&partnerID=8YFLogxK

U2 - 10.1016/j.cl.2008.06.004

DO - 10.1016/j.cl.2008.06.004

M3 - Article

AN - SCOPUS:67649274419

VL - 35

SP - 341

EP - 364

JO - Journal of Computer Languages

JF - Journal of Computer Languages

SN - 2665-9182

IS - 4

ER -