Re: Cut(!) and fail inside nested once/1 calls?
Daniel Diaz <[email protected]> Mon, 24 Sep 2012 09:11:06 +0200
| Newsgroups | gmane.comp.gnu.prolog.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hi Dave Le 21/09/2012 20:14, Dave Sworin a écrit : Please advise whether the following behavior is a bug. Test platforms tried: 1) Ubuntu 10.10 64-bit gprolog 1.3.1 and 2) Mint 13 64-bit gprolog 1.4.1 once(( (once(((4 == 5) ; (!,fail)))) ; (write(a)) )). This query writes the letter a to the standard output. (I hope I typed all the parentheses correctly!) Correct behavior. If I remove the once/1 call inside the outer once/1, the cut(!) and fail works as expected. once(( ((((4 == 5) ; (!,fail)))) ; (write(a)) )). This query fails with a "no". Correct behavior. Is the cut(!) and fail scope limited inside the once/1 call? You said it :-) once/1 is a built-in predicate (it is not a control construct). So it is not transparent to cut (i.e. the scope of cut is the Goal of once/1). Daniel Dave PS: Everything seems to work fine in gprolog 1.4.1 but in the debugger I experienced segmentation violations debugging after consulting a very large prolog file bug exact same thing works fine in gprolog 1.3.1. Have other people experienced this too. I do not have a small example. PS: I would be interested in getting this large file. Can I get by ftp (or other) a zipped version of this file ? (you can write to me directly: [email protected] ) -- Ce message a été vérifié par MailScanner pour des virus ou des polluriels et rien de suspect n'a été trouvé. _______________________________________________ Bug-prolog mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-prolog