|
From: | Daniel Diaz |
Subject: | Re: Segfault on X = [a,X]. |
Date: | Sat, 24 Mar 2012 20:04:46 +0100 |
This is not a bug. X = [a,X] creates a cyclic term during the unification (this happens when a variables is unified with a compound term which contains this variable as subterm). Gnu Prolog does not handle cyclic terms. The standard unification does not perform the occurs check for efficiency reasons. There is a a predicate doing this test: unify_with_occurs_check. unify_with_occurs_check(X, [a,X]) will fail. Daniel Le 23 mars 2012 à 15:24, Konstantin Weitz a écrit : gprolog segfaults on X = [a,X]. -- Ce message a été vérifié par MailScanner pour des virus ou des polluriels et rien de suspect n'a été trouvé. |
[Prev in Thread] | Current Thread | [Next in Thread] |