首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到18条相似文献,搜索用时 343 毫秒
1.
Visual Prolog截断机制对回溯的作用机理   总被引:4,自引:0,他引:4  
雷英杰  华继学  徐彤  狄博 《计算机工程》2005,31(18):183-185
回溯是一种获得目标所有可能解的良好方法.然而不恰当地使用回溯,可能导致系统效率降低,时空开销增大,因此必须设置相应机制,仔细控制回溯过程.Visual Prolog的控制谓词,即失败谓词fail和否定谓词not,与截断机制,包括静态截断机制和动态截断机制,构成了完整的目标搜索求解控制机制,可以实现对搜索过程的仔细控制,减少不必要的回溯.该文在考察Visual Prolog回溯机制和截断机制的基础上,通过实例,对其静态截断机制和动态截断机制进行了详细分析,从而揭示回溯机制和截断机制的本质特性和应用机理.  相似文献   

2.
徐彤  雷英杰  谢波  李松 《计算机工程》2005,31(22):192-193
阐明了Visual Prolog中确定性管理机制的目的和方法,归纳了编写确定性和非确定性谓词的基本原则,通过对代码示例中回溯和截断机制的详细分析,给出了结论。  相似文献   

3.
Visual Prolog语言是人工智能与专家系统领域最著名的逻辑程序设计语言,适合表达人的思维和推理规则,能够方便地实现模式匹配、回溯、事实数据库和谓词等功能;针对导弹测试设备结构复杂、故障隔离与定位困难等情况,充分利用Visual Prolog语言在专家系统知识表示及逻辑推理过程中的优点,建立了一个基于规则的导弹测试设备故障诊断专家系统;通过应用表明Visual Prolog语言十分适合构建此类专家系统,并具有良好的开发应用前景.  相似文献   

4.
陈东方  王诚 《福建电脑》2005,(8):117-118
货郎担问题是一个典型的易于描述却难以处理地NP完全问题。而Visual Prolog语言的匹配合一、递归和回溯等特点非常适合求解这类问题。本文利用Visual Prolog实现了简单的货郎担问题。  相似文献   

5.
遗传算法是一种在搜索过程中自动获取和积累有关搜索空间知识,并自适应地控制搜索过程,从而得到最优解或近似最优解的通用搜索算法,可广泛应用于求解一些非线性、多目标函数的最优化问题.设计了基于遗传算法求解最优路径问题的方法,并讨论了以Visual Studio 2005为开发环境的实现要点.  相似文献   

6.
Godel语言是在Prolog语亩基础上发展而来的一种新型逻辑程序设计语言,而控制机制是逻辑程序设计语言的核心内容.针对Prolog语言控制机制存在的问题,引出了Godel语言中新的控制机制,包括DELAY延迟机制和剪枝操作然后通过实例分析,表明了这些新机制能有效地避免递归谓词的低效或无限循环调用,并能够实现子目标的协同执行,从而提高系统的运行效率.针对这一有效改进,在对Godel语言控制机制比较深入研究的基础上,最后给出了Godel语言控制机制的实现算法.该算法已在研发的Godel语言编译系统中得以实现,通过实例测试,验证了算法具有较高的效率.  相似文献   

7.
1.前言prolog 这个名词是由 Program 和 logic 合成而来的。顾名思义,它是以一阶谓词逻辑为基础的语言。用 Prolog 编程序有的叫programming in logic,或 logic programm-ing,这两个术语比 Prolog 语言的适用范围略微广泛一些。不管怎么叫法,反正 Prolog的最大特点都是与 logic 密切相关的。Prolog 的其它特点,还有:(1)模式匹配功能(2)自动回溯功能(3)有灵活性,其参数对于过程的输  相似文献   

8.
4.含CUT的PROLOG语义 4.1 语言成份“cut”前面所讨论的PROLOG解释程序简单控制策略的问题之一是在子树中进行大量的回溯搜索有可能没有解(在极端情况下,对无限树形结构进行的穷尽搜索会使逻辑上正确的程序永不终止)。语言成份cut为用户提供了控制这类回溯的手段。  相似文献   

