{"title":"Improving stableKanren's Backward Compatibility","authors":"Xiangyu Guo, Ajay Bansal","doi":"arxiv-2408.16257","DOIUrl":null,"url":null,"abstract":"We improve the backward compatibility of stableKanren to run miniKanren\nprograms. stableKanren is a miniKanren extension capable of non-monotonic\nreasoning through stable model semantics. However, standard miniKanren programs\nthat produce infinite results do not run as expected in stableKanren. According\nto stable model semantics, the contradictions are created by negations. A\nstandard miniKanren's relations do not involve negation, and the coarse\ncontradictions handling in stableKanren causes this compatibility issue.\nTherefore, we provide a find-grinded contradiction handling to restrict the\nchecking scope. As a result, standard miniKanren relations can produce answers.\nWe also add a ``run-partial'' interface so that standard miniKanren's relations\nimplemented with ``define''/``defineo'' can generate answers even if they\ncoexist with non-terminating or unsatisfiable stableKanren relations in the\nsame environment. The ``run-partial'' interface also supports running\nstratified negation programs faster without checking global unavoidable\ncontradictions. A dependency graph analysis can be applied to the input query\nin the future, so the ``run'' interface can implicitly decide whether to\nperform unavoidable contradictions checking to improve usability.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2024-08-29","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Programming Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2408.16257","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
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.