Higher-Order and Symbolic Computation

, Volume 16, Issue 4, pp 297–339 | Cite as

Non-Standard Semantics for Program Slicing

  • Roberto Giacobazzi
  • Isabella Mastroeni
Article

Abstract

In this paper we generalize the notion of compositional semantics to cope with transfinite reductions of a transition system. Standard denotational and predicate transformer semantics, even though compositional, provide inadequate models for some known program manipulation techniques. We are interested in the systematic design of extended compositional semantics, observing possible transfinite computations, i.e. computations that may occur after a given number of infinite loops. This generalization is necessary to deal with program manipulation techniques modifying the termination status of programs, such as program slicing. We include the transfinite generalization of semantics in the hierarchy developed in 1997 by P. Cousot, where semantics at different levels of abstraction are related with each other by abstract interpretation. We prove that a specular hierarchy of non-standard semantics modeling transfinite computations of programs can be specifiedin such a way that the standard hierarchy can be derived by abstract interpretation. We prove that non-standard transfinite denotational and predicate transformer semantics can be both systematically derived as solutions of simple abstract domain equations involving the basic operation of reduced power of abstract domains. This allows us to prove the optimality of these semantics, i.e. they are the most abstract semantics in the hierarchy which are compositional and observe respectively the terminating and initial states of transfinite computations, providing an adequate mathematical model for program manipulation.

