电子学报
電子學報
전자학보
ACTA ELECTRONICA SINICA
2013年
8期
1457-1461
,共5页
单子切片方法%模块单子语义%过程间程序%参数间依赖%组合性
單子切片方法%模塊單子語義%過程間程序%參數間依賴%組閤性
단자절편방법%모괴단자어의%과정간정서%삼수간의뢰%조합성
monadic slicing methods%modular monadic semantics%interprocedural programs%dependences among the param-eters%compositionality
在现有的过程内单子切片算法基础上,提出基于回填待定标号的过程间单子切片算法:先以待定标号初始化子过程中开始处参数变量的切片;再对其进行过程内单子切片分析,据此可得相应参数间依赖关系;最后回填切片表中相应的待定标号,从而获得所需的过程间单子切片。算法充分利用了过程内单子切片的结果,相当程度上避免了重复计算,无需进一步构造诸如特征子图、连接语法等中间形式,同时通过参数间依赖避免了调用上下文问题。此外,文中算法保留了过程内单子切片算法的强语言适应性和组合性。
在現有的過程內單子切片算法基礎上,提齣基于迴填待定標號的過程間單子切片算法:先以待定標號初始化子過程中開始處參數變量的切片;再對其進行過程內單子切片分析,據此可得相應參數間依賴關繫;最後迴填切片錶中相應的待定標號,從而穫得所需的過程間單子切片。算法充分利用瞭過程內單子切片的結果,相噹程度上避免瞭重複計算,無需進一步構造諸如特徵子圖、連接語法等中間形式,同時通過參數間依賴避免瞭調用上下文問題。此外,文中算法保留瞭過程內單子切片算法的彊語言適應性和組閤性。
재현유적과정내단자절편산법기출상,제출기우회전대정표호적과정간단자절편산법:선이대정표호초시화자과정중개시처삼수변량적절편;재대기진행과정내단자절편분석,거차가득상응삼수간의뢰관계;최후회전절편표중상응적대정표호,종이획득소수적과정간단자절편。산법충분이용료과정내단자절편적결과,상당정도상피면료중복계산,무수진일보구조제여특정자도、련접어법등중간형식,동시통과삼수간의뢰피면료조용상하문문제。차외,문중산법보류료과정내단자절편산법적강어언괄응성화조합성。
Program slicing is a technique for simplifying programs by focusing on selected aspects of semantics .This paper extends our previously presented intraprocedural monadic slicing to handle procedures .It presents backfilling labels based monadic approach to compute static slices of a program with call-by-value-result procedures .It first uses some given labels to initialize the monadic slices of the corresponding formal parameters at the beginning of a procedure ;then analyzes this procedure through in-traprocedural monadic slicing methods ,whose slice result can be used to obtain the dependences among the parameters .It lastly ob-tains the final slice tables by backfilling the corresponding given labels .The algorithms in this paper make the best of the slice result from intraprocedural monadic slicing algorithms ,without the need of a characteristic graph ,a system dependence graph ,or similar intermediate structure .They can also address calling-context problem through the dependence relations among the corresponding pa-rameters .Furthermore ,they reserve the excellent properties of compositionality and language-flexibility from intraprocedural monadic slicing algorithms .