Better Termination for Prolog with Constraints
Markus Triska, Ulrich Neumerkel, Jan Wielemaker

TL;DR
This paper enhances Prolog's termination reliability by introducing dynamic occurs-check detection and a generalized finite domain solver, addressing key issues that hinder termination analysis in constraint-based Prolog systems.
Contribution
It presents novel solutions for dynamic occurs-check detection and a finite domain solver, improving Prolog's termination properties and analysis reliability.
Findings
Dynamic occurs-check detection improves unification safety.
A generalized finite domain solver ensures termination with unbounded domains.
Prolog's termination analysis is significantly enhanced.
Abstract
Termination properties of actual Prolog systems with constraints are fragile and difficult to analyse. The lack of the occurs-check, moded and overloaded arithmetical evaluation via is/2 and the occasional nontermination of finite domain constraints are all sources for invalidating termination results obtained by current termination analysers that rely on idealized assumptions. In this paper, we present solutions to address these problems on the level of the underlying Prolog system. Improved unification modes meet the requirements of norm based analysers by offering dynamic occurs-check detection. A generalized finite domain solver overcomes the shortcomings of conventional arithmetic without significant runtime overhead. The solver offers unbounded domains, yet propagation always terminates. Our work improves Prolog's termination and makes Prolog a more reliable target for termination…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, Reasoning, and Knowledge · Logic, programming, and type systems · Model-Driven Software Engineering Techniques
