Iterative-Free Program Analysis

Mizuhito Ogawat, Zhenjiang Hu, Isao Sasano

Research output: Chapter in Book/Report/Conference proceedingConference contribution

3 Citations (Scopus)

Abstract

Program analysis is the heart of modern compilers. Most control flow analyses are reduced to the problem of finding a fixed point in a certain transition system, and such fixed point is commonly computed through an iterative procedure that repeats tracing until convergence. This paper proposes a new method to analyze programs through recursive graph traversals instead of iterative procedures, based on the fact that most programs (without spaghetti GOTO) have well-structured control flow graphs, graphs with bounded tree width. Our main techniques are; an algebraic construction of a control flow graph, called SP Term, which enables control flow analysis to be defined in a natural recursive form, and the Optimization Theorem, which enables us to compute optimal solution by dynamic programming. We illustrate our method with two examples; dead code detection and register allocation. Different from the traditional standard iterative solution, our dead code detection is described as a simple combination of bottom-up and top-down traversals on SP Term. Register allocation is more interesting, as it further requires optimality of the result. We show how the Optimization Theorem on SP Terms works to find an optimal register allocation as a certain dynamic programming.

Original languageEnglish
Title of host publicationProceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP
Pages111-123
Number of pages13
Volume8
Publication statusPublished - 2003
Externally publishedYes
EventEighth ACM SIGPLAN International Conference on Functional Programming - Uppsala
Duration: 2003 Aug 252003 Aug 29

Other

OtherEighth ACM SIGPLAN International Conference on Functional Programming
CityUppsala
Period03/8/2503/8/29

Fingerprint

Flow graphs
Dynamic programming
Flow control

Keywords

  • Catamorphism
  • Control Flow Graph
  • Dynamic Programming
  • Program Analysis
  • Register Allocation
  • SP Term
  • Tree Width

ASJC Scopus subject areas

  • Computer Science(all)

Cite this

Ogawat, M., Hu, Z., & Sasano, I. (2003). Iterative-Free Program Analysis. In Proceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP (Vol. 8, pp. 111-123)

Iterative-Free Program Analysis. / Ogawat, Mizuhito; Hu, Zhenjiang; Sasano, Isao.

Proceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP. Vol. 8 2003. p. 111-123.

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Ogawat, M, Hu, Z & Sasano, I 2003, Iterative-Free Program Analysis. in Proceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP. vol. 8, pp. 111-123, Eighth ACM SIGPLAN International Conference on Functional Programming, Uppsala, 03/8/25.
Ogawat M, Hu Z, Sasano I. Iterative-Free Program Analysis. In Proceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP. Vol. 8. 2003. p. 111-123
Ogawat, Mizuhito ; Hu, Zhenjiang ; Sasano, Isao. / Iterative-Free Program Analysis. Proceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP. Vol. 8 2003. pp. 111-123
@inproceedings{10008238ab154583b622911b45002579,
title = "Iterative-Free Program Analysis",
abstract = "Program analysis is the heart of modern compilers. Most control flow analyses are reduced to the problem of finding a fixed point in a certain transition system, and such fixed point is commonly computed through an iterative procedure that repeats tracing until convergence. This paper proposes a new method to analyze programs through recursive graph traversals instead of iterative procedures, based on the fact that most programs (without spaghetti GOTO) have well-structured control flow graphs, graphs with bounded tree width. Our main techniques are; an algebraic construction of a control flow graph, called SP Term, which enables control flow analysis to be defined in a natural recursive form, and the Optimization Theorem, which enables us to compute optimal solution by dynamic programming. We illustrate our method with two examples; dead code detection and register allocation. Different from the traditional standard iterative solution, our dead code detection is described as a simple combination of bottom-up and top-down traversals on SP Term. Register allocation is more interesting, as it further requires optimality of the result. We show how the Optimization Theorem on SP Terms works to find an optimal register allocation as a certain dynamic programming.",
keywords = "Catamorphism, Control Flow Graph, Dynamic Programming, Program Analysis, Register Allocation, SP Term, Tree Width",
author = "Mizuhito Ogawat and Zhenjiang Hu and Isao Sasano",
year = "2003",
language = "English",
volume = "8",
pages = "111--123",
booktitle = "Proceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP",

}

TY - GEN

T1 - Iterative-Free Program Analysis

AU - Ogawat, Mizuhito

AU - Hu, Zhenjiang

AU - Sasano, Isao

PY - 2003

Y1 - 2003

N2 - Program analysis is the heart of modern compilers. Most control flow analyses are reduced to the problem of finding a fixed point in a certain transition system, and such fixed point is commonly computed through an iterative procedure that repeats tracing until convergence. This paper proposes a new method to analyze programs through recursive graph traversals instead of iterative procedures, based on the fact that most programs (without spaghetti GOTO) have well-structured control flow graphs, graphs with bounded tree width. Our main techniques are; an algebraic construction of a control flow graph, called SP Term, which enables control flow analysis to be defined in a natural recursive form, and the Optimization Theorem, which enables us to compute optimal solution by dynamic programming. We illustrate our method with two examples; dead code detection and register allocation. Different from the traditional standard iterative solution, our dead code detection is described as a simple combination of bottom-up and top-down traversals on SP Term. Register allocation is more interesting, as it further requires optimality of the result. We show how the Optimization Theorem on SP Terms works to find an optimal register allocation as a certain dynamic programming.

AB - Program analysis is the heart of modern compilers. Most control flow analyses are reduced to the problem of finding a fixed point in a certain transition system, and such fixed point is commonly computed through an iterative procedure that repeats tracing until convergence. This paper proposes a new method to analyze programs through recursive graph traversals instead of iterative procedures, based on the fact that most programs (without spaghetti GOTO) have well-structured control flow graphs, graphs with bounded tree width. Our main techniques are; an algebraic construction of a control flow graph, called SP Term, which enables control flow analysis to be defined in a natural recursive form, and the Optimization Theorem, which enables us to compute optimal solution by dynamic programming. We illustrate our method with two examples; dead code detection and register allocation. Different from the traditional standard iterative solution, our dead code detection is described as a simple combination of bottom-up and top-down traversals on SP Term. Register allocation is more interesting, as it further requires optimality of the result. We show how the Optimization Theorem on SP Terms works to find an optimal register allocation as a certain dynamic programming.

KW - Catamorphism

KW - Control Flow Graph

KW - Dynamic Programming

KW - Program Analysis

KW - Register Allocation

KW - SP Term

KW - Tree Width

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

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

M3 - Conference contribution

VL - 8

SP - 111

EP - 123

BT - Proceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP

ER -