A slice monad transformer and its applications in program slicing

Monad transformers, each representing a single notion of computation, can be designed once and for all. In this paper we abstract the computation of program slicing as slice monad transformer, which allows program slices to be computed on any type of computation represented by an arbitrary monad. We define and verify the slice monad transformer. With the use of the slice monad transformer, we propose a new approach for program slicing based on modular monadic semantics, called modular monadic slicing. It could compute slices directly on abstract syntax, without explicit construction of intermediate structures such as dependence graphs in slicers. Moreover, it could have excellent flexibility and reusability properties.

[1]  Philip Wadler,et al.  Monads for functional programming , 1995, NATO ASI PDC.

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

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

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

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

[6]  Paul Hudak,et al.  Modular Denotational Semantics for Compiler Construction , 1996, ESOP.

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

[8]  Paul Hudak,et al.  Monad transformers and modular interpreters , 1995, POPL '95.

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

[10]  Keith Brian Gallagher,et al.  Using Program Slicing in Software Maintenance , 1991, IEEE Trans. Software Eng..

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

[12]  John Power Modularity in denotational semantics , 1997, MFPS.

[13]  Peter D. Mosses Semantics, modularity, and rewriting logic , 1998, WRLA.

[14]  David A. Espinosa Semantic Lego , 1995 .

[15]  Philip Wadler,et al.  Comprehending monads , 1990, Mathematical Structures in Computer Science.

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

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

[18]  Wuu Yang,et al.  The Semantics of Program Slicing , 1988 .

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

[20]  Koen Claessen,et al.  A poor man's concurrency monad , 1999, Journal of Functional Programming.

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

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

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