<!-- 
RSS generated by JIRA (4.4#649-r158309) at Sun May 19 07:50:36 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://dev.clojure.org/jira/si/jira.issueviews:issue-xml/LOGIC-91/LOGIC-91.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Clojure JIRA</title>
    <link>http://dev.clojure.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>4.4</version>
        <build-number>649</build-number>
        <build-date>25-07-2011</build-date>
    </build-info>

<item>
            <title>[LOGIC-91] nom/tie and spurious reification of predc constraint</title>
                <link>http://dev.clojure.org/jira/browse/LOGIC-91</link>
                <project id="10020" key="LOGIC">core.logic</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(is (= (run* [q]
           (nom/fresh [a]
             (fresh [x]
               (predc x number? `number?)
               (== x 1)
               (== (nom/tie a [a x]) q))))
        [(nom/tie &apos;a_0 &apos;(a_0 1))]))
  (is (= (run* [q]
           (nom/fresh [a]
             (fresh [x]
               (== x 1)
               (predc x number? `number?)
               (== (nom/tie a [a x]) q))))
        [(nom/tie &apos;a_0 &apos;(a_0 1))])) ;; &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt; b/c of extra :- number? constraint&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="15936">LOGIC-91</key>
            <summary>nom/tie and spurious reification of predc constraint</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="1" iconUrl="http://dev.clojure.org/jira/images/icons/priority_blocker.gif">Blocker</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="dnolen">David Nolen</assignee>
                                <reporter username="namin">Nada Amin</reporter>
                        <labels>
                    </labels>
                <created>Wed, 2 Jan 2013 04:57:52 -0600</created>
                <updated>Wed, 2 Jan 2013 08:46:44 -0600</updated>
                    <resolved>Wed, 2 Jan 2013 08:46:44 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30348" author="namin" created="Wed, 2 Jan 2013 05:07:48 -0600"  >&lt;p&gt;Implementing -force-ans in Tie&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;clojure.core.logic.IForceAnswerTerm
  (-force-ans [v x]
    (force-ans (:body v)))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;resolves the test above, but not this one:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(is (= (run* [q]
           (nom/fresh [a b c]
             (fresh [x y]
               (== x 1)
               (predc x number? `number?)
               (== (nom/tie b (nom/tie a [a x])) (nom/tie c q)))))
        [(nom/tie &apos;a_0 &apos;(a_0 1))])) ;; still &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt; b/c of extra :- number? constraint&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="30352" author="dnolen" created="Wed, 2 Jan 2013 08:15:48 -0600"  >&lt;p&gt;This issue actually impacts any &quot;single shot&quot; constraint that implements `-relevant?` as simply returning `true`. The problem is that the `cgoal` constraint wrapper checks `runnable?`, runs the constraint, and then checks `relevant?` and if that&apos;s true adds the constraint even though it may  very well may be entailed!&lt;/p&gt;

&lt;p&gt;There are 6 constraints (1 of them the `defc` macro) which implement `-relevant?` as returning `true`. I think we should have more support (a protocol) for constraints which are essentially &quot;single shot&quot; and don&apos;t need to bother with implementing the `IRelevant` protocol.&lt;/p&gt;

&lt;p&gt;For some background - the CLP(FD) constraints benefit most from the `IRelevant` protocol, where the constraints involve up to 3 terms and a considerable amount of propagation work may be avoided by doing some checking up front.&lt;/p&gt;</comment>
                    <comment id="30353" author="namin" created="Wed, 2 Jan 2013 08:19:35 -0600"  >&lt;p&gt;Hi David,&lt;/p&gt;

&lt;p&gt;I have a fix proposed in pull request &lt;a href=&quot;https://github.com/clojure/core.logic/pull/15&quot;&gt;https://github.com/clojure/core.logic/pull/15&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The idea there is that to honor single-shot constraints, we only need to honor the (remcg this) that they contain. This is only possible if they have proper ids. That&apos;s what I fix.&lt;/p&gt;

&lt;p&gt;Let me know what you think.&lt;/p&gt;</comment>
                    <comment id="30354" author="dnolen" created="Wed, 2 Jan 2013 08:46:44 -0600"  >&lt;p&gt;fixed, &lt;a href=&quot;http://github.com/clojure/core.logic/commit/020f730429d71315f752ea51abad20dca896c8b0&quot;&gt;http://github.com/clojure/core.logic/commit/020f730429d71315f752ea51abad20dca896c8b0&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>
</channel>
</rss>