9.
回溯算法的形式模型   总被引:8,自引:0,他引:8  
讨论了回溯算法的形式模型,提出了刻画回溯的一些数学概念,以隐式搜索教育界背景提出了状态空间概念,给出了分别以邻接方阵和邻接表形式表示的有向图所对应的状态空间,从而说明显式搜索是隐式搜索的特例,通过展开空间概念揭示了问题求解的不同要求所对应的不同数据结构,提出了通用回溯算法,并以N皇后问题、稳定婚姻问题,点着色问题、子集和数问题,跳马问题,最长路径问题和强连通分支问题等多种算法设计问题为例讨论了通用回溯 算法的应用,该文结果有助于扩大回溯算法的使用范围,提高回溯算法实现的正确性和效率。  相似文献   

10.
张冠军  支娅莉 《电脑》1994,(5):63-64
由于Prolog语言未提供文件位操作的谓词,使得它无法对汉字库文件进行按字模逐位读出,因此也就难以实现在西文Prolog下显示汉字。而超想汉字系统作为一种全新的字符型汉字系统,支持西文Prolog下的汉字直接写屏,并使Prolog具有特显矢量汉字的功能。  相似文献   

11.
We propose a visual computation model called theBox and Plane Model (BPM), which visually clarifies the semantics of backtracking, the cut operator, and side-effects, thus allowing the procedural features of Prolog to be grasped. On the bases of the BPM, we developed a visual debugger for Prolog, PROEDIT2, which has proved that this kind of pragmatic computation model for Prolog increases the efficiency of the debugging work.  相似文献   

12.
We present the implementation of a Prolog system composed of interpreter and compiler. The originality of our work consists in the adoption of a new framework to realize the main components of the system. The framework relies on new mechanisms, called sleepers. With their help we have developed a complete Prolog interpreter in which all the control activities, from backtracking up to last-call optimization, are performed by the sleeper mechanism. We have also produced a Prolog compiler by using a philosophy and tactics that are completely independent of hardware constraints; it exploits an incremental and abstract implementation technique, based on a delayed non-local execution protocol. Our approach to Prolog system implementation has been extremely useful both in terms of software design and overall performance.  相似文献   

13.
Prolog embodies an ordered input resolution inference mechanism, with a powerful unification procedure. However, Prolog is not a full theorem-prover, and does not contain an inexact reasoning mechanism. In this paper, it is shown how these capabilities can be combined in a Prolog environment. A Prolog meta-interpreter is used in an elegant and simple way for this purpose. The inexact reasoning mechanism is presented through the certainty factor model, but it is also discussed how other inexact reasoning models may be also implemented.  相似文献   

14.
15.
In this paper, we investigate the feasibility of applying logic programming to structured design. We propose to use Prolog as a common machinery for the representation of various structured tools. We illustrate through examples how to produce structure charts from data flow diagrams, and evaluate them according to commonly recommended design guidelines. If the structure charts produced are not satisfactory, the inherent backtracking mechanism in Prolog will help to produce other versions for further evaluation.  相似文献   

16.
Prolog/Rex represents a powerful amalgamation of the latest techniques for knowledge representation and processing, rich in semantic features that ease the difficult task of encoding heterogeneous knowledge of real-world applications. The Prolog/Rex concept mechanism lets a user represent domain entities in terms of their structural and behavioral properties, including multiple inheritance, arbitrary user-defined relations among entities, annotated values (demons), incomplete knowledge, etc. A flexible rule language helps the knowledge engineer capture human expertise and provide flexible control of the reasoning process. Additional Prolog/Rex strength that cannot be found in any other hybrid language made on top of Prolog is language level support for keeping many potentially contradictory solutions to a problem, allowing possible solutions and their implications to be automatically generated and completely explored before they are committed. The same mechanism is used to model time-states, which are useful in planning and scheduling applications of Prolog/Rex  相似文献   

17.
本文提出一种支持PROLOG程序并行执行的智能回溯机制,它是基于数据相关性分析的动静结合的智能回溯策略,在静态编译时通过相关性分析产生各子目标带条件的智能回溯点集合,动态执行时通过对变量的简单测试及对当前运行结果的简单测试来确定当前失败目标的最佳回溯点。  相似文献   

18.
本文提出了一种抽象机GOAM,是Prolog语言新的运行和实现方式,因为GOAM内存管理是一种堆式内存分配方法,所以具有潜在的并行性,另外GOAM控制算法是智能回溯方法,GOAM在没有引入冗余信息的情况下提高了系统的效率。  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

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