检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
机构地区:[1]西安电子科技大学计算机学院,西安710071 [2]空军工程大学导弹学院,陕西三原713800
出 处:《计算机科学》2005年第4期52-54,共3页Computer Science
基 金:国防科技预研基金(51406030104DZ0120);教育部高等学校骨干教师资助计划项目(GG-810-90039-1003)
摘 要:回溯机制是逻辑程序设计的重要设施。回溯本身是一种获得目标所有可能解的良好方法。然而回溯也有副作用,一是它可能导致Visual Prolog给出多余的答案,而Visua1 Prolog自己不能区分实质上相同的两个解,因此会降低效率;二是尽管一个特殊的目标已被满足,但是回溯机制可能还会强迫Visual Prolog 继续寻找另外的解,因此会增加系统开销。在这些情况下,必须仔细控制目标搜索求解的回溯过程。本文在揭示Visual Prolog回溯机制所存在问题的基础上,通过实例,对Visual Prolog的静态截断机制、失败谓词fail与否定谓词not等控制谓词,以及动态截断机制等所构成的完整的目标搜索求解控制机制进行了详细分析,从而揭示出回溯机制和搜索求解控制机制的本质特性及应用机理。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.
关 键 词:Visual PROLOG 机制分析 逻辑程序设计 目标搜索 控制机制 系统开销 应用机理 本质特性 回溯 副作用 低效率 求解 谓词 截断
分 类 号:TP311.13[自动化与计算机技术—计算机软件与理论] TP312[自动化与计算机技术—计算机科学与技术]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.4