Identifying Dynamic Data Structures by Learning Evolving Patterns in Memory

  • David H. White
  • Gerald Lüttgen
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7795)


We investigate whether dynamic data structures in pointer programs can be identified by analysing program executions only. This paper describes a first step towards solving this problem by applying machine learning and pattern recognition techniques to analyse executions of C programs. By searching for repeating temporal patterns in memory caused by multiple invocations of data-structure operations, we are able to first locate and then identify these operations. Applying a prototypic tool implementing our approach to pointer programs that employ, e.g., lists, queues and stacks, we show that the identified operations can accurately determine the data structures used.


Program comprehension pointer programs dynamic data structures machine learning pattern recognition 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Acidblood IRC Bot, (accessed September 30, 2012)
  2. 2.
    Cozzie, A., Stratton, F., Xue, H., King, S.T.: Digging for data structures. In: OSDI, pp. 255–266. USENIX (2008)Google Scholar
  3. 3.
    Deshpande, P.S., Kakde, O.G.: C & Data Structures. Charles River (2004)Google Scholar
  4. 4.
    Evolving Objects (EO), (accessed September 30, 2012)
  5. 5.
    Ghiya, R., Hendren, L.J.: Is it a tree, a DAG, or a cyclic graph? A shape analysis for heap-directed pointers in C. In: POPL, pp. 1–15. ACM (1996)Google Scholar
  6. 6.
    Grünwald, P.D.: The Minimum Description Length Principle. MIT Press (2007)Google Scholar
  7. 7.
    Guo, B., Vachharajani, N., August, D.I.: Shape analysis with inductive recursion synthesis. In: PLDI, pp. 256–265. ACM (2007)Google Scholar
  8. 8.
    Heinen, J., Noll, T., Rieger, S.: Juggrnaut: Graph grammar abstraction for unbounded heap structures. ENTCS 266, 93–107 (2010)Google Scholar
  9. 9.
    Jump, M., McKinley, K.S.: Dynamic shape analysis via degree metrics. In: ISMM, pp. 119–128. ACM (2009)Google Scholar
  10. 10.
    Jung, C., Clark, N.: DDT: design and evaluation of a dynamic program analysis for optimizing data structure usage. In: MICRO, pp. 56–66. ACM (2009)Google Scholar
  11. 11.
    MP3 File Reorganizer, (accessed September 30, 2012)
  12. 12.
    Necula, G.C., McPeak, S., Rahul, S.P., Weimer, W.: CIL: Intermediate Language and Tools for Analysis and Transformation of C Programs. In: Nigel Horspool, R. (ed.) CC 2002. LNCS, vol. 2304, pp. 213–228. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  13. 13.
    Olden Benchmark, (accessed September 30, 2012)
  14. 14.
    Pheng, S., Verbrugge, C.: Dynamic data structure analysis for Java programs. In: ICPC, pp. 191–201. IEEE (2006)Google Scholar
  15. 15.
    Raman, E., August, D.I.: Recursive data structure profiling. In: MSP, pp. 5–14. ACM (2005)Google Scholar
  16. 16.
    Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: LICS, pp. 55–74. IEEE (2002)Google Scholar
  17. 17.
    Sagiv, S., Reps, T.W., Wilhelm, R.: Parametric shape analysis via 3-valued logic. TOPLAS 24(3), 217–298 (2002)CrossRefGoogle Scholar
  18. 18.
    Sedgewick, R.: Algorithms in C – Parts 1-4, 3rd edn. Addison-Wesley (1998)Google Scholar
  19. 19.
    Weiss, M.A.: Data structures and algorithm analysis in C. Cummings (1993)Google Scholar
  20. 20.
    Wolf, J.: C von A bis Z. Galileo Computing (2009)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • David H. White
    • 1
  • Gerald Lüttgen
    • 1
  1. 1.Software Technologies GroupUniversity of BambergGermany

Personalised recommendations