A Backward Slicing Algorithm for Prolog

A Backward Slicing Algorithm for Prolog
复制标题

Prolog的向后切片算法

DOI:
10.1007/3-540-61739-6_50
复制
发表时间:
1996
期刊:
--
影响因子:
--
通讯作者:
M. Ducassé
M. Ducassé
中科院分区:
--
文献类型:
--
作者:
S. Schoenig;M. Ducassé

文献摘要

被引文献

相似文献

切片是一种程序分析技术,最初由Weiser为命令式语言开发。Weiser表明,切片是一种自然的调试工具,但它还有其他许多应用(程序集成,程序优化等)。在这篇文章中,我们描述了一个向后切片算法的Prolog产生可执行的切片。该算法至少适用于纯Prolog扩展的一些简单的内置谓词,处理显式统一=/2和算术。据我们所知,该算法是第一个被提出的Prolog。由于Prolog语言的不确定性和缺乏显式的控制流,现有的算法不能很好地适应。本文的两个主要贡献是切片适应Prolog和切片算法,产生可执行程序的一般定义。
Slicing is a program analysis technique originally developed by Weiser for imperative languages. Weiser showed that slicing is a natural tool for debugging, but it has other numerous applications (program integration, program optimization, etc.)In this article we describe a backward slicing algorithm for Prolog which produces executable slices. The proposed algorithm is applicable at least to pure Prolog extended by some simple built-in predicates that handle the explicit unification=/2 and arithmetic.To our knowledge, this algorithm is the first one to be proposed for Prolog. Because of the indeterminism and lack of explicit control flow of Prolog, existing algorithms cannot be trivially adapted. The two main contributions of this paper are a general definition of slicing adapted to Prolog and a slicing algorithm that produces executable programs.