Prology程序部分计算的研究与实现

RESEARCH AND IMPLEMENTATION OF THE PARTIAL EVALUATION OF PROLOG PROGRAMS
  • 摘要
  • | |
  • 访问统计
  • |
  • 参考文献 [15]
  • |
  • 相似文献 [20]
  • | | |
  • 文章评论
    摘要:

    部分计算是一种重要的程序变换方法和编译优化技术,Prolog程序特别适合于部分计算。目前,国际上已开始了几个Prolog程序部分计算的原理模型和专用工具,但其中存在以下若于问题:(1)关于Prolog程序部分计算的基本原理和特征缺乏系统的认识;(2)现有的两种检测逻辑程序中循环的方法,并没有最后解决部分计算的终止性问题》;(3)关于Prolog中内部谓词的处理不够究善,而且其中还隐含了许多语叉错误;(4)部分计算算法相当低效;(5)现有的部分计算器局限于各自的应用领域,缺乏通用性。本文结合我们研制GKD-Prolog编译系统[14]剖中一个实用源级部分计算器的工作实践,全面、系统地讨论了纯Prolog的部分计算、逻辑程序的循环检测以及全Prolog的内部谓词处理。

    Abstract:

    Partial evaluation is an important program transformation method and compiling optimisation technique.Prolog programs are specially suited to be partially evaluated.At present,several principl models and special-purpose tools of the partial evaluation of Prolog programs have been developed in the world,but there are still following problkems in these works;(1)There us lack of systematic understanding for the basic principle and characteristics of the partial evaluation of Prolog programs;(2)Both methods which are used to detect loops in logic programs don't bring the termination prob;em in partial evaluation to a final solution;(3)The treatment of builtins in Prolog is imperfect and there are many implicit semantic errors in it;(4)The efficiency of some algorithms for partial evaluation is very low;(5)The partial eval uators now available are confined to their application fields,respoctively,and they are lack of generality.Based on our working practice in researching and developing a practical sourec-lecel partial evaluator in GKD-Prolog compiler[14],this paper discusses the partial evaluation of programs in pure Prolog,the detection of loops in logic programs and the treatment of builtins in full Prolog entirely and systematically.

    参考文献
    [1] Kleene,S.C.,Introduction to Meta-Mathematics.North-Holland Publishing Co., Amsterdam,1952.
    [2] Futamura,Y.,Partial Evaluation of Computation Process:An Approach to a Compiler Compihr systems,Computers,ControlS,Vol.2,No.5,1971.
    [3] Komorowski,H.J.,Partial Evaluation as a Means for Inferencing Data Structure in an Applicative Language:A Theory and Implementation in the Case of Prolog.Ninth ACM Syrup.on Principles of Programming Languages,Albuquer,New Mexico,1982.
    [4] Kahn,K.M.,A Partial Evaluator of Lisp Written in a Prolog Intended to Be Applied to the Prolog and Itself Which in Turn Is Intended to Be Given to Itself together with the Prolog to Produce a Prolog Compiler.Technical Report,UPNAIL,Uppsala University, Sweden,1982.
    [5] Kahn,K.M.and Carlsson,M.,The compilation of Prolog Programs without the Use of Prolog Compilers.International Conference on FGCS,Tokyo,Japan,1984.
    [6] Venken,R.,A PROLOG Meta-Interpreter for Partial Evaluation and Its Application to Source Transformation and Query Optimization.in ECAI-84.
    [7] Sterling,L.and Shapiro,E.,The Art of Prolog,MIT Press,1986.
    [8] O'Keefe,R.A.,On the Treatment of Cuts in Prolog Source Level Tools.Proc.Int'1 Syrup. on Logic Programming,Boston,Mass,1985.
    [9] Takeuchi,A.and Furukawa,K.,Partial Evaluation of Prolog Programs and Its Application to Meta Programming.in Information Processing 86,Dublin,Irelannd,North-Holland。1986.
    [10] Bjrner,D.,Ershov,A.P.and Jones,N.D.eds,Workshop on Partial Evaluation and Mixed Computation,GL.Avernaees,DenmarkJ 1987'
    [11] International Conference on FGCS,Tokyo,Japan,1988.
    [12] Li Lei,Design and Implementation of a Partial Evaluator for(Almost)Full Prolog Programs,ICO 89 Quebec,Ganada 29,1989.
    [13] 苏金树.邓铁清,吴泉源。元级程序设计技术研究, 《知识工程进展1988》,中国地质大学出版社。1988,12.
    [14] 胡运发,高洪奎.胡子昂,卢肇川,邓铁清.逻辑语言及其环境合成系统GKD-PROLOG/WICK,全国第四届逻辑程序设计会议。1989。
    [15] 邓铁清,胡运发,高洪奎,Prolog中非逻辑成分的部分计算.全国第四届逻辑程序设计会议,1989。
    引证文献
    网友评论
    网友评论
    分享到微博
    发 布
引用本文

邓铁清,胡运发. Prology程序部分计算的研究与实现.软件学报,1990,1(3):45-58

复制
分享
文章指标
  • 点击次数:3600
  • 下载次数: 4960
  • HTML阅读次数: 0
  • 引用次数: 0
历史
  • 收稿日期:1989-08-09
  • 最后修改日期:1989-10-14
文章二维码
您是第19946155位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号