[net.lang] introductory programming languag

david@ztivax.UUCP (03/05/86)

>A Turing program is completely checked.  Uninitialized variables, subrange
>variables out of range, dangling pointers, etc are all detected.
                         ^^^^^^^^^^^^^^^^^

How can you do that?  No global pointers?  No dynamic allocation?  Tags on
data somehow?  

david at 
seismo!unido!ztivax!david

mendell@utai.UUCP (Mark Mendell) (03/08/86)

From: ztivax!david    Mar  5 13:24:00 1986
>
>>A Turing program is completely checked.  Uninitialized variables, subrange
>>variables out of range, dangling pointers, etc are all detected.
>                         ^^^^^^^^^^^^^^^^^
>
>How can you do that?  No global pointers?  No dynamic allocation?  Tags on
>data somehow?  


The method of checking dangling pointers is to have a tag on the allocated data,
and a matching tag on with the pointer.  Every time that the pointer is
referenced, the tags are checked to see if they match.  This does have the side
effect that all pointers are 8 bytes long, but it detects a reference to a
dangling pointer as early as we can.  The tag on the allocated data is placed
just before the data itself, so that the pointer points to the actual data.

A fact that helps this implementation is that all variables are set to an
"unitialized" value, so that we can detect uninitialized pointers before
doing the check for dangling references.

Mark Mendell
University of Toronto
-- 
Mark Mendell
	    Computer Systems Research Institute    University of Toronto
	    Usenet:	{linus, ihnp4, allegra, decvax, floyd}!utcsri!mendell
	    CSNET:	mendell@Toronto
	    ARPA:	mendell%Toronto@CSNet-Relay