Advertisement

System Dependence Graphs in Sequential Erlang

  • Josep Silva
  • Salvador Tamarit
  • César Tomás
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7212)

Abstract

The system dependence graph (SDG) is a data structure used in the imperative paradigm for different static analysis, and particularly, for program slicing. Program slicing allows us to determine the part of a program (called slice) that influences a given variable of interest. Thanks to the SDG, we can produce precise slices for interprocedural programs. Unfortunately, the SDG cannot be used in the functional paradigm due to important features that are not considered in this formalism (e.g., pattern matching, higher-order, composite expressions, etc.). In this work we propose the first adaptation of the SDG to a functional language facing these problems. We take Erlang as the host language and we adapt the algorithms used to slice the SDG to produce precise slices of Erlang interprocedural programs. As a proof-of-concept, we have implemented a program slicer for Erlang based on our SDGs.

Keywords

Pattern Match Function Call Functional Language Program Position Input Edge 
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.

References

  1. 1.
    Agrawal, H., Horgan, J.R.: Dynamic program slicing. In: Programming Language Design and Implementation (PLDI), pp. 246–256 (1990)Google Scholar
  2. 2.
    Brown, C.: Tool Support for Refactoring Haskell Programs. PhD thesis, School of Computing, University of Kent, Canterbury, Kent, UK (2008)Google Scholar
  3. 3.
    Cheda, D., Silva, J., Vidal, G.: Static slicing of rewrite systems. Electron. Notes Theor. Comput. Sci. 177, 123–136 (2007)CrossRefGoogle Scholar
  4. 4.
    Ferrante, J., Ottenstein, K.J., Warren, J.D.: The Program Dependence Graph and Its Use in Optimization. ACM Transactions on Programming Languages and Systems 9(3), 319–349 (1987)zbMATHCrossRefGoogle Scholar
  5. 5.
    Field, J., Ramalingam, G., Tip, F.: Parametric program slicing. In: Proceedings of the 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 1995, pp. 379–392. ACM, New York (1995)CrossRefGoogle Scholar
  6. 6.
    Horwitz, S., Reps, T., Binkley, D.: Interprocedural slicing using dependence graphs. ACM Transactions Programming Languages and Systems 12(1), 26–60 (1990)CrossRefGoogle Scholar
  7. 7.
    Korel, B., Laski, J.: Dynamic Program Slicing. Information Processing Letters 29(3), 155–163 (1988)zbMATHCrossRefGoogle Scholar
  8. 8.
    Larsen, L., Harrold, M.J.: Slicing object-oriented software. In: Proceedings of the 18th International Conference on Software Engineering, ICSE 1996, pp. 495–505. IEEE Computer Society, Washington, DC (1996)CrossRefGoogle Scholar
  9. 9.
    Liang, D., Harrold, M.J.: Slicing objects using system dependence graphs. In: Proceedings of the International Conference on Software Maintenance, ICSM 1998, pp. 358–367. IEEE Computer Society, Washington, DC (1998)Google Scholar
  10. 10.
    Lindahl, T., Sagonas, K.F.: Typer: a type annotator of erlang code. In: Sagonas, K.F., Armstrong, J. (eds.) Erlang Workshop, pp. 17–25. ACM (2005)Google Scholar
  11. 11.
    Lindahl, T., Sagonas, K.F.: Practical type inference based on success typings. In: Bossi, A., Maher, M.J. (eds.) PPDP, pp. 167–178. ACM (2006)Google Scholar
  12. 12.
    Ochoa, C., Silva, J., Vidal, G.: Dynamic slicing based on redex trails. In: Proceedings of the 2004 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, PEPM 2004, pp. 123–134. ACM, New York (2004)CrossRefGoogle Scholar
  13. 13.
    Reps, T., Turnidge, T.: Program Specialization via Program Slicing. In: Danvy, O., Thiemann, P., Glück, R. (eds.) Dagstuhl Seminar 1996. LNCS, vol. 1110, pp. 409–429. Springer, Heidelberg (1996)CrossRefGoogle Scholar
  14. 14.
    Rodrigues, N.F., Barbosa, L.S.: Component identification through program slicing. In: Proc. of Formal Aspects of Component Software (FACS 2005). Elsevier ENTCS, pp. 291–304. Elsevier (2005)Google Scholar
  15. 15.
    Tip, F.: A survey of program slicing techniques. Journal of Programming Languages 3(3), 121–189 (1995)Google Scholar
  16. 16.
    Tóth, M., Bozó, I., Horváth, Z., Lövei, L., Tejfel, M., Kozsik, T.: Impact Analysis of Erlang Programs Using Behaviour Dependency Graphs. In: Horváth, Z., Plasmeijer, R., Zsók, V. (eds.) CEFP 2009. LNCS, vol. 6299, pp. 372–390. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  17. 17.
    Walkinshaw, N., Roper, M., Wood, M., Roper, N.W.M.: The java system dependence graph. In: Third IEEE International Workshop on Source Code Analysis and Manipulation, p. 5 (2003)Google Scholar
  18. 18.
    Weiser, M.: Program Slicing. In: Proceedings of the 5th International Conference on Software Engineering, pp. 439–449. IEEE Press (1981)Google Scholar
  19. 19.
    Widera, M.: Flow graphs for testing sequential erlang programs. In: Proceedings of the 2004 ACM SIGPLAN Workshop on Erlang, ERLANG 2004, pp. 48–53. ACM, New York (2004)CrossRefGoogle Scholar
  20. 20.
    Widera, M., Informatik, F.: Concurrent erlang flow graphs. In: Proceedings of the Erlang/OTP User Conference (2005)Google Scholar
  21. 21.
    Zhao, J.: Slicing aspect-oriented software. In: Proceedings of the 10th International Workshop on Program Comprehension, IWPC 2002, pp. 251–260. IEEE Computer Society, Washington, DC (2002)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Josep Silva
    • 1
  • Salvador Tamarit
    • 1
  • César Tomás
    • 1
  1. 1.Universitat Politècnica de ValènciaValenciaSpain

Personalised recommendations