arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1708.07222cs.PLcs.LO
收藏

协同编程逻辑程序到等价CHR程序的转换

Transforming Coroutining Logic Programs into Equivalent CHR Programs

Vincent Nys, Danny De Schreye

摘要:

我们扩展了一种称为编译控制的技术。该技术将协同程序设计逻辑程序转换为逻辑程序,当在标准的从左到右选择规则下执行时(并且不使用任何延迟特征),该逻辑程序具有与协同程序设计相同的计算行为。在最近的工作中,我们修改了编译控制,并将其重新表述为抽象合取部分演绎的实例。这项工作主要集中在编译控制中执行的程序分析。在当前的文件中,我们专注于合成的转换程序。代替合成一个新的逻辑程序,我们合成一个模拟协同程序的Prolog程序。对递归的综合产生只包含简化规则的程序,这些规则特别适合于某些静态分析技术。这些程序也更简洁和可读,并且可以移植到嵌入在其他语言中的Prolog实现。

英文摘要:

We extend a technique called Compiling Control. The technique transforms coroutining logic programs into logic programs that, when executed under the standard left-to-right selection rule (and not using any delay features) have the same computational behavior as the coroutining program. In recent work, we revised Compiling Control and reformulated it as an instance of Abstract Conjunctive Partial Deduction. This work was mostly focused on the program analysis performed in Compiling Control. In the current paper, we focus on the synthesis of the transformed program. Instead of synthesizing a new logic program, we synthesize a CHR(Prolog) program which mimics the coroutining program. The synthesis to CHR yields programs containing only simplification rules, which are particularly amenable to certain static analysis techniques. The programs are also more concise and readable and can be ported to CHR implementations embedded in other languages than Prolog.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