<p>(forwarding to the list)</p>
<div class="gmail_quote">---------- Forwarded message ----------<br>From: &quot;Rob Arthan&quot; &lt;<a href="mailto:rda@lemma-one.com">rda@lemma-one.com</a>&gt;<br>Date: Aug 17, 2012 8:25 AM<br>Subject: Re: cannot build opentheory<br>
To: &quot;Ramana Kumar&quot; &lt;<a href="mailto:ramana.kumar@gmail.com">ramana.kumar@gmail.com</a>&gt;<br><br type="attribution">Ramana,<br>
<br>
Thanks. I think this is the same problem but I think it might not have been explained properly to David Matthews. The problem is clearly an unintended loop at compile time and if you make minor adjustments to the source it compiles. I have pinpointed the exact function binding that causes the problem and have sent a slightly cut-down version of the source to David.<br>

<br>
Regards,<br>
<br>
Rob.<br>
<div class="elided-text"><br>
On 16 Aug 2012, at 15:20, Ramana Kumar wrote:<br>
<br>
&gt; Rob, the forwarded conversations below from last year may be of<br>
&gt; interest for your Poly/ML problem. I thought they were in the list<br>
&gt; archive, but apparently not (until now).<br>
&gt;<br>
&gt; ---------- Forwarded message ----------<br>
&gt; From: Ramana Kumar &lt;<a href="mailto:ramana.kumar@gmail.com">ramana.kumar@gmail.com</a>&gt;<br>
&gt; Date: Mon, Sep 19, 2011 at 11:47 AM<br>
&gt; Subject: Re: cannot build opentheory<br>
&gt; To: David Matthews &lt;<a href="mailto:David.Matthews@prolingua.co.uk">David.Matthews@prolingua.co.uk</a>&gt;<br>
&gt; Cc: Joe Hurd &lt;<a href="mailto:joe@gilith.com">joe@gilith.com</a>&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Mon, Sep 19, 2011 at 4:34 PM, David Matthews<br>
&gt; &lt;<a href="mailto:David.Matthews@prolingua.co.uk">David.Matthews@prolingua.co.uk</a>&gt; wrote:<br>
&gt;&gt; An infinite loop could be a problem with the compiler but I have seen this<br>
&gt;&gt; with storage allocator.  Is this on 32-bit or 64-bit?  You could try a<br>
&gt;&gt; larger value of -H.  This sets the initial heap size and also controls the<br>
&gt;&gt; step-size when it needs to increase the heap.  The debug settings are quite<br>
&gt;&gt; limited in 5.4.1.  I&#39;ve extended them quite a bit in SVN HEAD.<br>
&gt;<br>
&gt; I am using SVN r1324 at the moment. I am on 64-bit. I&#39;ll happily try<br>
&gt; any debug or other options you think would be helpful. In fact I&#39;ll<br>
&gt; try a larger -H1000 now... it still appears to be stopping at the same<br>
&gt; point. (I&#39;ll leave it running for another 10 minutes...)<br>
&gt;<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; David<br>
&gt;&gt;<br>
&gt;&gt; On 19/09/2011 16:24, Ramana Kumar wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Mon, Sep 19, 2011 at 3:26 PM, David Matthews<br>
&gt;&gt;&gt; &lt;<a href="mailto:David.Matthews@prolingua.co.uk">David.Matthews@prolingua.co.uk</a>&gt;  wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; It may be a problem with the garbage-collector especially if you&#39;re using<br>
&gt;&gt;&gt;&gt; the SVN version.  Try giving an explicit heap size (e.g. -H500) on the<br>
&gt;&gt;&gt;&gt; poly<br>
&gt;&gt;&gt;&gt; line and see if that makes a difference.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Adding -H500 appears not to make any difference. Is that supposed to<br>
&gt;&gt;&gt; limit the heap size, or just set its initial size? Are the debug<br>
&gt;&gt;&gt; options listed anywhere?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; David<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On 16/09/2011 12:39, Ramana Kumar wrote:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; After seeing your timings I wanted to try polyml again, and<br>
&gt;&gt;&gt;&gt;&gt; unfortunately it still appears to go into an infinite loop while<br>
&gt;&gt;&gt;&gt;&gt; building opentheory.<br>
&gt;&gt;&gt;&gt;&gt; This could be a bug in polyml. In fact, I you say it definitely is,<br>
&gt;&gt;&gt;&gt;&gt; since you can get it to build with a different version?<br>
&gt;&gt;&gt;&gt;&gt; I am using version 5.4.1 (svn r1324).<br>
&gt;&gt;&gt;&gt;&gt; It goes into the loop when trying to interpret the code starting at<br>
&gt;&gt;&gt;&gt;&gt; line 56548 in bin/polyml/selftest.sml (the definition of ppTerm in the<br>
&gt;&gt;&gt;&gt;&gt; Haskell structure).<br>
&gt;&gt;&gt;&gt;&gt; Do you have any ideas on how to isolate the problem? Maybe I should<br>
&gt;&gt;&gt;&gt;&gt; also leave it running for longer to see if it&#39;s really a loop (I&#39;ve<br>
&gt;&gt;&gt;&gt;&gt; only left it for about 15 minutes - how long does it take to build<br>
&gt;&gt;&gt;&gt;&gt; with your working version of poly?)<br>
&gt;&gt;&gt;&gt;&gt; I am CC&#39;ing Dave Matthews in case he has any questions or ideas..<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; On Thu, Sep 15, 2011 at 11:09 PM, Ramana Kumar&lt;<a href="mailto:ramana.kumar@gmail.com">ramana.kumar@gmail.com</a>&gt;<br>
&gt;&gt;&gt;&gt;&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; On Thu, Sep 15, 2011 at 11:01 PM, Joe Hurd&lt;<a href="mailto:joe@gilith.com">joe@gilith.com</a>&gt;    wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Hi Ramana,<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; With polyml, gilith/basic appears to fail one of it selftests and<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; building opentheory appears to go into an infinite loop.<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Poly/ML seems to be misbehaving in ways I don&#39;t understand right now.<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; I&#39;m investigating this, and will let you know what I find out.<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; I installed the Hombrew<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; <a href="http://mxcl.github.com/homebrew/" target="_blank">http://mxcl.github.com/homebrew/</a><br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; version of Poly/ML for my Mac, and basic and opentheory seem to work<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; fine now. I was seeing the same behaviour as you before I did that, so<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; perhaps there&#39;s a dodgy version of Poly/ML in circulation?<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Maybe. I usually use a pretty bleeding edge poly too (i.e. svn rather<br>
&gt;&gt;&gt;&gt;&gt;&gt; than a release, although I don&#39;t svn up that often).<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Is this problem blocking you?<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; I have both mosml and mlton too so it&#39;s not a major problem.<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Cheers,<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Joe<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;<br>
<br>
</div></div>