Related articles |
---|
Transformations of pointer parameters in C krinke@infbssts.cs.tu-bs.de (1996-05-24) |
Re: Transformations of pointer parameters in C derek@knosof.co.uk (Derek M Jones) (1996-05-26) |
From: | Derek M Jones <derek@knosof.co.uk> |
Newsgroups: | comp.compilers,comp.lang.c |
Date: | 26 May 1996 00:00:35 -0400 |
Organization: | Knowledge Software Ltd |
References: | 96-05-155 |
Keywords: | C, optimize |
All,
> I want to do a transformation of C-programs to eliminate some
> pointers. As C has no reference parameters, they are often emulated
> like this:
>
> Has anybody done something like that before? (Of course, you can think
> of more complicated examples, where the actual argument is a
> pointer...)
About 6 years ago we translated C to a language that had no pointers (it
was a language used in the Malpas formal analysis toolkit).
It was done by replacing pointer references by a list of symbolic names
used to represent things that the pointer might point at. The
analysis was only done on a single file at a time, but suprisingly
good results were acheived.
Check out www.knosof.co.uk/ctoa.html for a bit more info (this paper
discusses translating C to Ada).
derek
--
Derek M Jones tel: +44 (0) 1252 520 667
Knowledge Software Ltd email: derek@knosof.co.uk
http://www.knosof.co.uk
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.