论文标题

使概率与SWI-Promog兼容

Making ProB compatible with SWI-Prolog

论文作者

Geleßus, David, Leuschel, Michael

论文摘要

即使自1995年以来,ISO的序言编程语言的核心已被标准化,但编写复杂的序言程序仍然很难在多个Prolog实施中进行不适应。实际上,实现有时会偏离ISO标准,并且标准本身未能涵盖许多在实践中必不可少的功能。 因此,大多数序言应用都必须依靠非标准功能,通常会使它们依赖于一种特定的序言实现,并且与其他特定的功能不相容。我们研究了一个这样的序言应用:Prob,该应用已在Sicstus Prolog中开发了20多年。 文章介绍了我们如何设法重构Prob的代码库也支持SWI-Prog,目的是使用两个独立的工具链验证Prob的结果。这需要进行多种调整,从扩展Swi-Prolog中的Sicstus仿真到更好地对单片概率代码库进行模块化。我们还描述了我们在此过程中遇到的显着兼容性问题和其他差异,以及我们如何通过很少的主要代码更改来处理它们。 正在考虑在TPLP中接受。

Even though the core of the Prolog programming language has been standardized by ISO since 1995, it remains difficult to write complex Prolog programs that can run unmodified on multiple Prolog implementations. Indeed, implementations sometimes deviate from the ISO standard and the standard itself fails to cover many features that are essential in practice. Most Prolog applications thus have to rely on non-standard features, often making them dependent on one particular Prolog implementation and incompatible with others. We examine one such Prolog application: ProB, which has been developed for over 20 years in SICStus Prolog. The article describes how we managed to refactor the codebase of ProB to also support SWI-Prolog, with the goal of verifying ProB's results using two independent toolchains. This required a multitude of adjustments, ranging from extending the SICStus emulation in SWI-Prolog on to better modularizing the monolithic ProB codebase. We also describe notable compatibility issues and other differences that we encountered in the process, and how we were able to deal with them with few major code changes. Under consideration for acceptance in TPLP.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源