<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions and answers in core.logic</title>
<link>https://ask.clojure.org/index.php/qa/contrib-libs/core-logic</link>
<description></description>
<item>
<title>Answered: bug in core.logic with featurec searching for logic variables</title>
<link>https://ask.clojure.org/index.php/12427/bug-core-logic-with-featurec-searching-for-logic-variables?show=12437#a12437</link>
<description>&lt;p&gt;featurec cannot have logic variables (ground or not) as keys&lt;/p&gt;
&lt;p&gt;as a perquisite for logically dealing with maps with keys that are lvars, you have to be able to deal with sets that contain lvars (not just handling a set data structure, but understanding the logic of sets) and core.logic doesn't have code for that, so it both cannot handle logic on sets (&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/LOGIC-56&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-56&lt;/a&gt; was &quot;fixed&quot; by removing the nascent support core.logic had for sets because it wasn't logically correct) and cannot handle lvars as map keys.&lt;/p&gt;
&lt;p&gt;Handling sets is a prereq for handling map keys because keys in a map are a set.&lt;/p&gt;
</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12427/bug-core-logic-with-featurec-searching-for-logic-variables?show=12437#a12437</guid>
<pubDate>Wed, 07 Dec 2022 22:59:19 +0000</pubDate>
</item>
<item>
<title>Answered: core.logic problem</title>
<link>https://ask.clojure.org/index.php/11103/core-logic-problem?show=11121#a11121</link>
<description>&lt;p&gt;I think you forgot to refer to &lt;code&gt;==&lt;/code&gt; from core.logic, and are using clojure.core/== which explains the numbers error.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(require '[clojure.core.logic :as l]
         '[clojure.core.logic.pldb :as db])

(db/db-rel In-zone a b)

(def facts (db/db [In-zone 'A 'B])) 

(println
   (db/with-db facts
    (l/run* [q]
      (l/fresh [x y]
        (In-zone x y)
        (l/== q [x y])))))

;;([A B])
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11103/core-logic-problem?show=11121#a11121</guid>
<pubDate>Thu, 30 Sep 2021 05:26:48 +0000</pubDate>
</item>
<item>
<title>Answered: clojure.core.logic/project returning LVar instead of bound value</title>
<link>https://ask.clojure.org/index.php/10565/clojure-core-logic-project-returning-lvar-instead-bound-value?show=10600#a10600</link>
<description>&lt;p&gt;the fact that you are getting an lvar out of project means there isn't a &quot;current value of the LVar  vhead&quot;&lt;/p&gt;
&lt;p&gt;Project is non-relational, what this largely means is it is very order dependent, &lt;/p&gt;
&lt;p&gt;for example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;user=&amp;gt; (doall (l/run 1 [q] (l/fresh []  (l/== q 1) (l/project [q] (do (println q) l/succeed)))))
1
(1)
user=&amp;gt; (doall (l/run 1 [q] (l/fresh [] (l/project [q] (do (println q) l/succeed)) (l/== q 1))))
&amp;lt;lvar:q__3358&amp;gt;
(1)
user=&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So when you get an lvar instead of the value you expect, it is because the goals that you expect to assign a value to the lvar have not been executed yet.&lt;/p&gt;
&lt;p&gt;I don't know what your level of experience is with core.logic/prolog/minikanren, but if are starting out/learning, I recommend forgetting that project exists. It can be a useful hack(for debugging, performance, or for writing interfaces between core.logic and other systems), but if your goal is to write logic programs, it will get in your way. &lt;/p&gt;
</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10565/clojure-core-logic-project-returning-lvar-instead-bound-value?show=10600#a10600</guid>
<pubDate>Wed, 12 May 2021 22:02:46 +0000</pubDate>
</item>
<item>
<title>Answered: Can core.logic reason about sets?</title>
<link>https://ask.clojure.org/index.php/9889/can-core-logic-reason-about-sets?show=10061#a10061</link>
<description>&lt;p&gt;Curious if you could wrangle something (at least membership) via &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojuredocs.org/clojure.core.logic/featurec&quot;&gt;featurec&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I think the set-to-list is idiomatic though.&lt;/p&gt;
</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/9889/can-core-logic-reason-about-sets?show=10061#a10061</guid>
<pubDate>Fri, 15 Jan 2021 14:28:22 +0000</pubDate>
</item>
<item>
<title>Answered: Memoization in core.logic</title>
<link>https://ask.clojure.org/index.php/9905/memoization-in-core-logic?show=9906#a9906</link>
<description>&lt;p&gt;Never tried it, but I think it's called &quot;tabling&quot; in clojure.core.logic.  Does &lt;code&gt;tabled&lt;/code&gt; help?  &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.github.io/core.logic/#clojure.core.logic/tabled&quot;&gt;https://clojure.github.io/core.logic/#clojure.core.logic/tabled&lt;/a&gt;&lt;/p&gt;
</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/9905/memoization-in-core-logic?show=9906#a9906</guid>
<pubDate>Sun, 29 Nov 2020 12:23:05 +0000</pubDate>
</item>
<item>
<title>Answered: If a map is a coll, why can't conso take its first element?</title>
<link>https://ask.clojure.org/index.php/8895/if-a-map-is-a-coll-why-cant-conso-take-its-first-element?show=8896#a8896</link>
<description>&lt;p&gt;Conso only works for ordered collections, which is why it does not work for sets and maps. Without order there is no meaningful notion of first and rest. I would agree that the documentation for conso could be clarified by prepending &quot;ordered&quot; to collection.&lt;/p&gt;
</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/8895/if-a-map-is-a-coll-why-cant-conso-take-its-first-element?show=8896#a8896</guid>
<pubDate>Sun, 24 Nov 2019 21:11:51 +0000</pubDate>
</item>
<item>
<title>Answered: lein deps and lein classpath fail for current core.logic, where to report?</title>
<link>https://ask.clojure.org/index.php/8831/lein-deps-lein-classpath-fail-current-core-logic-where-report?show=8832#a8832</link>
<description>&lt;p&gt;The project.clj file for this project is not used, which is likely why it's out of date and not working This is a Maven project, and the pom.xml is the canonical project file here.&lt;/p&gt;
&lt;p&gt;I'm happy to fix the project.clj, but it's really not the way to run stuff for this project.&lt;/p&gt;
</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/8831/lein-deps-lein-classpath-fail-current-core-logic-where-report?show=8832#a8832</guid>
<pubDate>Wed, 06 Nov 2019 01:34:34 +0000</pubDate>
</item>
<item>
<title>Answered: Add non-interleaving version of conde</title>
<link>https://ask.clojure.org/index.php/7251/add-non-interleaving-version-of-conde?show=7361#a7361</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-165&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-165&lt;/a&gt; (reported by dnolen)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7251/add-non-interleaving-version-of-conde?show=7361#a7361</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: relevant-var? logic incorrectly discards a vars constraint set</title>
<link>https://ask.clojure.org/index.php/7281/relevant-var-logic-incorrectly-discards-vars-constraint-set?show=7424#a7424</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-96&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-96&lt;/a&gt; (reported by dnolen)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7281/relevant-var-logic-incorrectly-discards-vars-constraint-set?show=7424#a7424</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: Running rembero returns  :- (!= _0 _0)</title>
<link>https://ask.clojure.org/index.php/7274/running-rembero-returns-0-0?show=7411#a7411</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-181&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-181&lt;/a&gt; (reported by alex+import)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7274/running-rembero-returns-0-0?show=7411#a7411</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: An lvar unified with a keyword behaves differently from a keyword</title>
<link>https://ask.clojure.org/index.php/7275/lvar-unified-with-keyword-behaves-differently-from-keyword?show=7412#a7412</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-182&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-182&lt;/a&gt; (reported by alex+import)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7275/lvar-unified-with-keyword-behaves-differently-from-keyword?show=7412#a7412</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: finite domain uncomplete results</title>
<link>https://ask.clojure.org/index.php/7276/finite-domain-uncomplete-results?show=7413#a7413</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-185&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-185&lt;/a&gt; (reported by alex+import)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7276/finite-domain-uncomplete-results?show=7413#a7413</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: walk* of an empty set overflows the stack</title>
<link>https://ask.clojure.org/index.php/7277/walk-of-an-empty-set-overflows-the-stack?show=7415#a7415</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-154&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-154&lt;/a&gt; (reported by hiredman)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7277/walk-of-an-empty-set-overflows-the-stack?show=7415#a7415</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: StackOverFlowError when walking over set</title>
<link>https://ask.clojure.org/index.php/7278/stackoverflowerror-when-walking-over-set?show=7418#a7418</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-130&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-130&lt;/a&gt; (reported by alex+import)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7278/stackoverflowerror-when-walking-over-set?show=7418#a7418</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: is macro needs to be improved</title>
<link>https://ask.clojure.org/index.php/7279/is-macro-needs-to-be-improved?show=7421#a7421</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-47&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-47&lt;/a&gt; (reported by dnolen)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7279/is-macro-needs-to-be-improved?show=7421#a7421</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: tie disequality</title>
<link>https://ask.clojure.org/index.php/7280/tie-disequality?show=7422#a7422</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-119&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-119&lt;/a&gt; (reported by namin)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7280/tie-disequality?show=7422#a7422</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: Logic Threading Macro</title>
<link>https://ask.clojure.org/index.php/7282/logic-threading-macro?show=7426#a7426</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-38&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-38&lt;/a&gt; (reported by jasonjckn)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7282/logic-threading-macro?show=7426#a7426</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: Guard against arity missmatches between rels, facts and retractions</title>
<link>https://ask.clojure.org/index.php/7272/guard-against-arity-missmatches-between-facts-retractions?show=7403#a7403</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-164&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-164&lt;/a&gt; (reported by arrdem)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7272/guard-against-arity-missmatches-between-facts-retractions?show=7403#a7403</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: one-shot constraints with multiple rands may run more than once</title>
<link>https://ask.clojure.org/index.php/7283/one-shot-constraints-with-multiple-rands-may-more-than-once?show=7429#a7429</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-117&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-117&lt;/a&gt; (reported by namin)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7283/one-shot-constraints-with-multiple-rands-may-more-than-once?show=7429#a7429</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: defrel cannot be called inside function</title>
<link>https://ask.clojure.org/index.php/7284/defrel-cannot-be-called-inside-function?show=7432#a7432</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-28&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-28&lt;/a&gt; (reported by jasonjckn)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7284/defrel-cannot-be-called-inside-function?show=7432#a7432</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: nafc doesn't work with more complex goals</title>
<link>https://ask.clojure.org/index.php/7285/nafc-doesnt-work-with-more-complex-goals?show=7439#a7439</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-172&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-172&lt;/a&gt; (reported by tsdh)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7285/nafc-doesnt-work-with-more-complex-goals?show=7439#a7439</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: equality of non-unique lvars broken for clojure 1.7</title>
<link>https://ask.clojure.org/index.php/7249/equality-of-non-unique-lvars-broken-for-clojure-1-7?show=7344#a7344</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-169&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-169&lt;/a&gt; (reported by alex+import)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7249/equality-of-non-unique-lvars-broken-for-clojure-1-7?show=7344#a7344</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: Finite Domains - Two consecutive calls to run* return different results</title>
<link>https://ask.clojure.org/index.php/7286/finite-domains-consecutive-calls-return-different-results?show=7443#a7443</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-156&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-156&lt;/a&gt; (reported by maurolopes)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7286/finite-domains-consecutive-calls-return-different-results?show=7443#a7443</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: The extension of IDisunifyTerms to LCons calls seq on lcons values. LCons doesn't implement ISeq</title>
<link>https://ask.clojure.org/index.php/7287/extension-idisunifyterms-lcons-calls-values-doesnt-implement?show=7447#a7447</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-183&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-183&lt;/a&gt; (reported by hiredman)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7287/extension-idisunifyterms-lcons-calls-values-doesnt-implement?show=7447#a7447</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: Add label goal</title>
<link>https://ask.clojure.org/index.php/7248/add-label-goal?show=7342#a7342</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-133&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-133&lt;/a&gt; (reported by dnolen)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7248/add-label-goal?show=7342#a7342</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: FD logic doesn't always return all solutions</title>
<link>https://ask.clojure.org/index.php/7273/fd-logic-doesnt-always-return-all-solutions?show=7406#a7406</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-162&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-162&lt;/a&gt; (reported by alex+import)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7273/fd-logic-doesnt-always-return-all-solutions?show=7406#a7406</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: Decomplect the narrowing of the constraint space from the search order</title>
<link>https://ask.clojure.org/index.php/7271/decomplect-the-narrowing-constraint-space-from-search-order?show=7401#a7401</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-87&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-87&lt;/a&gt; (reported by jamii)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7271/decomplect-the-narrowing-constraint-space-from-search-order?show=7401#a7401</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: Allow partial matching of keys not existing in a map</title>
<link>https://ask.clojure.org/index.php/7252/allow-partial-matching-of-keys-not-existing-in-a-map?show=7362#a7362</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-168&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-168&lt;/a&gt; (reported by hugoduncan)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7252/allow-partial-matching-of-keys-not-existing-in-a-map?show=7362#a7362</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: walk* exponential in depth of tree terms?</title>
<link>https://ask.clojure.org/index.php/7260/walk-exponential-in-depth-of-tree-terms?show=7372#a7372</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-166&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-166&lt;/a&gt; (reported by tomoj)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7260/walk-exponential-in-depth-of-tree-terms?show=7372#a7372</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: Extending IUnifyTerms doesn't work anymore</title>
<link>https://ask.clojure.org/index.php/7253/extending-iunifyterms-doesnt-work-anymore?show=7363#a7363</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-176&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-176&lt;/a&gt; (reported by alex+import)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7253/extending-iunifyterms-doesnt-work-anymore?show=7363#a7363</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: *locals* is unbound in some calls to `p-&gt;term`</title>
<link>https://ask.clojure.org/index.php/7254/locals-is-unbound-in-some-calls-to-p-term?show=7364#a7364</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-187&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-187&lt;/a&gt; (reported by alex+import)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7254/locals-is-unbound-in-some-calls-to-p-term?show=7364#a7364</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: compile time occurs check for pattern matching</title>
<link>https://ask.clojure.org/index.php/7255/compile-time-occurs-check-for-pattern-matching?show=7366#a7366</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-140&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-140&lt;/a&gt; (reported by dnolen)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7255/compile-time-occurs-check-for-pattern-matching?show=7366#a7366</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: add mod/rem/abs/min/max</title>
<link>https://ask.clojure.org/index.php/7256/add-mod-rem-abs-min-max?show=7367#a7367</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-128&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-128&lt;/a&gt; (reported by dnolen)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7256/add-mod-rem-abs-min-max?show=7367#a7367</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: Replacing Marker Interfaces</title>
<link>https://ask.clojure.org/index.php/7257/replacing-marker-interfaces?show=7368#a7368</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-170&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-170&lt;/a&gt; (reported by alex+import)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7257/replacing-marker-interfaces?show=7368#a7368</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: binding to a deep nested vector takes too much time</title>
<link>https://ask.clojure.org/index.php/7258/binding-to-a-deep-nested-vector-takes-too-much-time?show=7369#a7369</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-177&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-177&lt;/a&gt; (reported by alex+import)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7258/binding-to-a-deep-nested-vector-takes-too-much-time?show=7369#a7369</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: dcg: def--&gt; ClassCastException</title>
<link>https://ask.clojure.org/index.php/7259/dcg-def-classcastexception?show=7371#a7371</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-141&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-141&lt;/a&gt; (reported by glchapman)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7259/dcg-def-classcastexception?show=7371#a7371</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: run macro should take * in addition to n</title>
<link>https://ask.clojure.org/index.php/7261/run-macro-should-take-in-addition-to-n?show=7374#a7374</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-146&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-146&lt;/a&gt; (reported by dnolen)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7261/run-macro-should-take-in-addition-to-n?show=7374#a7374</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: Document how defn/implicit do with multiple goals does not work</title>
<link>https://ask.clojure.org/index.php/7270/document-how-defn-implicit-with-multiple-goals-does-not-work?show=7398#a7398</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-179&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-179&lt;/a&gt; (reported by owickstrom)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7270/document-how-defn-implicit-with-multiple-goals-does-not-work?show=7398#a7398</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: Example of unifier on wiki uses wrong syntax?</title>
<link>https://ask.clojure.org/index.php/7262/example-of-unifier-on-wiki-uses-wrong-syntax?show=7375#a7375</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-178&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-178&lt;/a&gt; (reported by alex+import)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7262/example-of-unifier-on-wiki-uses-wrong-syntax?show=7375#a7375</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: LCons fails for inequality</title>
<link>https://ask.clojure.org/index.php/7263/lcons-fails-for-inequality?show=7376#a7376</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-174&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-174&lt;/a&gt; (reported by sorpaas)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7263/lcons-fails-for-inequality?show=7376#a7376</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: Allow unification with sequential in both directions</title>
<link>https://ask.clojure.org/index.php/7264/allow-unification-with-sequential-in-both-directions?show=7377#a7377</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-123&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-123&lt;/a&gt; (reported by mikera)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7264/allow-unification-with-sequential-in-both-directions?show=7377#a7377</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: spec detects error in -inc macro</title>
<link>https://ask.clojure.org/index.php/7265/spec-detects-error-in-inc-macro?show=7386#a7386</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-180&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-180&lt;/a&gt; (reported by steveminer@gmail.com)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7265/spec-detects-error-in-inc-macro?show=7386#a7386</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: A warning is thrown regarding the redefinition of record? in clojure 1.6.0</title>
<link>https://ask.clojure.org/index.php/7266/warning-thrown-regarding-the-redefinition-record-clojure?show=7390#a7390</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-157&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-157&lt;/a&gt; (reported by alex+import)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7266/warning-thrown-regarding-the-redefinition-record-clojure?show=7390#a7390</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: The order of constraits matters?</title>
<link>https://ask.clojure.org/index.php/7267/the-order-of-constraits-matters?show=7394#a7394</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-189&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-189&lt;/a&gt; (reported by alex+import)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7267/the-order-of-constraits-matters?show=7394#a7394</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: add Prolog meta-logical predicates bagof, setof, findall</title>
<link>https://ask.clojure.org/index.php/7250/add-prolog-meta-logical-predicates-bagof-setof-findall?show=7348#a7348</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-68&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-68&lt;/a&gt; (reported by dnolen)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7250/add-prolog-meta-logical-predicates-bagof-setof-findall?show=7348#a7348</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: spurious disequality constraints</title>
<link>https://ask.clojure.org/index.php/7269/spurious-disequality-constraints?show=7396#a7396</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-186&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-186&lt;/a&gt; (reported by namin)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7269/spurious-disequality-constraints?show=7396#a7396</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: fd/in should provide a default domain if none specified</title>
<link>https://ask.clojure.org/index.php/7268/fd-in-should-provide-a-default-domain-if-none-specified?show=7395#a7395</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-48&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-48&lt;/a&gt; (reported by dnolen)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7268/fd-in-should-provide-a-default-domain-if-none-specified?show=7395#a7395</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Answered: EQ conditions which match against a negative result fail to find any results.</title>
<link>https://ask.clojure.org/index.php/7247/conditions-which-match-against-negative-result-fail-results?show=7339#a7339</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/LOGIC-188&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/LOGIC-188&lt;/a&gt; (reported by enragedginger)</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7247/conditions-which-match-against-negative-result-fail-results?show=7339#a7339</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
<item>
<title>Disequality might not eliminate when `(!= (_0 _0))`</title>
<link>https://ask.clojure.org/index.php/7245/disequality-might-not-eliminate-when-0-0</link>
<description>&lt;p&gt;When a unification constraint and a disequality constraint are applied to the same lvars they might eliminate possibilities.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;&lt;br&gt;
(run 1 [q]&lt;br&gt;
 (fresh [v n]&lt;br&gt;
   (== q v)&lt;br&gt;
   (!= q v)))&lt;/p&gt;
&lt;p&gt;;=&amp;gt; ()&lt;br&gt;
&lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;However when a separate disequality is interleaved the possibility is not eliminated.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;&lt;br&gt;
(run 1 [q]&lt;br&gt;
  (fresh [v n]&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(== q v)
(!= q n)
(!= q v)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;;=&amp;gt; ((_0 :- (!= (_0 _0)) (!= (_0 _1))))&lt;br&gt;
&lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I expected this to also return '().&lt;/p&gt;
</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7245/disequality-might-not-eliminate-when-0-0</guid>
<pubDate>Sun, 06 Dec 2015 02:24:09 +0000</pubDate>
</item>
<item>
<title>StackOverflowError when logic variable is unified with a set</title>
<link>https://ask.clojure.org/index.php/7246/stackoverflowerror-when-logic-variable-is-unified-with-set</link>
<description>&lt;p&gt;It is pretty common to unify a variable with a vector or list of a fixed length like {{(== q (list a b))}} and then define more goals on {{a}} and {{b}} with the intention of being able to define the                         *   query's result format.  However, if one does the same using a set one gets a StackOverflowError.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;&lt;br&gt;
(run* [q]&lt;br&gt;
  (fresh [a b]&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(== q #{a b})  ;; StackOverflowError
;;(== q [a b]) ;; works
;;(== q (list a b)) ;; works, too
(conde [(== a 1)] [(== a 2)] [(== a 3)])
(conde [(== b 1)] [(== b 2)] [(== b 3)])))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Basically, what I wanted to express here is that the order of {{a}} and {{b}} is not significant so that                                                                                         *  } gives me the unique results.&lt;/p&gt;
&lt;p&gt;The backtrace is:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;                 logic.clj:  231  clojure.core.logic/walk*/fn
                 logic.clj:  984  clojure.core.logic/eval8917/fn
             protocols.clj:   55  clojure.core.logic.protocols/eval7398/fn/G
                 logic.clj:  229  clojure.core.logic/walk*
                 logic.clj:  233  clojure.core.logic/walk*/fn
                 logic.clj:  984  clojure.core.logic/eval8917/fn
             protocols.clj:   55  clojure.core.logic.protocols/eval7398/fn/G
                 logic.clj:  229  clojure.core.logic/walk*
                 logic.clj:  233  clojure.core.logic/walk*/fn
                 logic.clj:  984  clojure.core.logic/eval8917/fn
             protocols.clj:   55  clojure.core.logic.protocols/eval7398/fn/G
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;[...]&lt;br&gt;
&lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
</description>
<category>core.logic</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7246/stackoverflowerror-when-logic-variable-is-unified-with-set</guid>
<pubDate>Mon, 03 Aug 2015 09:58:47 +0000</pubDate>
</item>
</channel>
</rss>