跳到正文
arXiv:cs.AI· Dominik Magiera, Lukas R\"ohrig, Frank J\"akel·· 4 小时前AI 评分29

WAMpy:用 Python 高效合成 Prolog 程序

WAMpy: Efficient Synthesis of Prolog Programs in Python

AI 导读

WAMpy 是一个面向 Prolog 程序合成的 Python 框架,将 Prolog 子句编译为基于 NumPy 数组的 WAM 指令,并支持针对固定背景知识对假设进行部分重编译,性能关键例程用 Numba JIT 加速。

正文

View PDF HTML (experimental)

Abstract:We present WAMpy, a Python framework optimized for synthesizing Prolog programs. Unlike general-purpose Prolog systems, WAMpy targets workloads that repeatedly generate and evaluate small candidate programs. WAMpy compiles Prolog clauses into NumPy array-based WAM instructions and supports partial recompilation of hypotheses against fixed background knowledge. Performance-critical routines are accelerated using Numba just-in-time (JIT) compilation. In a benchmark of repeated compilation-and-evaluation workloads, WAMpy improves end-to-end performance compared with SWI-Prolog accessed from Python using Janus.
Comments: 4 pages, 2 figures. Accepted as a demo at the 6th International Joint Conference on Learning and Reasoning (IJCLR 2026). Code: this https URL
Subjects: Programming Languages (cs.PL); Artificial Intelligence (cs.AI)
Cite as: arXiv:2610.03234 [cs.PL]
  (or arXiv:2610.03234v1 [cs.PL] for this version)
  https://doi.org/10.48550/arXiv.2610.03234

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Dominik Magiera [view email]
[v1] Fri, 2 Oct 2026 12:44:26 UTC (123 KB)

来源:arXiv:cs.AI · arxiv.org