<!-- 
RSS generated by JIRA (4.4#649-r158309) at Sun May 26 00:39:38 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-73/LOGIC-73.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-73] Usage of c.c.l/prep can lead to a different result (compared to not using it)</title>
                <link>http://dev.clojure.org/jira/browse/LOGIC-73</link>
                <project id="10020" key="LOGIC">core.logic</project>
                        <description>&lt;p&gt;Below are two expressions that differ only in the use of &lt;tt&gt;c.c.l/prep&lt;/tt&gt;. When using &lt;tt&gt;prep&lt;/tt&gt; there is an extra term returned, that includes a free ?a, which seems wrong, considering the second pattern should unify on the :a key.&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;(let [rules
      [{:pattern (partial-map (prep {:a :clojure.core.logic/not-found :x 1}))
        :production (prep {:a 1})}
       {:pattern (partial-map (prep {:a &apos;?a :c :clojure.core.logic/not-found}))
        :production (prep {:c &apos;(* ?a 2)})}]]
  (run* [q]
    (fresh [pattern production guards rule rule-name]
      (membero {:pattern pattern :production production} rules)
      (== {:x 1}  pattern)
      (== q production))))
  =&amp;gt; ({:a 1} {:c (* _.0 2)})&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;(let [rules
      [{:pattern (partial-map {:a :clojure.core.logic/not-found :x 1})
        :production {:a 1}}
       {:pattern (partial-map {:a &apos;?a :c :clojure.core.logic/not-found})
        :production {:c &apos;(* ?a 2)}}]]
  (run* [q]
    (fresh [pattern production guards rule rule-name]
      (membero {:pattern pattern :production production} rules)
      (== {:x 1}  pattern)
      (== q production))))
  =&amp;gt; ({:a 1})&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="15850">LOGIC-73</key>
            <summary>Usage of c.c.l/prep can lead to a different result (compared to not using it)</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</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="hugoduncan">Hugo Duncan</reporter>
                        <labels>
                    </labels>
                <created>Fri, 23 Nov 2012 16:05:33 -0600</created>
                <updated>Fri, 23 Nov 2012 22:03:36 -0600</updated>
                    <resolved>Fri, 23 Nov 2012 16:34:58 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30023" author="dnolen" created="Fri, 23 Nov 2012 16:34:58 -0600"  >&lt;p&gt;fixed, &lt;a href=&quot;http://github.com/clojure/core.logic/commit/9a964d6c744433825332dd82370cb46eac7919da&quot;&gt;http://github.com/clojure/core.logic/commit/9a964d6c744433825332dd82370cb46eac7919da&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="30025" author="hugoduncan" created="Fri, 23 Nov 2012 22:03:36 -0600"  >&lt;p&gt;The code in the prep case above contains a bug. Both the pattern and production should both be passed in a single call to prep, otherwise they end up with different logic vars. When corrected there is only one term returned when using prep.&lt;/p&gt;

&lt;p&gt;I&apos;m not sure what this means for the necessity or correctness of the fix.&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>