首页 | 本学科首页   官方微博 | 高级检索  
     

Visual Prolog的搜索控制机制分析
引用本文:雷英杰 王宝树 赵晔 王涛. Visual Prolog的搜索控制机制分析[J]. 计算机科学, 2005, 32(4): 52-54
作者姓名:雷英杰 王宝树 赵晔 王涛
作者单位:西安电子科技大学计算机学院,西安,710071;空军工程大学导弹学院,陕西三原,713800;西安电子科技大学计算机学院,西安,710071;空军工程大学导弹学院,陕西三原,713800
基金项目:国防科技预研基金(51406030104DZ0120),教育部高等学校骨干教师资助计划项目(GG-810-90039-1003)
摘    要:回溯机制是逻辑程序设计的重要设施。回溯本身是一种获得目标所有可能解的良好方法。然而回溯也有副作用,一是它可能导致Visual Prolog给出多余的答案,而Visual Prolog自己不能区分实质上相同的两个解,因此会降低效率;二是尽管一个特殊的目标已被满足,但是回溯机制可能还会强迫Visual Prolog继续手找另外的解,因此会增加系统开销。在这些情况下,必须仔细控制目标搜索求解的回溯过程。本文在揭示Visual Prolog回溯机制所存在问题的基础上,通过实例,对Visual Prolog的静态截断机制、失败谓词fail与否定谓词not等控制谓词,以及动态截断机制等所构成的完整的目标搜索求解控制机制进行了详细分析,从而揭示出回溯机制和搜索求解控制机制的本质特性及应用机理。

关 键 词:Visual Prolog  逻辑程序设计  编程语言  人工智能  专家系统

Analysis of the Control Mechanism of Searching in Visual Prolog
LEI Ying-Jie,WANG Bao-Shu,ZHAO Ye,WANG Tao. Analysis of the Control Mechanism of Searching in Visual Prolog[J]. Computer Science, 2005, 32(4): 52-54
Authors:LEI Ying-Jie  WANG Bao-Shu  ZHAO Ye  WANG Tao
Affiliation:LEI Ying-Jie,WANG Bao-Shu,ZHAO Ye,WANG Tao School of Computer Science and Engineering,Xidian University,Xi'an 710071 Missile Institute,Air Force Engineering University,Sanyuan Shanxi 713800
Abstract:The backtracking mechanism is an important facility for programming in logic. The backtracking itself is a good approach for obtaining all the possible solutions. However, the backtracking mechanism has side-effects. First, it may lead that Visual Prolog finds superabundant solutions out, and Visual Prolog itself cannot distinguish both the solutions of homology in essence, hence the efficiency is reduced. Second, a special goa1 is satisfied, but it would still constrain Visual Prolog to find an alternate solution, and overheads of the system in running time and memory used are increased. In these cases, it is necessary to control carefully the backtracking courses of searching for goals and problem-solving. On the basis of exposing the existed problems of backtracking mechanism in Visual Prolog illustrat- ed with an instance, the full control mechanism of goal-searching and problem-solving, consisting of a static mecha- nism of cut, both the control predicates fail and not, and a dynamic mechanism of cut, are analyzed and investigated in detail. Thus the essential characteristics and fundamentals of applications of the backtracking mechanism and that of the full control mechanism of goal-searching and problem-solving are exposed.
Keywords:Visual prolog  Programming in logic  Programming language  AI  Expert systems
本文献已被 CNKI 维普 万方数据 等数据库收录!
点击此处可从《计算机科学》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号