[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU Prolog crash
From: |
Paulo Moura |
Subject: |
Re: GNU Prolog crash |
Date: |
Tue, 23 Nov 2010 16:23:37 +0000 |
On 2010/11/21, at 16:14, Idelmar Mader wrote:
> Linux jabberwocky 2.6.32-25-generic #45-Ubuntu SMP Sat Oct 16 19:48:22 UTC
> 2010 i686 GNU/Linux
>
> Prolog top-Level (GNU Prolog) 1.3.0
>
>
> Crash when:
>
> A = 1.
> A = A + 1.
>
> -------------------------------------------------------------------------------------------------------------------------------------------------------
>
> | ?- A = 1.
>
> A = 1
>
> yes
> | ?- A = A + 1.
> Falha de segmentação
I.e. Segmentation fault. The goal above creates a rational/infinite term, which
is not supported (I believe) in GNU Prolog (which is not alone in this regard).
You can prevent accidental attempts to create a rational term using the
standard predicate unify_with_occurs_check/2:
| ?- unify_with_occurs_check(A, A+1).
no
Cheers,
Paulo
-----------------------------------------------------------------
Paulo Jorge Lopes de Moura, PhD
Assistant Professor
Dep. of Computer Science, University of Beira Interior
6201-001 Covilhã, Portugal
Office 3.18 Ext. 3276
Phone: +351 275319891 Fax: +351 275319899
Email: <mailto:address@hidden>
Home page: <http://www.di.ubi.pt/~pmoura>
Research: <http://logtalk.org/> Blog: <http://blog.logtalk.org/>
-----------------------------------------------------------------
- GNU Prolog crash, Idelmar Mader, 2010/11/23
- Re: GNU Prolog crash,
Paulo Moura <=