freenode/#sicl - IRC Chatlog
Search
15:41:27
beach
I am now convinced that there can't be a perfect cyclic graph in the host environment. The reason is that some discriminating functions have already been computed, and they refer to COMPUTE-DISCRIMINATING-FUNCTION in a preceding environment. I can't easily change that.
15:41:29
beach
But then, it doesn't matter much. All I need is a single environment in which the graph of classes is cyclic and in which the functions are instances of those classes. And I think that is fairly easy to do.
15:44:19
beach
... or, rather, to have enough stuff in the call history that it does not fault on typical arguments.
15:49:09
beach
So I think I can do the following (referring to this figure): http://metamodular.com/fig-environments.pdf Designate E5 to be THE environment.
15:49:09
beach
Copy the blue classes over to E5. Change the class slot of the header of every blue object so that it points to a blue class. Define a new version of make-instance in E5 so that it looks up the class in E5 and make sure ensure-class, etc. call this version of make-instance.
15:51:27
beach
The reason I think this will work is that when a blue object has its class slot altered to point to a blue class, it is indistinguishable from a yellow object. And the blue generic functions are designed precisely to operate on yellow objects. So it should "just work" (I know, famous last words).
15:54:15
beach
So in the next few days (starting Monday I guess; I'll have dinner guests tomorrow) I think I'll just try heisig's idea, namely to just collect blue objects as they are allocated (by definining allocate-instance to do that) and then just traverse the list and modify the class slot of each one later on.
15:55:58
beach
There is some other work I need to do as well. Currently, I define a method on the host PRINT-OBJECT specialized to HEADER to call the SICL PRINT-OBJECT in some environment, and that works for (I think) red objects, but fails spectacularly on blue and yellow objects.
15:56:47
beach
I should just give up on this idea, and define a print function in each environment by loading SICL production code.
15:58:15
beach
The reason I attempted to use the services of the host print-object may not be obvious unless you have looked at some of these objects without it. :)
15:59:17
beach
Then if inspect it, the class slot contains a HEADER and the rack contains some NILs, some lists of HEADERs, some singleton HEADERs, etc.
16:01:02
beach
I tried to program Clouseau to inspect these objects, but it insists on taking the PRESENTATION-TYPE-OF the object and that is not what I want.
16:38:37
beach
It would be good if it would allow for a different presentation type than the default PRESENTATION-TYPE-OF the object.