首页> 外文OA文献 >Extracting Reusable Functions by Flow Graph-based Program Slicing
【2h】

Extracting Reusable Functions by Flow Graph-based Program Slicing

机译:通过基于流程图的程序切片提取可重用函数

摘要

An alternative approach to developing reusable components from scratch is to recover them from existing systems. In this paper, we apply program slicing, a program decomposition method, to the problem of extracting reusable functions from ill-structured programs. As with conventional slicing first described by Weiser, a slice is obtained by iteratively solving data flow equations based on a program flow graph. We extend the definition of program slice to a transform slice, one that includes statements which contribute directly or indirectly to transform a set of input variables into a set of output variables. Unlike conventional program slicing, these statements do not include either the statements necessary to get input data or the statements which test the binding conditions of the function. Transform slicing presupposes the knowledge that a function is performed in the code and its partial specification, only in terms of input and output data. Using domain knowledge we discuss how to formulate expectations of the functions implemented in the code. In addition to the input/output parameters of the function, the slicing criterion depends on an initial statement, which is difficult to obtain for large programs. Using the notions of decomposition slice and concept validation we show how to produce a set of candidate functions, which are independent of line numbers but must be evaluated with respect to the expected behavior. Although human interaction is required, the limited size of candidate functions makes this task easier than looking for the last function instruction in the original source code.
机译:从头开始开发可重用组件的另一种方法是从现有系统中恢复它们。在本文中,我们将程序切片(一种程序分解方法)应用于从结构不良的程序中提取可重用函数的问题。与Weiser首先描述的常规切片一样,切片是通过基于程序流程图迭代地求解数据流方程获得的。我们将程序切片的定义扩展到转换切片,其中包括直接或间接将一组输入变量转换为一组输出变量的语句。与常规程序切片不同,这些语句既不包含获取输入数据所必需的语句,也不包含测试函数绑定条件的语句。转换切片的前提是,只有在输入和输出数据方面,才能在代码及其局部规范中执行功能。使用领域知识,我们讨论如何制定对代码中实现的功能的期望。除了函数的输入/输出参数外,切片条件还取决于初始语句,这对于大型程序而言很难获得。使用分解切片和概念验证的概念,我们展示了如何生成一组候选函数,这些候选函数与行号无关,但必须针对预期行为进行评估。尽管需要人工交互,但是候选函数的有限大小使此任务比在原始源代码中查找最后的函数指令更容易。

著录项

  • 作者

    LANUBILE F.; VISAGGIO G;

  • 作者单位
  • 年度 1997
  • 总页数
  • 原文格式 PDF
  • 正文语种
  • 中图分类

相似文献

  • 外文文献
  • 中文文献
  • 专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号