arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv cs/0406026cs.SEcs.PL
收藏

Prolog程序的改进:重构Prolog

Improving Prolog Programs: Refactoring for Prolog

Tom Schrijvers, Alexander Serebrenik

摘要:

重构是一种来自OO社区的重组代码的成熟技术:它旨在提高软件的可读性,可维护性和可扩展性。虽然重构并不特别与OO范式相联系,但它的思想直到现在还没有应用到逻辑编程中。本文将重构思想应用于Prolog程序。一个目录列出了根据范围分类的重构。一些重构是从OO范式改编而来的,而另一些则是专门为Prolog设计的。Prolog中的意图语义和操作语义之间的差异也通过一些重构来解决。此外,ViPReSS,一个半自动重构浏览器,进行了讨论和应用\vipress的经验,一个大型的Prolog遗留系统的报告。我们的主要结论是,重构不仅是一个可行的技术在Prolog,但也是一个相当可取的。

英文摘要:

Refactoring is an established technique from the OO-community to restructure code: it aims at improving software readability, maintainability and extensibility. Although refactoring is not tied to the OO-paradigm in particular, its ideas have not been applied to Logic Programming until now. This paper applies the ideas of refactoring to Prolog programs. A catalogue is presented listing refactorings classified according to scope. Some of the refactorings have been adapted from the OO-paradigm, while others have been specifically designed for Prolog. Also the discrepancy between intended and operational semantics in Prolog is addressed by some of the refactorings. In addition, ViPReSS, a semi-automatic refactoring browser, is discussed and the experience with applying \vipress to a large Prolog legacy system is reported. Our main conclusion is that refactoring is not only a viable technique in Prolog but also a rather desirable one.

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

↑