List Info

Thread: make TwistedPools the default pool search order




make TwistedPools the default pool search order
user name
2008-04-08 17:53:37
Issue status update for 
http://smalltalk.gn
u.org/node/206
Post a follow up: 
htt
p://smalltalk.gnu.org/project/comments/add/206

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    STInST
 Category:     feature requests
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  S11001001
 Updated by:   S11001001
 Status:       active

I would like to make the pool search order more intuitive
and likely to
do what you want in a "namespace is application"
environment.  My ideas
for this, and a link to the git branch, are on wiki page
PoolResolution.

Missing from that are C implementation and post-compilation
unit tests.




_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

make TwistedPools the default pool search order
user name
2008-04-09 03:45:02
Issue status update for 
http://sma
lltalk.gnu.org/project/issue/206
Post a follow up: 
htt
p://smalltalk.gnu.org/project/comments/add/206

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    STInST
 Category:     feature requests
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  S11001001
 Updated by:   S11001001
 Status:       active

1) Yes, in your specific example; however, elimination is
not done as
pools are encountered, because we prefer left-to-right.  For
example,
in the hierarchy:


X
 A
  B
 C


'B C' will sort to 'B A C X', whereas 'B C A' will sort to
'B C A X'.

2) It would be searching some pools too early.  I wanted to
allow
importing of namespaces in other hierarchies, while not
thereby forcing
the early search of namespaces already imported by virtue of
containing
the importing class.

Arguments can be made to reduce or increase the elimination
of shared
pools.  Both are discussed in the "Combination
details" section, the
specific option you mention being the subject of the second
and third
paragraphs.




_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

make TwistedPools the default pool search order
user name
2008-04-09 02:04:36
Issue status update for 
http://sma
lltalk.gnu.org/project/issue/206
Post a follow up: 
htt
p://smalltalk.gnu.org/project/comments/add/206

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    STInST
 Category:     feature requests
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  S11001001
 Updated by:   bonzinip
 Status:       active

This is interesting and can definitely enter 3.1.  The only
thing I
would like to confirm are two.

1) If B is a subspace of A, having /'A B'/ as shared pools
would
actually behave the same as just /'B'/, right?  In other
words, A would
be eliminated because of the topological sort.

2) Why do you remove pools that are superspaces of the
class
environment?  What happens if you just search those twice? 
The answer
might be related to item 1.




_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

make TwistedPools the default pool search order
user name
2008-04-09 03:54:55
Issue status update for 
http://sma
lltalk.gnu.org/project/issue/206
Post a follow up: 
htt
p://smalltalk.gnu.org/project/comments/add/206

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    STInST
 Category:     feature requests
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  S11001001
 Updated by:   bonzinip
 Status:       active

thanks.  i have now enough info to implement this in the C
parser and
make it the default.  i don't how much of your code,
especially
#poolResolution, I will use, but the concepts will be
there.

of course, feel free to beat me to it.




_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

make TwistedPools the default pool search order
user name
2008-04-16 03:09:19
Issue status update for 
http://sma
lltalk.gnu.org/project/issue/206
Post a follow up: 
htt
p://smalltalk.gnu.org/project/comments/add/206

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    STInST
 Category:     feature requests
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  S11001001
 Updated by:   bonzinip
 Status:       active
 Attachment:   http://smalltalk.gnu.org/files/issues/gst-twistedpoo
ls.patch (21.92 KB)

The attached patch makes TwistedPools the default pool
search order
outside the VM, and consequently changes your TwistedPools
class to
just use the default pool search order.  All testcases still
pass.

The code is heavily based on yours, with some refactoring
because I
wasn't afraid of touching base classes  and
because the search order
is implemented directly in Behavior (actually in Class).

I changed a couple of data structures.  For the set of
superspaces of
this class and all the superclasses' environments, I used a
Bag, which
makes it easy to account for namespaces that are present
multiple
times.  For the topological sort, I used two IdentitySets
(grey/white,
in three-color visit terminology) instead of a single
dictionary.

I'll post the patch split in three to the ML too.




