Saved in:
Bibliographic Details
Main Authors: Guo, Xiangyu, Bansal, Ajay
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2408.16257
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916373977890816
author Guo, Xiangyu
Bansal, Ajay
author_facet Guo, Xiangyu
Bansal, Ajay
contents We improve the backward compatibility of stableKanren to run miniKanren programs. stableKanren is a miniKanren extension capable of non-monotonic reasoning through stable model semantics. However, standard miniKanren programs that produce infinite results do not run as expected in stableKanren. According to stable model semantics, the contradictions are created by negations. A standard miniKanren's relations do not involve negation, and the coarse contradictions handling in stableKanren causes this compatibility issue. Therefore, we provide a find-grinded contradiction handling to restrict the checking scope. As a result, standard miniKanren relations can produce answers. We also add a ``run-partial'' interface so that standard miniKanren's relations implemented with ``define''/``defineo'' can generate answers even if they coexist with non-terminating or unsatisfiable stableKanren relations in the same environment. The ``run-partial'' interface also supports running stratified negation programs faster without checking global unavoidable contradictions. A dependency graph analysis can be applied to the input query in the future, so the ``run'' interface can implicitly decide whether to perform unavoidable contradictions checking to improve usability.
format Preprint
id arxiv_https___arxiv_org_abs_2408_16257
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Improving stableKanren's Backward Compatibility
Guo, Xiangyu
Bansal, Ajay
Programming Languages
03B70, 68T27, 68T30
D.3.0
We improve the backward compatibility of stableKanren to run miniKanren programs. stableKanren is a miniKanren extension capable of non-monotonic reasoning through stable model semantics. However, standard miniKanren programs that produce infinite results do not run as expected in stableKanren. According to stable model semantics, the contradictions are created by negations. A standard miniKanren's relations do not involve negation, and the coarse contradictions handling in stableKanren causes this compatibility issue. Therefore, we provide a find-grinded contradiction handling to restrict the checking scope. As a result, standard miniKanren relations can produce answers. We also add a ``run-partial'' interface so that standard miniKanren's relations implemented with ``define''/``defineo'' can generate answers even if they coexist with non-terminating or unsatisfiable stableKanren relations in the same environment. The ``run-partial'' interface also supports running stratified negation programs faster without checking global unavoidable contradictions. A dependency graph analysis can be applied to the input query in the future, so the ``run'' interface can implicitly decide whether to perform unavoidable contradictions checking to improve usability.
title Improving stableKanren's Backward Compatibility
topic Programming Languages
03B70, 68T27, 68T30
D.3.0
url https://arxiv.org/abs/2408.16257