Re: Cyclic term error with quot_rem

Daniel Diaz <[email protected]> Thu, 30 Nov 2023 14:19:35 +0100
Newsgroups gmane.comp.gnu.prolog.bugs
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------YBwNumf0Bys5E0SvD0TA4j3P
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi Marc,

this seems a bug. Thank you for the report.

Unfortunately, I cannot dig into it immediately.

Can you fill an issue in the github repo 
(https://github.com/didoudiaz/gprolog/issues) with the copy of this 
example ?
(else I will do it).

Daniel


Le 29/11/2023 à 17:21, Marc Nieper-Wißkirchen a écrit :
> Hi Daniel,
>
> Today, I have stumbled upon the following:
>
> | ?- X #= quot_rem(3, 2, U).
> X #= quot_rem(3, 2, U).
>
> cannot display cyclic term for U
> X = 1
>
> yes
> | ?-
>
> I don't understand why U is not unified with 2.  Compare with the 
> following, which works:
>
> | ?- U #= 3 rem 2.
> U #= 3 rem 2.
>
> U = 1
>
> yes
> | ?-
>
> I tested this with the latest release version (1.5.0) and the version 
> packaged with Ubuntu (1.4.5).
>
> Thanks,
>
> Marc
--------------YBwNumf0Bys5E0SvD0TA4j3P
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Marc,</p>
    <p>this seems a bug. Thank you for the report. </p>
    <p>Unfortunately, I cannot dig into it immediately.</p>
    <p>Can you fill an issue in the github repo (<a
        href="https://github.com/didoudiaz/gprolog/issues"
        class="moz-txt-link-freetext">https://github.com/didoudiaz/gprolog/issues</a>)
      with the copy of this example ?<br>
      (else I will do it).<br>
    </p>
    <p>Daniel</p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">Le 29/11/2023 à 17:21, Marc
      Nieper-Wißkirchen a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAEYrNrT4Y28cRfY4B7wF8fQAt7mM-4An7q=ymFdVptHJCjBnMQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div class="gmail_default" style="font-family:monospace">Hi
          Daniel,</div>
        <div class="gmail_default" style="font-family:monospace"><br>
        </div>
        <div class="gmail_default" style="font-family:monospace">Today,
          I have stumbled upon the following:</div>
        <div class="gmail_default" style="font-family:monospace"><br>
          | ?- X #= quot_rem(3, 2, U).<br>
          X #= quot_rem(3, 2, U).<br>
          <br>
          cannot display cyclic term for U<br>
          X = 1<br>
          <br>
          yes</div>
        <div class="gmail_default" style="font-family:monospace">| ?-</div>
        <div class="gmail_default" style="font-family:monospace"><br>
        </div>
        <div class="gmail_default" style="font-family:monospace">I don't
          understand why U is not unified with 2.  Compare with the
          following, which works:<br>
        </div>
        <div class="gmail_default" style="font-family:monospace"><br>
        </div>
        <div class="gmail_default" style="font-family:monospace">| ?- U
          #= 3 rem 2.<br>
          U #= 3 rem 2.<br>
          <br>
          U = 1<br>
          <br>
          yes<br>
          | ?- <br>
        </div>
        <div class="gmail_default" style="font-family:monospace"><br>
        </div>
        <div class="gmail_default" style="font-family:monospace">I
          tested this with the latest release version (1.5.0) and the
          version packaged with Ubuntu (1.4.5).</div>
        <div class="gmail_default" style="font-family:monospace"><br>
        </div>
        <div class="gmail_default" style="font-family:monospace">Thanks,</div>
        <div class="gmail_default" style="font-family:monospace"><br>
        </div>
        <div class="gmail_default" style="font-family:monospace">Marc<br>
        </div>
      </div>
    </blockquote>
  </body>
</html>

--------------YBwNumf0Bys5E0SvD0TA4j3P--