_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

make TwistedPools the default pool search order
user name
2008-04-21 03:53:23
Issue status update for 
http://sma
lltalk.gnu.org/project/issue/206
Post a follow up: 
htt
p://smalltalk.gnu.org/project/comments/add/206

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    STInST
 Category:     feature requests
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  S11001001
 Updated by:   S11001001
 Status:       active

I added a fix for inherited class/shared pools and a test
for it in
c097acd.  Also in c097acd is a new, failing test, fixed in
b69098a, to
eliminate only the /direct superclass's/ namespaces from    
          
         the namespace walk while searching pools.  (See
step #4 on
PoolResolution).


> For the set of superspaces of this class and
> all the superclasses' environments


While it is convenient, it doesn't match the expectation of
step #4,
illustrated by the new test case, which is also why
TwistedPools
originally used superclass environment withAllSuperspaces
asSet to make
the sole set of namespace walk eliminations.

The unfortunate detail of this alternative, and thus a
slight bug
introduced in b69098a, is that it may answer some namespaces
multiple
times.  OrderedSet did the right thing, so I could ignore
the issue,
but #allSharedPoolDictionariesDo: isn't necessarily building
a set.  Of
course, the order is still right, so it doesn't affect a
leftmost-first
variable search at all.




_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

make TwistedPools the default pool search order
user name
2008-04-21 04:21:44
Issue status update for 
http://sma
lltalk.gnu.org/project/issue/206
Post a follow up: 
htt
p://smalltalk.gnu.org/project/comments/add/206

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    STInST
 Category:     feature requests
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  S11001001
 Updated by:   bonzinip
 Status:       active

thanks, I merged from you.




_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

make TwistedPools the default pool search order
user name
2008-04-22 01:54:38
Issue status update for 
http://sma
lltalk.gnu.org/project/issue/206
Post a follow up: 
htt
p://smalltalk.gnu.org/project/comments/add/206

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    STInST
 Category:     feature requests
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  S11001001
 Updated by:   S11001001
 Status:       active
 Attachment:   http://smalltalk.gnu.org/files/issues/spd-no-nil.patch
(3.04 KB)


> The unfortunate detail of this alternative, and thus a
slight bug
> introduced in b69098a, is that it may answer some
namespaces
> multiple times.


Ah, later I realized that the Bag-based version in 274f63e
too would
duplicate some pools, in cases where a shared pool was used
to force an
early namespace import that would otherwise happen later
anyway.  So it
looks like there are duplicates either way, unless anyone
finds them
bothersome.




_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

make TwistedPools the default pool search order
user name
2008-04-22 13:39:52
Issue status update for 
http://sma
lltalk.gnu.org/project/issue/206
Post a follow up: 
htt
p://smalltalk.gnu.org/project/comments/add/206

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    STInST
 Category:     feature requests
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  S11001001
 Updated by:   bonzinip
 Status:       active

ok, that's good.  I could find in GCC a nice implementation
of
IdentitySet, and with that it was quite easy to implement
TwistedPools
in the VM.  It is in my personal git repo.

Tests pass, but still, two more eyes can only do best.  And
there is
also some pleaing for help:

/* Add POOLOOP and all of its superspaces to the list in
the
   right order (Stephen, please help me... .  */

It's actually just a matter of copying from the right wiki
page, if you
don't have time I can do it.

Thanks again for noticing the need for this feature, for the
precise
description of the problem and (as usual) for the high
quality of your
code and your reviews.




_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

make TwistedPools the default pool search order
user name
2008-04-24 09:35:28
Issue status update for 
http://sma
lltalk.gnu.org/project/issue/206
Post a follow up: 
htt
p://smalltalk.gnu.org/project/comments/add/206

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    STInST
 Category:     feature requests
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  S11001001
 Updated by:   bonzinip
-Status:       active
+Status:       patch

I saw your merge; I'll wait a couple more days for a
confirmation and
then merge into master.




_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

[1-10] [11-12]

about | contact  Other archives ( Real Estate discussion Medical topics )