首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 15 毫秒
1.
In this paper we introduce the concept of a Prolog programming technique. This concept is then distinguished both from that of an algorithm and that of a programming cliché. We give examples and show how a knowledge of them can be useful in both programming environments and in teaching programming skills. The extraction of the various techniques is outlined. Finally, we discuss the problem of representing techniques where we conclude that the most promising approach is the development of a suitable meta-language.  相似文献   

2.
A clear and consistent execution model of any programming language can lay the foundations not only for a good leaming experience, but also for a smoother design/edit/run/debug cycle. In this paper, we describe our attempt to construct precisely such a model for the logic programming language Prolog, based upon a notational extension of logic programming's traditional AND/OR trees. Our extension, called the AORTA diagram, is an And/OR Tree, Augmented to include invocation history status boxes at each node. This augmentation makes it possible to present a graphical view of Prolog execution which is very compact, yet which contains complete details of unification and control history, including multiple (backtracking) invocations and extra-logical features such as the cut. The paper describes our fine-grained view of Prolog execution in detail, and argues that this fine-grained view can readily be integrated into a coarse-grained model such as thatrequired for understanding the execution of very large programs. Indeed, our notation is already in use across a range of media, including textbook diagrams, video animations, and a graphical tracing and debugging facility running on modem graphics workstations.  相似文献   

3.
4.
为了使Prolog推理引擎可以从一定程度的语义上来区分子句,通过概念图的形式对Prolog程序的子句建立本体.子句本体的概念模型通过其谓词参数和头子目标来建立,而头子目标是指出现在规则体首部并且位于任何谓词调用之前的子目标集合.所提出的方法把一个Prolog程序转换成包含其子句本体的Prolog CG程序.实验表明,通过对Prolog子句建立本体,可以尽早地去除与当前目标明显不匹配的子句,从而使得目标求解树的规模减小.在概念图的描述形式下,子句本体使得Prolog程序的语义更清晰可读,在某些情况下能明显加快程序的求解过程.  相似文献   

5.
This paper describes an approach to the debugging of student Prolog programs in a Prolog Intelligent Tutoring System (PITS) that detects errors in them and proposes the corrections necessary to fix them. It proposes the use of multiple sources of expertise to analyse Prolog programs for tutoring purposes, and the collaboration of these sources for understanding student programs, detection of bugs and suggesting fixes to buggy student programs. It also demonstrates the use of a heuristic bestfirst search of the program decomposition space to parse a Prolog program into a hierarchical structure of predicate definitions, clauses, subgoals, arguments and terms. This article illustrates the merits of an algorithm-based approach supplemented by multiple sources of expertise for program debugging by showing that APROPOS2 is an effective, realistic and useful tool for program debugging. It then highlights the difficulties inherent in debugging Prolog programs and discusses the limitations of our algorithm-based approach.  相似文献   

6.
通过对二维gabor函数的逐级分解,将gabor函数分解成高斯函数与三角函数的组合,再通过递归的方法实现高斯滤波,从而达到了快速指纹图像增强的目的.实验结果表明,该算法不仅增强效果与gabor增强相当,且在算法速度上较传统方法具有明显优势,同时,一次滤波可以得到两个不同方向的增强结果.  相似文献   

7.
本文介绍了产生式系统和状态空间图,结合Prolog提出了一种生成产生式系统的一个通用模型,最后通过对几个实例进行了计算机模拟,结果表明,该模型具有良好的适用性.  相似文献   

8.
9.
一阶谓词逻辑下的Horn逻辑是人工智能程序语言Prolog的理论基础,利用Prolog在计算机上可实现机械化,从而使自动化求解问题和定理证明具备可行性。本文从Horn逻辑和Prolog的基础理论出发,使用Horn子句、SLD-归结、搜索和回溯等原理讨论了如何在计算机中实现数学函数、定理证明等自动推理的一些应用。  相似文献   

10.
通过介绍一个用逻辑语言Prolog设计的函数语言解释执行器原型,展示结合不同的声明式语言进行软件开发的方法。该法可实现不同语言优势互补,以提高生产效率和软件可靠性。通过函数语言解释执行实例,验证该解释执行器的有效性。  相似文献   

11.
In this paper we present an overview of the advances in debugging standard Prolog programs. The analysis offered is in terms of a classification of tools that provide different degrees of activity in the debugging process. Other possible dimensions of analysis are also outlined.  相似文献   

12.
13.
14.
One of the mechanisms that a student of Prolog must learn to understand and to use is unification. Initially students have only a partial understanding of unification and therefore they are not able to fully understand the execution of a program. This paper shows that a considerable part of the errors that students make can be explained by an impaired version of the correct algorithm. The changes from the correct algorithm to the false algorithms can be justified by a psychologically plausible mechanism.  相似文献   

15.
16.
17.
18.
A set of basic construct Prolog schemata are presented as the basic constructs of a structured Prolog for recursive list processing. Prolog schema hierarchies are given that group classes of Prolog programs within each of the basic construct Prolog schemata via most-specific schemata which high-light their similarities and differences. A schema-based instructional approach based upon this classification of Prolog programs is provided as a method of introducing recursion to novice Prolog programmers. The incorporation of this approach to teaching recursive Prolog programming in an intelligent tutoring system is presented. Finally, a schema-based Prolog programming environment embedding this tutoring system in addition to a standard Prolog development system is proposed which promotes the acquisition and use of structured programming constructs in Prolog.  相似文献   

19.
20.
A note from the general editor  相似文献   

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

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