Data Slicing: Separating the Heap into Independent Regions

  • Jeremy Condit
  • George C. Necula
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3443)

Abstract

In this paper, we present a formal description of data slicing, which is a type-directed program transformation technique that separates a program’s heap into several independent regions. Pointers within each region mirror the structure of pointers in the original heap; however, each field whose type is a base type (e.g., the integer type) appears in only one of these regions. In addition, we discuss several applications of data slicing. First, data slicing can be used to add extra fields to existing data structures without compromising backward compatibility; the CCured project uses data slicing to preserve library compatibility in instrumented programs at a reasonable performance cost. Data slicing can also be used to improve locality by separating “hot” and “cold” fields in an array of data structures, and it can be used to protect sensitive data by separating “public” and “private” fields. Finally, data slicing can serve as a refactoring tool, allowing the programmer to split data structures while automatically updating the code that manipulates them.

References

  1. 1.
    Austin, T.M., Breach, S.E., Sohi, G.S.: Efficient detection of all pointer and array access errors. In: SIGPLAN Conference on Programming Language Design and Implementation, pp. 290–301 (1994)Google Scholar
  2. 2.
    Carlisle, M.C.: Olden: Parallelizing Programs with Dynamic Data Structures on Distributed-Memory Machines. PhD thesis, Princeton University Department of Computer Science (June 1996)Google Scholar
  3. 3.
    Chilimbi, T.M., Davidson, B., Larus, J.R.: Cache-conscious structure definition. In: SIGPLAN Conference on Programming Language Design and Implementation, pp. 13–24 (1999)Google Scholar
  4. 4.
    Condit, J., Harren, M., McPeak, S., Necula, G.C., Weimer, W.: CCured in the real world. In: SIGPLAN Conference on Programming Language Design and Implementation (June 2003)Google Scholar
  5. 5.
    Crary, K., Weirich, S., Morrisett, J.G.: Intensional polymorphism in type-erasure semantics. In: International Conference on Functional Programming, pp. 301–312 (1998)Google Scholar
  6. 6.
    Duggan, D.: Dynamic typing for distributed programming in polymorphic languages. ACM Transactions on Programming Languages and Systems 21(1), 11–45 (1999)CrossRefGoogle Scholar
  7. 7.
    Harper, R., Morrisett, G.: Compiling polymorphism using intensional type analysis. In: SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 130–141 (1995)Google Scholar
  8. 8.
    Howard, M., LeBlanc, D.: Writing Secure Code. Microsoft (2002)Google Scholar
  9. 9.
    Jones, R.W.M., Kelly, P.H.J.: Backwards-compatible bounds checking for arrays and pointers in C programs. AADEBUG (1997)Google Scholar
  10. 10.
    Necula, G.C., McPeak, S., Weimer, W.: CCured: Type-safe retrofitting of legacy code. In: SIGPLAN–SIGACT Symposium on Principles of Programming Languages, pp. 128–139 (2002)Google Scholar
  11. 11.
    Patil, H., Fischer, C.N.: Efficient run-time monitoring using shadow processing. In: Automated and Algorithmic Debugging, pp. 119–132 (1995)Google Scholar
  12. 12.
    Tip, F.: A survey of program slicing techniques. Journal of programming languages 3, 121–189 (1995)Google Scholar
  13. 13.
    Truong, D.N., Bodin, F., Seznec, A.: Improving cache behavior of dynamically allocated data structures. In: IEEE PACT, p. 322 (1998)Google Scholar
  14. 14.
    Weiser, M.: Program slicing. IEEE Transactions on Software Engineering 10, 352–357 (1984)CrossRefGoogle Scholar
  15. 15.
    Yong, S.H., Horwitz, S.: Protecting C programs from attacks via invalid pointer dereferences. In: SIGSOFT International Symposium on Foundations of Software Engineering, pp. 307–316 (2003)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Jeremy Condit
    • 1
  • George C. Necula
    • 1
  1. 1.Department of Electrical Engineering and Computer ScienceUniversity of CaliforniaBerkeley

Personalised recommendations