On Slicing of Programs with Input Statements

  • Härmel Nestra
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8049)

Abstract

This paper studies program slicing in the presence of input statements. If unnecessary input statements are sliced away, the remaining input statements are assumed to read the same data as within the entire program. For specifying the relation of one program being a slice of another under this assumption, one needs a formalism for treating “stages of computation”. This paper presents an approach where stages of computation, called run points, are encoded by rational numbers. Run points of the slice and the corresponding run points of the whole program are encoded by equal numbers. We adapt a program analysis used by a classic slicing algorithm to our setting, in order to prove correctness of the slicing algorithm.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Barraclough, R.W., Binkley, D., Danicic, S., Harman, M., Hierons, R.M., Kiss, Á., Laurence, M., Ouarbya, L.: A trajectory-based strict semantics for program slicing. Theoretical Computer Science 410, 1372–1386 (2010)MathSciNetCrossRefGoogle Scholar
  2. 2.
    Binkley, D.W., Gallagher, K.B.: Program slicing. Advances in Computers 43, 1–50 (1996)CrossRefGoogle Scholar
  3. 3.
    Collard, J.-F.: Reasoning about Program Transformations. Springer (2003)Google Scholar
  4. 4.
    Cousot, P.: Constructive design of a hierarchy of semantics of a transition system by abstract interpretation. Electronic Notes in Theoretical Computer Science 6, 77–102 (1997)MathSciNetCrossRefGoogle Scholar
  5. 5.
    Danicic, S., Harman, M., Howroyd, J., Ouarbya, L.: A non-standard semantics for program slicing and dependence analysis. Journal of Logic and Algebraic Programming 72, 191–206 (2007)MathSciNetMATHCrossRefGoogle Scholar
  6. 6.
    Giacobazzi, R., Mastroeni, I.: Non-standard semantics for program slicing. Higher-Order Symbolic Computation 16, 297–339 (2003)MATHCrossRefGoogle Scholar
  7. 7.
    Hatcliff, J., Corbett, J., Dwyer, M.B., Sokolowski, S., Zheng, H.: A formal study of slicing for multi-threaded programs with JVM concurrency primitives. In: Cortesi, A., Filé, G. (eds.) SAS 1999. LNCS, vol. 1694, pp. 1–18. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  8. 8.
    Kennaway, R., Klop, J.W., Sleep, R., de Vries, F.-J.: Transfinite reductions in orthogonal term rewriting systems. Information and Computation 119(1), 18–38 (1995)MathSciNetMATHCrossRefGoogle Scholar
  9. 9.
    Nestra, H.: Transfinite semantics in program slicing. Proceedings of the Estonian Academy of Sciences: Engineering 11(4), 313–328 (2005)Google Scholar
  10. 10.
    Nestra, H.: Fractional semantics. In: Johnson, M., Vene, V. (eds.) AMAST 2006. LNCS, vol. 4019, pp. 278–292. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  11. 11.
    Nestra, H.: Iteratively Defined Transfinite Trace Semantics and Program Slicing with respect to Them. PhD thesis, University of Tartu, 119 p. (2006)Google Scholar
  12. 12.
    Nestra, H.: Transfinite semantics in the form of greatest fixpoint. Journal of Logic and Algebraic Programming 78, 573–592 (2009)MathSciNetMATHCrossRefGoogle 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.
    Reps, T., Yang, W.: The semantics of program slicing and program integration. In: Díaz, J., Orejas, F. (eds.) TAPSOFT 1989. LNCS, vol. 352, pp. 360–374. Springer, Heidelberg (1989)Google Scholar
  15. 15.
    Sivagurunathan, Y., Harman, M., Danicic, S.: Slicing, I/O and the implicit state. In: Kamkar, M. (ed.) 3rd International Workshop on Automated Debugging. Linköping Electronic Articles in Computer and Information Science, vol. 2, pp. 59–67 (1997)Google Scholar
  16. 16.
    Tip, F.: A survey of program slicing techniques. Journal of Programming Languages 3(3), 121–181 (1995)Google Scholar
  17. 17.
    Ward, M., Zedan, H.: Slicing as a program transformation. ACM Transactions on Programming Languages and Systems 29(2), 1–53 (2007)CrossRefGoogle Scholar
  18. 18.
    Ward, M., Zedan, H.: Deriving a slicing algorithm via FermaT transformations. IEEE Transactions on Software Engineering 37(1), 24–47 (2011)CrossRefGoogle Scholar
  19. 19.
    Weiser, M.: Program slicing. In: ICSE 1981 Proceedings of the 5th International Conference on Software Engineering, pp. 439–449 (1981)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Härmel Nestra
    • 1
  1. 1.Institute of Computer ScienceUniversity of TartuTartuEstonia

Personalised recommendations