<div>Hi</div><div><br></div><div>I tried to run the pasted and corrected version of the cryptarithm example from the tutorial (cf my preceding post) .</div><div>Alas, I couln't, as I met a segmentation violation.</div>
<div>So I tried to write a small example showing the same problem. Here it is :</div><br><font class="Apple-style-span" face="'courier new', monospace">:- module crypt_crash3.<br>:- interface.<br>:- pred main is det.<br>
:- implementation.<br><br>main :-<br>  CAT = 100 ∗ C % segmentation violation <<<<<<<<<<<<<br>  % CAT = C  % OK ! warning: unresolved polymorphism.  The variables with unbound types were: C: V_1 CAT: V_1</font><div>
<font class="Apple-style-span" face="'courier new', monospace">.<br></font><br>Here is the result of compiling this :<div><br><div><div><font class="Apple-style-span" face="'courier new', monospace">/usr/local/mercury-10.04-beta-2010-06-24/bin/mmc --make crypt_crash3</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace">*** Mercury runtime: caught segmentation violation ***</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">cause: address not mapped to object</font></div><div><font class="Apple-style-span" face="'courier new', monospace">address involved: 0x9994f80</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">This may have been caused by a stack overflow, due to unbounded recursion.</font></div><div><font class="Apple-style-span" face="'courier new', monospace">exiting from signal handler</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">zsh: segmentation fault  /usr/local/mercury-10.04-beta-2010-06-24/bin/mmc --make crypt_crash3</font></div><div><br></div>It is hard to learn Mercury if the compiler does not flag syntax errors correctly !</div>
<div><br></div><div>I put my version of crypt.m that looks good but however makes a segmentation violation here :</div><div><a href="http://jmvanel.free.fr/tmp/crypt.m">http://jmvanel.free.fr/tmp/crypt.m</a></div><div><br>
</div><div>I'm running Ubuntu 10.4 .</div><div><div><font class="Apple-style-span" face="'courier new', monospace">uname -a                                                     </font></div><div><font class="Apple-style-span" face="'courier new', monospace">Linux jmv-desktop 2.6.32-22-generic #33-Ubuntu SMP Wed Apr 28 13:28:05 UTC 2010 x86_64 GNU/Linux</font></div>
<div><br></div><div>with either </div><div>mercury-compiler-10.04-beta-2010-06-24</div><div>or</div><div>mercury-rotd-2010-06-23</div><div><br></div><div>Note that I couldn't install the stable version  13.1.</div><div>
<div><font class="Apple-style-span" face="'courier new', monospace">% make</font></div><div><font class="Apple-style-span" face="'courier new', monospace">....</font></div><div><font class="Apple-style-span" face="'courier new', monospace">mmc --generate-dependencies --grade hlc.gc --mercury-linkage shared --flags LIB_FLAGS --flags INTER_FLAGS --no-warn-nothing-exported mer_std</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">*** Mercury runtime: caught segmentation violation ***</font></div><div><font class="Apple-style-span" face="'courier new', monospace">cause: bad permissions for mapped object</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">address involved: 0xa588f0</font></div><div><font class="Apple-style-span" face="'courier new', monospace">This may have been caused by a stack overflow, due to unbounded recursion.</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">exiting from signal handler</font></div><div><font class="Apple-style-span" face="'courier new', monospace">make[2]: *** [mer_std.depend] Erreur 1</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">make[2]: quittant le répertoire « /home/jmv/src/mercury-compiler-0.13.1/tmp_dir/library »</font></div><div><font class="Apple-style-span" face="'courier new', monospace">To clean up from failed install, remove tmp_dir</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">make[1]: *** [install_grades] Erreur 1</font></div><div><font class="Apple-style-span" face="'courier new', monospace">make[1]: quittant le répertoire « /home/jmv/src/mercury-compiler-0.13.1 »</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">make: *** [install] Erreur 2</font></div></div><div><br></div>-- <br>Jean-Marc Vanel<br>Consulting, services, training,<br>Rule-based programming, Semantic Web<br>
<a href="http://jmvanel.free.fr/">http://jmvanel.free.fr/</a><br>EulerGUI, a turntable GUI for Semantic Web + rules, XML, UML, eCore, Java bytecode<br>+33 (0)6 89 16 29 52 -- +33 (0)1 39 55 58 16<br>( we rarely listen to voice messages, please send a mail instead )<br>
<br></div></div></div>