Re: Simple but crashes !

Daniel Diaz <[email protected]> Tue, 10 May 2016 16:12:02 +0200
Newsgroups gmane.comp.gnu.prolog.bugs
Message-ID <[email protected]>
--===============1934287472202680136==
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta content=3D"text/html; charset=3Dwindows-1252"
      http-equiv=3D"Content-Type">
  </head>
  <body text=3D"#000000" bgcolor=3D"#FFFFFF">
    <div class=3D"moz-cite-prefix">Yes it goes in an infinite loop.<br>
      You can use a list of already visited vertices to avoid such a
      looping in a graph.<br>
      <br>
      Daniel<br>
      <br>
      <br>
      Le 04/05/2016 19:23, Khaled, Mahmoud a =E9crit=A0:<br>
    </div>
    <blockquote
      cite=3D"mid:[email protected]=
n.de"
      type=3D"cite">
      <meta http-equiv=3D"Content-Type" content=3D"text/html;
        charset=3Dwindows-1252">
      <meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{mso-style-priority:34;
	margin-top:0in;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
/* List Definitions */
@list l0
	{mso-list-id:1604459961;
	mso-list-type:hybrid;
	mso-list-template-ids:-585353896 -1 67698691 67698693 67698689 67698691 =
67698693 67698689 67698691 67698693;}
@list l0:level1
	{mso-level-start-at:0;
	mso-level-number-format:bullet;
	mso-level-text:-;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:"Calibri",sans-serif;
	mso-fareast-font-family:"Times New Roman";
	mso-bidi-font-family:Arial;}
@list l0:level2
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:"Courier New";}
@list l0:level3
	{mso-level-number-format:bullet;
	mso-level-text:\F0A7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:Wingdings;}
@list l0:level4
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:Symbol;}
@list l0:level5
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:"Courier New";}
@list l0:level6
	{mso-level-number-format:bullet;
	mso-level-text:\F0A7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:Wingdings;}
@list l0:level7
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:Symbol;}
@list l0:level8
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:"Courier New";}
@list l0:level9
	{mso-level-number-format:bullet;
	mso-level-text:\F0A7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:Wingdings;}
ol
	{margin-bottom:0in;}
ul
	{margin-bottom:0in;}
--></style>
      <div class=3D"WordSection1">
        <p class=3D"MsoNormal">Dear GNU-Prolog team,<o:p></o:p></p>
        <p class=3D"MsoNormal"><o:p>=A0</o:p></p>
        <p class=3D"MsoNormal"><b>While working with GNU-Prolog with the
            following config:<o:p></o:p></b></p>
        <p class=3D"MsoListParagraph"
          style=3D"text-indent:-.25in;mso-list:l0 level1 lfo1"><!--[if !s=
upportLists]--><span
            style=3D"mso-list:Ignore">-<span style=3D"font:7.0pt &quot;Ti=
mes
              New Roman&quot;">=A0=A0=A0=A0=A0=A0=A0=A0=A0
            </span></span><!--[endif]--><span dir=3D"LTR"></span>version
          1.4.4, <o:p></o:p></p>
        <p class=3D"MsoListParagraph"
          style=3D"text-indent:-.25in;mso-list:l0 level1 lfo1"><!--[if !s=
upportLists]--><span
            style=3D"mso-list:Ignore">-<span style=3D"font:7.0pt &quot;Ti=
mes
              New Roman&quot;">=A0=A0=A0=A0=A0=A0=A0=A0=A0
            </span></span><!--[endif]--><span dir=3D"LTR"></span>windows
          GUI console version 1.1<o:p></o:p></p>
        <p class=3D"MsoListParagraph"
          style=3D"text-indent:-.25in;mso-list:l0 level1 lfo1"><!--[if !s=
upportLists]--><span
            style=3D"mso-list:Ignore">-<span style=3D"font:7.0pt &quot;Ti=
