CVS difference for ai05s/ai05-0024-1.txt

Differences between 1.1 and version 1.2
Log of other versions for file ai05s/ai05-0024-1.txt

--- ai05s/ai05-0024-1.txt	2006/11/13 08:36:01	1.1
+++ ai05s/ai05-0024-1.txt	2006/11/13 23:47:10	1.2
@@ -2060,10 +2060,8 @@
 probably could be done in a library routine.
 
 > Unless anyone can suggest an easy and efficient way to deal with cases of
-> this kind, I'd like to see this issue added to the discussion of
-accessibility
-> in task entries at the upcoming ARG meeting (assuming that's going to be
-on
+> this kind, I'd like to see this issue added to the discussion of accessibility
+> in task entries at the upcoming ARG meeting (assuming that's going to be on
 > the agenda).
 
 The idea that there is anything easy about accessibility checking makes me
@@ -2077,6 +2075,62 @@
 access-to-subprogram types) unusable. So, I think implementers are just
 going to have to suck it up on this one. (Maybe I'll feel differently
 tomorrow...)
+
+****************************************************************
+
+From: Robert A. Duff
+Date: Monday, November 13, 2006  8:59 AM
+
+While sleepwalking at 2:00 am, "Randy Brukardt" <randy@rrsoftware.com> writes:
+
+> The accessibility level of the type should be associated with the tag.
+
+How about storing two things in the type descriptor (what the tag points at):
+
+    - the frame pointer of the innermost enclosing master
+    - a unique id for the current task
+
+Then check that the task id's are equal, and the frame pointers <=, and raise
+C_E otherwise.  Does that make sense?
+
+It requires a contiguous stack.  :-(
+
+****************************************************************
+
+From: Pascal Leroy
+Date: Monday, November 13, 2006  10:26 AM
+
+> Then check that the task id's are equal, and the frame 
+> pointers <=, and raise C_E otherwise.  Does that make sense?
+
+I don't know much about the implementation of tasking, but I am under the
+impression that querying the current task id is an expensive operation if
+you are running on top of a thread library.
+
+****************************************************************
+
+From: Randy Brukardt
+Date: Monday, November 13, 2006  5:26 PM
+
+Possibly true, but since the accessibility checks are comparing the levels
+of two tagged types, you would only need to get the task id when you are
+creating the tag (and only for nested extensions). It doesn't seem likely
+that the cost of creating tags is frequent enough to matter significantly.
+(The most likely case would be in containers instances, but those are
+relatively expensive anyway.)
+
+The actual accessibility checks would be fairly cheap, especially as you
+could include a marker for extensions that are not nested (they cannot fail
+these nested extension checks). So I think Bob's strategy would work well
+for nested extension accessibility checks (and would implement
+"incomparibility" easily).
+
+I haven't thought about the access type checks, but it seems to me that it
+would always be possible to cache the task id/stack frame at the point of
+the type declaration, and thus prevent needing to get the task id
+frequently. So this seems like a viable approach to investigate further. (I
+won't go so far as to say that it will have to work, because nothing with
+accessibility is ever as it seems...)
 
 ****************************************************************
 

Questions? Ask the ACAA Technical Agent