Article Open Access Logo

CODE GENERATION BASED ON COMBINATION OF DYNAMIC PROGRAMMING AND TREE-PATTERN MATCHING ALGORITHMS

Nguyen Chanh Thanh 1
Phan Thi Tuoi 1
Volume & Issue: Vol. 6 No. 7&8 (2003) | Page No.: 39-49 | DOI: 10.32508/stdj.v6i7&8.3342
Published: 2003-08-31

Online metrics


Statistics from the website

  • Abstract Views: 1423
  • Galley Views: 550

Statistics from Dimensions

Copyright The Author(s) 2023. This article is published with open access by Vietnam National University, Ho Chi Minh city, Vietnam. This article is distributed under the terms of the Creative Commons Attribution License (CC-BY 4.0) which permits any use, distribution, and reproduction in any medium, provided the original author(s) and the source are credited. 

Abstract

After compiler-component generators, such as lexical analyzer and parser a code generator is very important. This paper presents algorithm, which transforms expression trees into code for register machines. This algorithm combines a fast top-down tree pattern matching algorithm with dynamic programming, which produces optimal code for any machine in this class, and this algorithm runs in time linearly proportionals to the size of the input data. Additional Key Words and Phrases: Code generation, code generator-generator, code optimization, dynamic programming, pattern matching.

Comments