DAG Mining for Code Compaction

  • T. Werth
  • M. Wörlein
  • A. Dreweke
  • I. Fischer
  • M. Philippsen

In order to reduce cost and energy consumption, code-size optimization is an important issue for embedded systems. Traditional instruction saving techniques recognize code duplications only in exactly the same order within the program. As instructions can be reordered with respect to their data dependencies, Procedural Abstraction achieves better results on data flow graphs that reflect these dependencies. Since these graphs are always directed acyclic graphs (DAGs), a special mining algorithm for DAGs is presented in this chapter. Using a new canonical representation that is based on the topological order of the nodes in a DAG, the proposed algorithm is faster and uses less memory than the general graph mining algorithm gSpan. Due to its search lattice expansion strategy, an efficient pruning strategy is applied to the algorithm while using it for Procedural Abstraction. Its search for unconnected graph fragments outperforms traditional approaches for code-size reduction.


Database Graph Data Flow Graph Expansion Step Search Lattice Expansion Rule 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Rakesh Agrawal, Tomasz Imielinski, and Arun Swami. Mining association rules between sets of items in large databases. SIGMOD Record, 22(2):207 – 216, May 1993.CrossRefGoogle Scholar
  2. 2.
    Christian Borgelt and Michael R. Berthold. Mining Molecular Fragments: Finding Relevant Substructures of Molecules. In Proc. IEEE Int'l Conf. on Data Mining (ICDM'02), pages 51 – 58, Maebashi City, Japan, December 2002.Google Scholar
  3. 3.
    Y.-L. Chen, H.-P. Kao, and M.-T. Ko. Mining DAG Patterns from DAG Databases. In Proc. 5th Int'l Conf. on Advances in Web-Age Information Management (WAIM '04), volume 3129 of LNCS, pages 579 – 588, Dalian, China, July 2004. Springer.Google Scholar
  4. 4.
    Y. Chi, R. Muntz, S. Nijssen, and J. Kok. Frequent subtree mining — an overview. Fundamenta Informaticae, 66(1–2):161 – 198, 2005.MATHMathSciNetGoogle Scholar
  5. 5.
    Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms, Second Edition. The MIT Press and McGraw-Hill Book Company, 2001.Google Scholar
  6. 6.
    S.K. Debray, W. Evans, R. Muth, and B. De Sutter. Compiler Techniques for Code Compaction. ACM Trans. on Programming Languages and Systems, 22(2):378 – 415, March 2000.CrossRefGoogle Scholar
  7. 7.
    A. Dreweke, M. Wörlein, I. Fischer, D. Schell, T. Meinl, and M. Philippsen. Graph-Based Procedural Abstraction. In Proc. of the 5th Int'l Symp. on Code Generation and Optimization, pages 259 – 270, San Jose, CA, USA, 2007. IEEE.CrossRefGoogle Scholar
  8. 8.
    Scott Fortin. The Graph Isomorphism Problem. Technical Report 20, University of Alberta, Edmonton, Canada, July 1996.Google Scholar
  9. 9.
    M. R. Guthaus, J. S. Ringenberg, D. Ernst, T. M. Austin, T. Mudge, and R. B. Brown. MiBench: A free, commercially representative embedded benchmark suite. In Proc. Int'l Workshop on Workload Characterization (WWC '01), pages 3 – 14, Austin, TX, Dec. 2001.Google Scholar
  10. 10.
    Brendan McKay. Practical Graph Isomorphism. Congressus Numerantium, 30:45 – 87, 1981.MathSciNetGoogle Scholar
  11. 11.
    Steven S. Muchnick. Advanced Compiler Design and Implementation. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 1997.Google Scholar
  12. 12.
    Siegfried Nijssen and Joost N. Kok. A Quickstart in Frequent Structure Mining can make a Difference. In Proc. Tenth ACM SIGKDD Int'l Conf. on Knowledge Discovery and Data Mining (KDD '04), pages 647 – 652, Seattle, WA, USA, August 2004. ACM Press.Google Scholar
  13. 13.
    Robert Endre Tarjan and Anthony E. Trojanowski. Finding a Maximum Independent Set. SIAM Journal on Computing (SICOMP), 6(3):537 – 546, 1977.MATHCrossRefGoogle Scholar
  14. 14.
    A. Termier, T. Washio, T. Higuchi, Y. Tamada, S. Imoto, K. Ohara, and H. Motoda. Mining Closed Frequent DAGs from Gene Network Data with Dryade. In 20th Annual Conf. of the Japanese Society for Artificial Intelligence, pages 1A2 – 3, Tokyo, Japan, June 2006.Google Scholar
  15. 15.
    M. Wörlein, T. Meinl, I. Fischer, and M. Philippsen. A quantitative comparison of the subgraph miners MoFa, gSpan, FFSM, and Gaston. In Proc. Conf. on Knowledge Discovery in Database (PKDD'05), volume 3721 of LNCS, pages 392 – 403, Porto, Portugal, October 2005.Google Scholar
  16. 16.
    Xifeng Yan and Jiawei Han. gSpan: Graph-Based Substructure Pattern Mining. In Proc. IEEE Int'l Conf. on Data Mining (ICDM'02), pages 721 – 724, Maebashi City, Japan, Dec. 2002.Google Scholar
  17. 17.
    David Zaretsky, Gaurav Mittal, Robert P. Dick, and Prith Banerjee. Dynamic Template Generation for Resource Sharing in Control and Data Flow Graphs. In Proc. 19th Int'l Conf. on VLSI Design, pages 465 – 468, Hyderabad, India, January 2006.Google Scholar

Copyright information

© Springer Science+Business Media, LLC 2009

Authors and Affiliations

  • T. Werth
    • 1
  • M. Wörlein
    • 1
  • A. Dreweke
    • 1
  • I. Fischer
    • 2
  • M. Philippsen
    • 1
  1. 1.Programming Systems Group, Computer Science DepartmentUniversity of Erlangen—NurembergGermany
  2. 2.Nycomed Chair for Bioinformatics and Information MiningUniversity of KonstanzGermany

Personalised recommendations