A novel formal approach to program slicing

Program slicing is a well-known program analysis technique that extracts the elements of a program related to a particular computation. The current slicing methods, however, are singular (mainly based on a program or system dependence graph), and lack good reusability and flexibility. In this paper, we present a novel formal method for program slicing, modular monadic program slicing, which abstracts the computation of program slicing as a slice monad transformer, and applies it to semantic descriptions of the program analyzed in a modular way, forming the corresponding monadic slicing algorithms. The modular abstraction mechanism allows our slicing method to possess excellent modularity and language-flexibility properties. We also give the related axioms of our slice monad transformer, the proof of the correctness and the implementation of monadic slicing algorithms. We reveal the relations of our algorithms and graph-reachable slicing algorithms.

[1]  Paul Hudak,et al.  Modular monadic semantics and compilation , 1998 .

[2]  Philip Wadler,et al.  The essence of functional programming , 1992, POPL '92.

[3]  John Hamer,et al.  A Modular Monadic Action Semantics , 1997, DSL.

[4]  Philip Wadler Monads for Functional Programming , 1995, Advanced Functional Programming.

[5]  Mark Harman,et al.  A denotational interprocedural program slicer , 2002, Ninth Working Conference on Reverse Engineering, 2002. Proceedings..

[6]  Frank Tip,et al.  A survey of program slicing techniques , 1994, J. Program. Lang..

[7]  Eugenio Moggi,et al.  Notions of Computation and Monads , 1991, Inf. Comput..

[8]  P. A. Hausler Denotational program slicing , 1989, [1989] Proceedings of the Twenty-Second Annual Hawaii International Conference on System Sciences. Volume II: Software Track.

[9]  David W. Binkley,et al.  Program slicing , 2008, 2008 Frontiers of Software Maintenance.

[10]  Peter D. Mosses,et al.  Semantics, Modularity, and Rewriting Logic Mosses 1 Modularity in Denotational Semantics Sition Relation Involving Semantic Action Arguments from a X : ! : X a X X and Its Reeexive-transitive Closure , 1998 .

[11]  Mariam Kamkar,et al.  An overview and comparative classification of program slicing techniques , 1995, J. Syst. Softw..

[12]  Nikolaos Papaspyrou,et al.  A Resumption Monad Transformer and its Applications in the Semantics of Concurrency , 2006 .

[13]  G. A. Venkatesh,et al.  The semantic approach to program slicing , 1991, PLDI '91.

[14]  José Emilio Labra Gayo,et al.  A monadic program slicer , 2006, SIGP.

[15]  M. W. Du,et al.  The influence of language semantics on program slices , 1988, Proceedings. 1988 International Conference on Computer Languages.

[16]  Li Bi AN APPROACH TO ANALYZING AND UNDERSTANDING PROGRAM──PROGRAM SLICING , 2000 .

[17]  Karl J. Ottenstein,et al.  The program dependence graph in a software development environment , 1984, SDE 1.

[18]  J. E. Labra Gayo,et al.  LPS: A Language Prototyping System Using Modular Monadic Semantics , 2001, LDTA@ETAPS.

[19]  Baowen Xu,et al.  Modular monadic program slicing , 2004, Proceedings of the 28th Annual International Computer Software and Applications Conference, 2004. COMPSAC 2004..

[20]  Mark Harman,et al.  Amorphous program slicing , 2003, J. Syst. Softw..

[21]  Thomas W. Reps,et al.  Integrating noninterfering versions of programs , 1989, TOPL.

[22]  Baowen Xu,et al.  A survey of semantic description frameworks for programming languages , 2004, SIGP.

[23]  Mark Harman,et al.  An overview of program slicing , 2001, Softw. Focus.

[24]  Yingzhou Zhang,et al.  A formal method for program slicing , 2005, 2005 Australian Software Engineering Conference.

[25]  Aniello Cimitile,et al.  Conditioned program slicing , 1998, Inf. Softw. Technol..

[26]  Philip Wadler,et al.  Comprehending monads , 1990, LISP and Functional Programming.

[27]  Baowen Xu,et al.  Modular Monadic Slicing in the Presence of Pointers , 2006, International Conference on Computational Science.