A semantic basis for the termination analysis of logic programs

被引:75
作者
Codish, M [1 ]
Taboch, C [1 ]
机构
[1] Ben Gurion Univ Negev, Dept Math & Comp Sci, IL-84105 Beer Sheva, Israel
来源
JOURNAL OF LOGIC PROGRAMMING | 1999年 / 41卷 / 01期
基金
以色列科学基金会;
关键词
logic programs; termination analysis; semantics; abstraction;
D O I
10.1016/S0743-1066(99)00006-0
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
This paper presents a formal semantic basis for the termination analysis of logic programs. The semantics exhibits the termination properties of a logic program through its binary unfoldings - a possibly infinite set of binary clauses. Termination of a program P and goal G is determined by the absence of an infinite chain in the binary unfoldings of P starting with G. The result is of practical use as basing termination analysis on a formal semantics: facilitates both the design and implementation of analyzers. A simple Prolog interpreter for binary unfoldings coupled with an abstract domain based on symbolic norm constraints is proposed as an implementation vehicle. We illustrate its application using two recently proposed abstract domains. Both the techniques are implemented using a standard CLP(R) library. The combination of an interpreter for binary unfoldings and a constraint solver simplifies the design of the analyzer and improves its efficiency significantly. (C) 1999 Elsevier Science Inc. All rights reserved.
引用
收藏
页码:103 / 123
页数:21
相关论文
共 42 条
[1]  
[Anonymous], P 6 INT C LOG PROGR
[2]  
[Anonymous], ADV LOGIC PROGRAMMIN
[3]  
[Anonymous], P N AM C LOG PROGR
[4]   REASONING ABOUT TERMINATION OF PURE PROLOG PROGRAMS [J].
APT, KR ;
PEDRESCHI, D .
INFORMATION AND COMPUTATION, 1993, 106 (01) :109-157
[5]  
APT KR, 1990, COMPUTATIONAL LOGIC, P150
[6]  
BENOY F, 1996, 6 INT WORKSH LOG PRO, P204
[7]  
BOSSI A, 1991, LECT NOTES COMPUT SC, V494, P153
[8]  
Brodsky A., 1989, Proceedings of the Eighth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, P190, DOI 10.1145/73721.73741
[9]   Analyzing logic programs using ''prop''-ositional logic programs and a magic wand [J].
Codish, M ;
Demoen, B .
JOURNAL OF LOGIC PROGRAMMING, 1995, 25 (03) :249-274
[10]  
CODISH M, 1997, LNCS, V1298, P31