mes
              New Roman&quot;">=A0=A0=A0=A0=A0=A0=A0=A0=A0
            </span></span><!--[endif]--><span dir=3D"LTR"></span>Windows
          10 x64<o:p></o:p></p>
        <p class=3D"MsoListParagraph"
          style=3D"text-indent:-.25in;mso-list:l0 level1 lfo1"><!--[if !s=
upportLists]--><span
            style=3D"mso-list:Ignore">-<span style=3D"font:7.0pt &quot;Ti=
mes
              New Roman&quot;">=A0=A0=A0=A0=A0=A0=A0=A0=A0
            </span></span><!--[endif]--><span dir=3D"LTR"></span>GNU-Prol=
og
          x64<o:p></o:p></p>
        <p class=3D"MsoNormal"><o:p>=A0</o:p></p>
        <p class=3D"MsoNormal"><b>Problem description:<o:p></o:p></b></p>
        <p class=3D"MsoNormal">A simple (.pl) files makes exception and
          crashes the GNU-Prolog console.<o:p></o:p></p>
        <p class=3D"MsoNormal"><o:p>=A0</o:p></p>
        <p class=3D"MsoNormal"><b>The (.pl) file contains<o:p></o:p></b><=
/p>
        <p class=3D"MsoNormal"><o:p>=A0</o:p></p>
        <p class=3D"MsoNormal">trans(x0, a, x2).<o:p></o:p></p>
        <p class=3D"MsoNormal">trans(x0, a, x1).<o:p></o:p></p>
        <p class=3D"MsoNormal">trans(x1, b, x1).<o:p></o:p></p>
        <p class=3D"MsoNormal">trans(x2, a, x2).<o:p></o:p></p>
        <p class=3D"MsoNormal"><o:p>=A0</o:p></p>
        <p class=3D"MsoNormal">reaches(XSTART, XEND) :- trans(XSTART, _
          ,XEND).<o:p></o:p></p>
        <p class=3D"MsoNormal">reaches(XSTART, XEND) :- trans(XSTART, _
          ,XMID), reaches(XMID, XEND).<o:p></o:p></p>
        <p class=3D"MsoNormal"><o:p>=A0</o:p></p>
        <p class=3D"MsoNormal"><b>Loading this file and running the
            following check makes an exception and crashes:<o:p></o:p></b=
></p>
        <p class=3D"MsoNormal">reaches(x2, x0).<o:p></o:p></p>
        <p class=3D"MsoNormal"><o:p>=A0</o:p></p>
        <p class=3D"MsoNormal">I think it is because it goes into infinit=
e
          search by the last line in the file but should be some how
          detected or avoided rather than crashing ?<o:p></o:p></p>
        <p class=3D"MsoNormal"><o:p>=A0</o:p></p>
        <p class=3D"MsoNormal">Regards,<o:p></o:p></p>
        <p class=3D"MsoNormal"><o:p>=A0</o:p></p>
        <p class=3D"MsoNormal">=97=97=97=97=97=97=97=97=97=97=97=97=97=97=
=97=97=97<br>
          <b>Mahmoud Khaled</b><br>
          PhD Student<br>
          Hybrid Control Systems Group,<br>
          Electrical Engineering Dept.<br>
          Technical University of Munich (TUM),<br>
          Arcisstra=DFe 21, 80333 Munich, Germany<br>
          <br>
          Tel: +49 (89) 289 - 23736<br>
          Web: <a class=3D"moz-txt-link-freetext" href=3D"http://www.hcs.=
ei.tum.de">http://www.hcs.ei.tum.de</a></p>
      </div>
      <br>
      <fieldset class=3D"mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap=3D"">_______________________________________________
Bug-prolog mailing list
<a class=3D"moz-txt-link-abbreviated" href=3D"mailto:[email protected]">=
[email protected]</a>
<a class=3D"moz-txt-link-freetext" href=3D"https://lists.gnu.org/mailman/=
listinfo/bug-prolog">https://lists.gnu.org/mailman/listinfo/bug-prolog</a=
>
</pre>
    </blockquote>
    <br>
  </body>
</html>


--===============1934287472202680136==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Bug-prolog mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-prolog

--===============1934287472202680136==--