🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #1162

Re: Pointers as 3-tuples

#1162
From: Preston Briggs
Date: Tue, 10 Apr 1990 18:26
31 lines
1783 bytes
In article <Ekg#.d5@cs.psu.edu> flee@shire.cs.psu.edu (Felix Lee) writes:
>If pointers were implemented as 3-tuples,
>then the compiler could generate run-time checks for aliasing, and
>then switch to either a fast- or slow-coded loop.  

Jim Giles has suggested this in terms of arrays and fortran
(presumably extended to allow aliasing).

Ershov (in 1967) suggested compiling 2 versions of a procedure,
one assuming aliasing and the other assuming no aliasing,
and determining the appropriate one to call (at each call site)
via compile-time analysis.

Cooper and Kennedy (POPL, 1989) have shown how to do the necessary 
compile-time interprocedural alias analysis.  Cooper (in '83) showed 
a practical approach to interprocedural analysis in the presence
of separate compilation.

None of these ideas, including 3-tuples, are adequate for analyzing
the effects of pointers.  They might be adequate to analyze 
"pointers used as arrays" if that were the only use of pointers.
Unfortunately, pointers are very general and are used in many ways
(after all, that's why they're popular).  In particular, it's
very difficult to determine (at compile time) what memory
locations might be modified by assignments like

	*(root->left->right) = *(root->right)

--
Preston Briggs				looking for the great leap forward
preston@titan.rice.edu
Technical Details
Message-ID: <6531@brazos.Rice.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!rice!titan!preston
References: <1BT2FU7ggpc2@ficc.uu.net> <14316@lambda.UUCP> <S4U2APBggpc2@ficc.uu.net> <Ekg#.d5@cs.psu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!rice!titan!preston
From: preston@titan.rice.edu (Preston Briggs)
Newsgroups: comp.lang.misc
Subject: Re: Pointers as 3-tuples
Message-ID: <6531@brazos.Rice.edu>
Date: 10 Apr 90 18:26:23 GMT
References: <1BT2FU7ggpc2@ficc.uu.net> <14316@lambda.UUCP> <S4U2APBggpc2@ficc.uu.net> <Ekg#.d5@cs.psu.edu>
Sender: root@rice.edu
Organization: Rice University, Houston
Lines: 31