4 Oct 21:24
5.7.X : problem with attributed variables and memberchk ?
From: Victor NOEL <victor.noel <at> crazydwarves.org>
Subject: 5.7.X : problem with attributed variables and memberchk ?
Newsgroups: gmane.comp.ai.prolog.swi
Date: 2008-10-04 19:27:06 GMT
Subject: 5.7.X : problem with attributed variables and memberchk ?
Newsgroups: gmane.comp.ai.prolog.swi
Date: 2008-10-04 19:27:06 GMT
Hello, I found something strange, I am wondering if there isn't a problem with attributed variables (at least clpfd ones) and memberchk (and maybe other predicates ...). I am using current git for 5.7.X swi-prolog, and if I run the following commands, this is the results I get : Welcome to SWI-Prolog (Multi-threaded, 32 bits, Version 5.7.1-31-g8d293e0-DIRTY) Copyright (c) 1990-2008 University of Amsterdam. SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. Please visit http://www.swi-prolog.org for details. ?- use_module(library(clpfd)). % library(error) compiled into error 0.00 sec, 9,704 bytes % library(clpfd) compiled into clpfd 0.05 sec, 220,728 bytes true. ?- A in 0..5, B in 6..7, member(A, [B, C]). A = C, C in 0..5, B in 6..7 ; false. ?- A in 0..5, B in 6..7, memberchk(A, [B, C]). false. Shouldn't the last one return : A = C, C in 0..5, B in 6..7. ? I hope I do not forget something important and that my question is not dumb :) Thanks you, Victor
RSS Feed