abstract interpretation semantics reduced power compositional semantics transfinite semantics program manipulation program slicing 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Abramsky, S. and Jung, A. Domain theory. In Handbook of Logic in Computer Science, S. Abramsky, D.M. Gabbay, and T.S.E. Maibaum (Eds.). Vol. 3, Oxford, U.K., Clarendon Press, 1994, pp. 1–168.Google Scholar
  2. 2.
    Apt, K.R. and Plotkin, G.D. Countable nondeterminism and random assignment. J. ACM, 33(4) (1986) 724–767.Google Scholar
  3. 3.
    Ballance, R.A., Maccabe, A.B., and Ottenstein, K.J. The program dependence web: A representation supporting control-, data-, and demand-driven interpretation of imperative languages. In Proc. of the ACM SIGPLAN Conf. on Programming Language Design and Implementation, 1990, pp. 257–271.Google Scholar
  4. 4.
    Binkley, D. Using semantic differencing to reduce the cost of regression testing. In Proc. IEEE Conf. on Software Maintenance, IEEE Computer Society, 1992, pp. 41–50.Google Scholar
  5. 5.
    Binkley, D.W. and Gallagher, K.B. Program Slicing. Advances in Computers, 43 (1996).Google Scholar
  6. 6.
    Bossi, A., Gabbrielli, M., Levi, G., and Meo, M.C. A compositional semantics for logic programs. Theor. Comput. Sci., 122(1/2) (1994) 3–47.Google Scholar
  7. 7.
    Cartwright, R. and Felleisen, M. The semantics of program dependence. In Proc. of the ACM SIGPLAN Conf. on Programming Language Design and Implementation, 1989, pp. 13–27.Google Scholar
  8. 8.
    Conway, J.H. Regular Algebra and Finite Machines. Chapman and Hall, 1971.Google Scholar
  9. 9.
    Cousot, P. Constructive design of a hierarchy of semantics of a transition system by abstract interpretation. Theor. Comput. Sci., 277(1/2) (2002) 47,103.Google Scholar
  10. 10.
    Cousot, P. and Cousot, R. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Conference Record of the 4th ACM Symp. on Principles of Programming Languages (POPL'77). New York, ACM Press, 1977, pp. 238–252.Google Scholar
  11. 11.
    Cousot, P. and Cousot, R. Systematic design of program analysis frameworks. In Conference Record of the 6th ACM Symp. on Principles of Programming Languages (POPL'79). New York, ACM Press, 1979, pp. 269–282.Google Scholar
  12. 12.
    Cousot, P. and Cousot, R. Inductive definitions, semantics and abstract interpretation. In Conference Record of the 19th ACM Symp. on Principles of Programming Languages (POPL'92). New York, ACM Press, 1992, pp. 83–94.Google Scholar
  13. 13.
    Cousot, P. and Cousot, R. Systematic design of program transformation frameworks by abstract interpretation. In Conference Record of the Twentyninth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. New York, NY, ACM Press, 2002, pp. 178–190.Google Scholar
  14. 14.
    Dershowitz, N., Kaplan, S., and Plaisted, D. Rewrite, Rewrite, Rewrite, Rewrite,.... Theor. Comput. Sci., 83(1) (1991) 71–96.Google Scholar
  15. 15.
    Desharnais, J., Möller, B., and Tchier, F. Kleene under a demonic star. In Proc. of the 9th Internat. Conf. on Algebraic Methodology and Software Technology (AMAST’ 00), Vol. 1816 of Lecture Notes in Computer Science. Springer-Verlag, 2000, pp. 355–370.Google Scholar
  16. 16.
    Dijkstra, E. Guarded commands, nondeterminism and formal derivation of programs. Comm. of The ACM, 18(8) (1975) 453–457.Google Scholar
  17. 17.
    Dijkstra, E.W. A Discipline of Programming. Series in automatic computation. Prentice-Hall, 1976.Google Scholar
  18. 18.
    Gaifman, H. and Shapiro, E. Fully Abstract Compositional Semantics for Logic Programs. In Conference Record of the 16th ACM Symp. on Principles of Programming Languages (POPL'89). New York, ACMPress, 1989, pp. 134–142.Google Scholar
  19. 19.
    Gallagher, K.B. and Lyle, J.R. Using program slicing in software maintenance. IEEE Trans. on Software Engineering, 17(8) (1991) 751–761.Google Scholar
  20. 20.
    Giacobazzi, R. and Mastroeni, I. A characterization of symmetric semantics by domain complementation. In Proc. of the 2nd international conference in principles and practice of declarative programming PPDP'00. ACM press, 2000, pp. 115–126.Google Scholar
  21. 21.
    Giacobazzi, R. and Mastroeni, I. Compositionality in the puzzle of semantics. In Proc. of the ACM SIGPLAN Symp. on Partial Evaluation and Semantics-Based Program Manipulation (PEPM'02). ACM Press, 2002a, pp. 87–97.Google Scholar
  22. 22.
    Giacobazzi, R. and Mastroeni, I. Handling the puzzle of semantics. Technical report, Università di Verona, Dipartimento di Informatica. Submitted for publication, 2002b. Available at: http://www.sci. univr.it/~giaco/download/puzzle.ps.gz.Google Scholar
  23. 23.
    Giacobazzi, R. and Ranzato, F. Refining and compressing abstract domains. In Proc. of the 24th Internat. Colloq. on Automata, Languages and Programming (ICALP'97), P. Degano, R. Gorrieri, and A. Marchetti-Spaccamela (Eds.). Vol. 1256 of Lecture Notes in Computer Science. Berlin, Springer-Verlag, 1997, pp. 771–781.Google Scholar
  24. 24.
    Giacobazzi, R. and Ranzato, F. The reduced relative power operation on abstract domains. Theor. Comput. Sci, 216 (1999) 159–211.Google Scholar
  25. 25.
    Giacobazzi, R., Ranzato, F., and Scozzari, F. Building complete abstract interpretations in a linear logic-based setting. In 5th International Static Program Analysis Symp., G. Levi (Ed.). Vol. 1503, 1998, pp. 215–229.Google Scholar
  26. 26.
    Giacobazzi, R. and Scozzari, F. A logical model for relational abstract domains. ACM Trans. Program. Lang. Syst., 20(5) (1998) 1067–1109.Google Scholar
  27. 27.
    Hoare, C. An axiomatic basis for computer programming. Comm. of The ACM, 12(10) (1969) 576–580.Google Scholar
  28. 28.
    Horwitz, S., Prins, J. and Reps, T. Integrating non-interfering versions of programs. ACM Transactions on Programming Languages and Systems, 11(3) (1989) 345–387.Google Scholar
  29. 29.
    Just, W. and Weese, M. Discovering Modern Set Theory. I: The Basics, Vol. 8 of Graduate Studies in Mathematics. American mathematical society, 1996.Google Scholar
  30. 30.
    Kennaway, J., Klop, J., Sleep, M., and de Vries, F. Infinitary lambda calculus. Theoretical Computer Science, 175(1) (1997) 93–125.Google Scholar
  31. 31.
    Kennaway, J.R., Klop, J.W., Sleep, M.R., and Vries, F.J. Transfinite reductions in orthogonal term rewriting systems. Information and Computation, 119(1) (1995) 18–38.Google Scholar
  32. 32.
    Ottenstein, O. and Ottenstein, L. The program dependence graph in software development environments. In ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments. ACM Press, 1984, pp. 177–184.Google Scholar
  33. 33.
    Plotkin, G. A Structural Approach to Operational Semantics. DAIMI-19 Aarhus University, Denmark, 1981.Google Scholar
  34. 34.
    Reps, T. Algebraic properties of program integration. Sci. Comput. Program., 17 (1991) 139–215.Google Scholar
  35. 35.
    Reps, T. and Turnidge, T. Program specialization via program slicing. In Proceedings of the Dagstuhl Seminar on Partial Evaluation, O. Danvy, R. Glueck, and P. Thiemann (Eds.). Springer-Verlag, 1996, pp. 409–429.Google Scholar
  36. 36.
    Reps, T. and Yang, W. The semantics of program slicing and program integration. In Proc. of the Colloquium on Current Issues in Programming Languages, J. Diaz and F. Orejas (Eds.). Vol. 352 of Lecture Notes in Computer Science, Springer-Verlag, 1989, pp. 360–374.Google Scholar
  37. 37.
    Rosenthal, K.I. Quantales and their applications. In Pitman Research Notes in Mathematics. London, Longman Scientific & Technical, 1990.Google Scholar
  38. 38.
    Selke, R.P. A rewriting semantics for program dependence graphs. In Conference Record of the 16th ACM Symp. on Principles of Programming Languages (POPL'89). New York, ACM Press, 1989, pp. 12–24.Google Scholar
  39. 39.
    Shmuely, Z. The structure of Galois connections. Pacific J. Math., 54(2) (1974) 209–225.Google Scholar
  40. 40.
    Smyth, M.B. Topology. In Handbook of Logic in Computer Science, Vol. 1. Oxford, Clarendon Press, 1992.Google Scholar
  41. 41.
    Tip, F. A survey of program slicing techniques. Journal of Programming Languages, 3 (1995) 121–181.Google Scholar
  42. 42.
    Venkatesh, G.A. The semantics approach to program slicing. In ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM Press, 1991, pp. 107–119.Google Scholar
  43. 43.
    Weiser, M. Program slicing. IEEE Transactions on Software Engineering, SE-10(4) (1984) 352–357.Google Scholar
  44. 44.
    Winskel, G. The Formal Semantics of Programming Languages: An Introduction, MIT press, 1993.Google Scholar

Copyright information

© Kluwer Academic Publishers 2003

Authors and Affiliations

  • Roberto Giacobazzi
    • 1
  • Isabella Mastroeni
    • 1
  1. 1.Dipartimento di InformaticaUniversità di VeronaVeronaItaly

Personalised recommendations