bug-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple but crashes !


From: Daniel Diaz
Subject: Re: Simple but crashes !
Date: Tue, 10 May 2016 16:12:02 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

Yes it goes in an infinite loop.
You can use a list of already visited vertices to avoid such a looping in a graph.

Daniel


Le 04/05/2016 19:23, Khaled, Mahmoud a écrit :

Dear GNU-Prolog team,

 

While working with GNU-Prolog with the following config:

-          version 1.4.4,

-          windows GUI console version 1.1

-          Windows 10 x64

-          GNU-Prolog x64

 

Problem description:

A simple (.pl) files makes exception and crashes the GNU-Prolog console.

 

The (.pl) file contains

 

trans(x0, a, x2).

trans(x0, a, x1).

trans(x1, b, x1).

trans(x2, a, x2).

 

reaches(XSTART, XEND) :- trans(XSTART, _ ,XEND).

reaches(XSTART, XEND) :- trans(XSTART, _ ,XMID), reaches(XMID, XEND).

 

Loading this file and running the following check makes an exception and crashes:

reaches(x2, x0).

 

I think it is because it goes into infinite search by the last line in the file but should be some how detected or avoided rather than crashing ?

 

Regards,

 

—————————————————
Mahmoud Khaled
PhD Student
Hybrid Control Systems Group,
Electrical Engineering Dept.
Technical University of Munich (TUM),
Arcisstraße 21, 80333 Munich, Germany

Tel: +49 (89) 289 - 23736
Web: http://www.hcs.ei.tum.de



_______________________________________________
Bug-prolog mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/bug-prolog


reply via email to

[Prev in Thread] Current Thread [Next in Thread]