|Table of Contents|

[1] Zhang Yingzhou, Zhang Weifeng,. Monadically slicing programs with procedures [J]. Journal of Southeast University (English Edition), 2008, 24 (2): 178-182. [doi:10.3969/j.issn.1003-7985.2008.02.011]
Copy

Monadically slicing programs with procedures()
含过程程序的单子切片

Journal of Southeast University (English Edition)[ISSN:1003-7985/CN:32-1325/N]

Volumn:
24
Issue:
2008 2
Page:
178-182
Research Field:
Computer Science and Engineering
Publishing date:
2008-06-03

Info

Title:
Monadically slicing programs with procedures
含过程程序的单子切片
Author(s):
Zhang Yingzhou, Zhang Weifeng
College of Computer, Nanjing University of Posts and Telecommunications, Nanjing 210003, China
张迎周, 张卫丰
南京邮电大学计算机学院, 南京 210003
Keywords:
program slicing monadic semantics interprocedural slicing calling-context problem
程序切片 单子语义 过程间切片 上下文调用问题
PACS:
TP311
DOI:
10.3969/j.issn.1003-7985.2008.02.011
Abstract:
A two-phase monadic approach is presented for monadically slicing programs with procedures.In the monadic slice algorithm for interprocedural programs, phase 1 initializes the slice table of formal parameters in a procedure with the given labels, and then captures the callees’ influence on callers when analyzing call statements.Phase 2 captures the callees’ dependence on callers by replacing all given labels appearing in the corresponding sets of formal parameters.By the introduction of given labels, this slice method can obtain similar summary information in system-dependence-graph(SDG)-based algorithms for addressing the calling-context problem.With the use of the slice monad transformer, this monadic slicing approach achieves a high level of modularity and flexibility.It shows that the monadic interprocedural algorithm has less complexity and it is not less precise than SDG algorithms.
为解决含过程程序的单子切片问题, 提出基于回填待定标号的两阶段单子切片算法.算法第1阶段用给定标号初始化子过程的形参切片表, 并通过分析调用语句捕获被调者对调用者的影响.算法第2阶段主要是通过回填切片表中相应的待定标号来捕获施调者对被调者的影响.待定标号的引入使得所提切片算法可捕获类似基于系统依赖图(SDG)切片算法中的概要信息, 且也可避免上下文调用问题.借助于切片单子转换器, 所提单子切片算法将具有较高的模块性和适应性, 且其复杂度不劣于基于SDG的切片算法.

References:

[1] Weiser M.Program slicing [J].IEEE Transaction on Software Engineering, 1984, 16(5):498-509.
[2] Tip F.A survey of program slicing techniques [J].Journal of Programming Languages, 1995, 3(3):121-189.
[3] Gallagher K B, Lyle J R.Using program slicing in software maintenance [J].IEEE Transactions on Software Engineering, 1991, 17(8):751-761.
[4] Ottenstein K J, Ottenstein L M.The program dependence graph in a software development environment [J].ACM SIGPLAN Notices, 1984, 19(5):177-184.
[5] Horwitz S, Reps T, Binkley D.Interprocedural slicing using dependence graphs [J].ACM Transactions on Programming Languages and Systems, 1990, 12(1):26-60.
[6] Zhang Y Z, Xu B W, Shi L, et al.Modular monadic program slicing [C]//The 28th Annual International Computer Software and Applications Conference.Hong Kong, China, 2004:66-71.
[7] Zhang Y Z, Xu B W.A novel formal approach to program slicing [J].Science in China, Ser E, Info Sci, 2008, 38(2):161-320.
[8] Wansbrough K.A modular monadic action semantics [D].Auckland:University of Auckland, 1997.
[9] Moggi E.An abstract view of programming languages [R].Edinburgh:University of Edinburgh, 1989.
[10] Liang S.Modular monadic semantics and compilation [D].New Haven:University of Yale, 1998.
[11] Liang S, Hudak P, Jones M.Monad transformers and modular interpreters [C]//22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages.New York:ACM Press, 1995:333-343.
[12] Xu B W, Chen Z Q.Dependence analysis for recursive java programs [J].ACM SIGPLAN Notices, 2001, 36(12):70-76.

Memo

Memo:
Biography: Zhang Yingzhou(1978—), male, doctor, associate professor, zhangyz@njupt.edu.cn.
Foundation item: The National Outstanding Young Scientist Foundation by NSFC(No.60703086, 60503020).
Citation: Zhang Yingzhou, Zhang Weifeng.Monadically slicing programs with procedures[J].Journal of Southeast University(English Edition), 2008, 24(2):178-182.
Last Update: 2008-06-20