arXivDaily arXiv每日学术速递 周一至周五更新
arXiv cs/0201011cs.PLcs.SE
收藏

约束逻辑程序的向后分析

A Backward Analysis for Constraint Logic Programs

Andy King, Lunjin Lu

摘要:

程序开发中一个经常出现的问题是理解如何重用第三方开发的代码。在(约束)逻辑编程的上下文中,这个问题的一部分归结为弄清楚如何查询程序。如果逻辑程序不附带任何文档,则程序员被迫以特别的方式试验查询或跟踪程序的控制流(向后)以推断必须调用谓词的模式,以避免实例化错误。本文提出了一个抽象的解释计划,自动化后者的技术。本文提出的分析可以推断建模属性,如果满足的初始查询,来与保证程序和查询永远不会产生任何建模或实例化错误。分析的其他应用进行了讨论。本文解释了如何抽象域与某些计算属性(他们凝聚)可以用来跟踪控制流向后(从右到左)推断初始查询的有用属性。一个正确性的论点,并提出了一个实施报告。

英文摘要:

One recurring problem in program development is that of understanding how to re-use code developed by a third party. In the context of (constraint) logic programming, part of this problem reduces to figuring out how to query a program. If the logic program does not come with any documentation, then the programmer is forced to either experiment with queries in an ad hoc fashion or trace the control-flow of the program (backward) to infer the modes in which a predicate must be called so as to avoid an instantiation error. This paper presents an abstract interpretation scheme that automates the latter technique. The analysis presented in this paper can infer moding properties which if satisfied by the initial query, come with the guarantee that the program and query can never generate any moding or instantiation errors. Other applications of the analysis are discussed. The paper explains how abstract domains with certain computational properties (they condense) can be used to trace control-flow backward (right-to-left) to infer useful properties of initial queries. A correctness argument is presented and an implementation is reported.

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

↑