Search the web
Sign In
New User? Sign Up
claireprogramminglanguage · Claire Programming Language - A place to discuss about the CLAIRE language
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
CLAIRE v3.3.06   Message List  
Reply | Forward Message #563 of 1160 |
Hello everyone,

A new release is available, which fixes 2 nasty bugs:

(1) there was a problem with the management of class dictionnary when
too many methods were added. If there is a real need, I will upgrade
3.2 as well, but I encourage everyone to switch to 3.3 :-)

(2) as was pointed out on the forum there were two problems with store
(list,any) = "store_add"
- it did not work at all (a dumb problem with function pointers)
- it is not compatible with store(list,integer,any,bool)

The dumb problem was easy to fix but the non-compatibility is
actually a design bug, which has been there from day 1 ! The
(undocumented) philosophy was that lists supported defeasible
additions or updates, but not both !

Here is what I propose (and what is implemented in 3.3.06):
- lists supports both :-) and you can mix them
- but: defeasible addition will raise an error if an allocation is
required, thus lists must be pre-allocated when defeasible additions
are required.

This means: use shrink(make_list(<size>, <type>, value), 0) to build
a list that can grow up to <size>

As an example, I join the two tests that I have added to the test set:


[essai() : void
->
let l1 := list<integer>(1,2,3,4), l := list<integer>(1,2,3,4) in (
store(l), // useless but harmless ?
choice(),
store(l, 1, 100, true),
try store(l, 1)
catch any printf("error caught"),
printf("before l = ~S \n",l),
backtrack(),
printf("after l = ~S \n",l),
check("list bk", l = l1)) ]

[essai2() : void
->
let l1 := list<integer>(1,2,3,4), l := make_list(100,integer,0) in (
shrink(l,0),
l :add 1, l :add 2, l :add 3, l :add 4,
choice(),
store(l, 1, 100, true),
store(l, 5),
printf("2 before l = ~S \n",l),
backtrack(),
printf("2 after l = ~S \n",l),
check("(2) list bk", l = l1)) ]


I will update the 3.3 documentation :-)

Cheers,

Mr ClaireBugs.






Tue Jan 28, 2003 6:12 am

clairebugs
Offline Offline

Forward
Message #563 of 1160 |
Expand Messages Author Sort by Date

Hello everyone, A new release is available, which fixes 2 nasty bugs: (1) there was a problem with the management of class dictionnary when too many methods...
clairebugs
Offline
Jan 28, 2003
6:12 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help