comp.lang.ada
 help / color / mirror / Atom feed
From: Dinakar Dhurjati <dhurjati@uiuc.edu>
Subject: range checking
Date: Wed, 2 Jul 2003 17:07:51 -0500
Date: 2003-07-02T17:07:51-05:00	[thread overview]
Message-ID: <Pine.SOL.4.44.0307021627430.15367-100000@tank.cs.uiuc.edu> (raw)

Hi,

I am a researcher in compilers/security.

I am looking to adapt Ada's subrange idea for eliminating some array
bounds checks for a different language. I am curious as to how the thing
works in common implementations. Any pointers welcome.

Specifically

(1) Are there any compilers which try to infer the subranges themselves
Or the subranges have to be given by the programmer  ?

(2) If a variable is declared is of type some subrange, then every
assignment to that variable needs to be checked for correctness -- i.e. if
the assigned value is with in the subrange, right ? Are these checks done
statically or at runtime ? Are there any compilers which try to reduce the
amount of runtime checks that need to be done ?

Thanks,

Dinakar





             reply	other threads:[~2003-07-02 22:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-02 22:07 Dinakar Dhurjati [this message]
2003-07-04  4:52 ` range checking Martin Krischik
2003-07-12 18:55 ` Nick Roberts
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox