首页> 外文期刊>journal of logic and computation >Supporting Transformations for the Partial Evaluation of Logic Programs
【24h】

Supporting Transformations for the Partial Evaluation of Logic Programs

机译:Supporting Transformations for the Partial Evaluation of Logic Programs

获取原文
           

摘要

This paper presents some supporting transformations for the partial evaluation of logic programs. A logic language is often used to specify a program. If such a specification is to be implemented by means of a logic programming language it is desirable that the programmer should omly have to consider the declarative meaning of the predicates being defined. However, such a program may be very inefficient and the program may have to be transformed to another program which computes the same answers but with improved efficiency. Of the known transformation techniques there is one that is called‘unfolding’. This performs some of the computation at compile time. In addition, for a particular application, it may be possible to specialize a program so that the transformed program computes the required answers for only a restricted set of goals. Partial evaluation is a program transformation that combines the unfolding and specialization techniques. In order that any answer computed using a partially evaluated program could also have been computed using the original program, it is neccessary that the partial evaluation satisfies certian conditions (called coveredness and independence). Unfortunately, this may prevent the partial evalution achieving its aim of producing a more efficient program. By means of a transformation that dynamically introduces new predicates and their definitions, we show how the restrictions caused by these conditions can be overcome. A partial evaluation will, in general, contain redundant functions and unnecessary repetition of variables. This can cause inefficiency in the use of space and time by the transformed program. The second transformation described here cleans up a partial evaluation removing any unnecessary symb

著录项

获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号