comp.lang.ada
 help / color / mirror / Atom feed
* range checking
@ 2003-07-02 22:07 Dinakar Dhurjati
  2003-07-04  4:52 ` Martin Krischik
  2003-07-12 18:55 ` Nick Roberts
  0 siblings, 2 replies; 3+ messages in thread
From: Dinakar Dhurjati @ 2003-07-02 22:07 UTC (permalink / 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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-07-12 18:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-02 22:07 range checking Dinakar Dhurjati
2003-07-04  4:52 ` Martin Krischik
2003-07-12 18:55 ` Nick Roberts

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