From: dale@cs.rmit.edu.au (Dale Stanbrough)
Subject: Re: Assertions
Date: 1999/05/12
Date: 1999-05-11T22:34:02+00:00 [thread overview]
Message-ID: <dale-1205990834030001@dale.bu.cs.rmit.edu.au> (raw)
In-Reply-To: 7h9p82$at0$1@nnrp1.deja.com
Robert Dewar wrote:
"Here are some questions to answer:
1. Is an assertion a post condition that the compiler can
rely on?
2. Can assertions have side effects
3. If assertions are off, are there still static semantic
restrictions on assertions."
One solution to the first questions (as suggested before) is to
have two types of assertions. One is the
"please check this condition at run time and don't do
any optimisations based on what you may be able to
deduce from this assert"
and the other is
"I know this condition is true, please use it to the
fullest to provide any further optimisations that you
can".
The latter is of course used as a supplement to the type
system. I'm not sure which of these Eiffel supports, but
probably Anna (the Ada83 annotation toolkit) would fall into
the 1st category.
I view Q2 as being very much like the question "should functions
have side effects". I would tend to say no for assertions, but
obviously this would be hard for a compiler to check (and of
course assertions have timing side effects, which could cause
problems in a time critical program).
Dale
next prev parent reply other threads:[~1999-05-12 0:00 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-05-10 0:00 Assertions J & A Richardson
1999-05-10 0:00 ` Assertions Marin David Condic
1999-05-11 0:00 ` Assertions Robert Dewar
1999-05-11 0:00 ` Assertions Nick Roberts
1999-05-11 0:00 ` Assertions Robert Dewar
1999-05-12 0:00 ` Dale Stanbrough [this message]
1999-05-12 0:00 ` Assertions Robert Dewar
1999-05-12 0:00 ` Assertions Tucker Taft
1999-05-12 0:00 ` Assertions Marin David Condic
1999-05-12 0:00 ` Assertions Larry Kilgallen
1999-05-12 0:00 ` Assertions Tucker Taft
1999-05-13 0:00 ` Assertions Nick Roberts
1999-05-17 0:00 ` Assertions Dale Stanbrough
1999-05-19 0:00 ` Assertions Nick Roberts
1999-05-22 0:00 ` Assertions Dale Stanbrough
1999-05-22 0:00 ` Assertions Robert Dewar
1999-05-22 0:00 ` Assertions Ray Blaak
1999-05-22 0:00 ` Assertions Robert Dewar
1999-05-23 0:00 ` Assertions Nick Roberts
1999-05-24 0:00 ` Assertions Dale Stanbrough
1999-05-24 0:00 ` Assertions Ray Blaak
1999-05-23 0:00 ` Assertions Nick Roberts
1999-05-18 0:00 ` Assertions Richard D Riehle
1999-05-19 0:00 ` Assertions Nick Roberts
1999-05-19 0:00 ` Assertions Richard D Riehle
1999-05-20 0:00 ` Assertions stimuli
1999-05-21 0:00 ` Assertions Richard D Riehle
1999-05-21 0:00 ` Assertions Robert Dewar
1999-05-20 0:00 ` Assertions Ehud Lamm
1999-05-21 0:00 ` Assertions Robert Dewar
1999-05-21 0:00 ` Assertions Ehud Lamm
1999-05-21 0:00 ` Assertions Tucker Taft
1999-05-20 0:00 ` Assertions stimuli
1999-05-12 0:00 ` Assertions Peter Amey
1999-05-12 0:00 ` Assertions Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox