Hi folks, I've noticed some very wrong looking behaviour with shelves, with v5.4 #41 running on Solaris. Below, variable Y is bound by the time it is put in the shelf, using index 0 to set the whole shelf. Not only does shelf_get retrieve the same argument unbound, but in the trace we can see that by the time the call to shelf_set exits, it has managed to unbind Y! Mummy! Help! On the bright side, there seems to be a workaround if you set the slots individually. See further below. cheers, josh ECLiPSe Constraint Logic Programming System [kernel] Copyright Imperial College London and ICL Certain libraries copyright Parc Technologies Ltd GMP library copyright Free Software Foundation Version 5.4 #41, Tue Jul 16 00:14 2002 [eclipse 1]: shelf_create(a(1, 0), X), Y = 2, shelf_set(X, 0, a(3, Y)), shelf_get(X, 0, Z). Y = _195 X = 'SHELF'(16'001838b8) Z = a(3, _300) Yes (0.00s cpu) [eclipse 2]: trace. Debugger switched on - creep mode [eclipse 3]: 1. shelf_create(a(1, 0), X), Y = 2, shelf_set(X, 0, a(3, Y)), shelf_get(X, 0, Z). (1) 1 CALL shelf_create(a(1, 0), X) %> skip (1) 1 EXIT shelf_create(a(1, 0), 'SHELF'(16'001c5ed8)) %> creep (2) 1 CALL shelf_set('SHELF'(16'001c5ed8), 0, a(3, 2)) %> skip (2) 1 EXIT shelf_set('SHELF'(16'001c5ed8), 0, a(3, _193)) %> creep (3) 1 CALL shelf_get('SHELF'(16'001c5ed8), 0, Z) %> skip (3) 1 EXIT shelf_get('SHELF'(16'001c5ed8), 0, a(3, _600)) %> creep Y = _193 X = 'SHELF'(16'001c5ed8) Z = a(3, _600) Yes (0.01s cpu) [eclipse 4]: ECLiPSe Constraint Logic Programming System [kernel] Copyright Imperial College London and ICL Certain libraries copyright Parc Technologies Ltd GMP library copyright Free Software Foundation Version 5.4 #41, Tue Jul 16 00:14 2002 [eclipse 1]: shelf_create(a(1, 0), X), Y = 2, shelf_set(X, 2, Y), shelf_get(X, 0, Z). Y = 2 X = 'SHELF'(16'001838b8) Z = a(1, 2) Yes (0.00s cpu) [eclipse 2]: Developer, Parc Technologies Limited josh.singer@parc-technologies.com http://www.parc-technologies.com This e-mail message is for the sole use of the intended recipient(s) -its contents are the property of Parc Technologies Limited (or its licensors) and are confidential. Please do not copy, review, use (except for the intended purposes), disclose or distribute the e-mail or its contents (or allow anyone else to do so) without our prior permission. Parc Technologies Limited does not guarantee that this e-mail has not been intercepted and amended nor that it is virus-free. You should carry out your own virus checks before opening any attachment. Any opinions expressed in this e-mail message are those of the author and not necessarily Parc Technologies Limited.Received on Tue Feb 25 15:27:35 2003
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:20 PM GMT GMT