<!-- 
RSS generated by JIRA (4.4#649-r158309) at Tue May 21 09:52:26 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-79/LOGIC-79.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-79] Setting finite domain on more than two lvars using domain fn throws UnsupportedOperationException</title>
                <link>http://dev.clojure.org/jira/browse/LOGIC-79</link>
                <project id="10020" key="LOGIC">core.logic</project>
                        <description>&lt;p&gt;When specifying domains on more than two lvars core.logic 0.8.0-beta3 throws an UnsupportedOperationException. Here&apos;s an example:&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;(run* [q]
    (fresh [x y z]
        (infd x y z (domain 1 2 3))
  	    (&amp;lt;fd x y)
  	    (&amp;lt;fd y z)
        (== q [x y z])))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;ul&gt;
	&lt;li&gt;0.8.0-beta2: nil.&lt;/li&gt;
	&lt;li&gt;0.8.0-beta3: UnsupportedOperationException count not supported on this type: FiniteDomain  clojure.lang.RT.countFrom (RT.java:545)&lt;/li&gt;
	&lt;li&gt;0.8.0-beta4-SNAPSHOT (739ec7e): (&lt;span class=&quot;error&quot;&gt;&amp;#91;1 2 3&amp;#93;&lt;/span&gt;) (correct result)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I&apos;ve checked and commit 07f2f6a introduced the fix, so this is possibly related to &lt;a href=&quot;http://dev.clojure.org/jira/browse/LOGIC-77&quot; title=&quot;Finite-domain vars inside a vector crash when constrained.&quot;&gt;&lt;del&gt;LOGIC-77&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;When trying to isolate the bug I found that:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Using `(interval 1 3)` instead of `(domain 1 2 3)` works.&lt;/li&gt;
	&lt;li&gt;Using two fresh variables instead of three works:&lt;/li&gt;
&lt;/ul&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;(run* [q]
      (fresh [x y]
	      (infd x y (domain 1 2))
  	    (&amp;lt;fd x y)
        (== q [x y])))
;=&amp;gt; ([1 2])&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Here&apos;s a test that checks the behavior. The test works in the latest version but fails in all commits before 07f2f6a.&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;(deftest test-domfd-three-lvars []
  (is (= (run* [q]
           (fresh [x y z]
           (infd x y z (domain 1 2 3))
           (&amp;lt;fd x y)
           (&amp;lt;fd y z)
           (== q [x y z])))
         &apos;([1 2 3]))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

</description>
                <environment>Clojure 1.4.0 , core.logic 0.8.0-beta3</environment>
            <key id="15900">LOGIC-79</key>
            <summary>Setting finite domain on more than two lvars using domain fn throws UnsupportedOperationException</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="2">Declined</resolution>
                                <assignee username="dnolen">David Nolen</assignee>
                                <reporter username="frederikdb">Frederik De Bleser</reporter>
                        <labels>
                    </labels>
                <created>Tue, 18 Dec 2012 08:37:25 -0600</created>
                <updated>Thu, 20 Dec 2012 23:51:55 -0600</updated>
                    <resolved>Thu, 20 Dec 2012 23:51:55 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30250" author="dnolen" created="Tue, 18 Dec 2012 09:29:11 -0600"  >&lt;p&gt;So is there a bug in master or not? To keep tracking issues simpler, if the bug does not exist in master please don&apos;t open a ticket.&lt;/p&gt;</comment>
                    <comment id="30251" author="frederikdb" created="Tue, 18 Dec 2012 09:34:36 -0600"  >&lt;p&gt;The issue is fixed in master.&lt;/p&gt;

&lt;p&gt;I still wanted to report it since it seems to somehow relate to &lt;a href=&quot;http://dev.clojure.org/jira/browse/LOGIC-77&quot; title=&quot;Finite-domain vars inside a vector crash when constrained.&quot;&gt;&lt;del&gt;LOGIC-77&lt;/del&gt;&lt;/a&gt; &#8211; maybe I should just have added a comment there.&lt;/p&gt;

&lt;p&gt;Sorry for the confusion.&lt;/p&gt;</comment>
                    <comment id="30274" author="dnolen" created="Thu, 20 Dec 2012 23:51:55 -0600"  >&lt;p&gt;Not relevant to master.&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>