Re: [sv-bc] FW: Manti 1345, 1711: unique if/case

From: Gordon Vreugdenhil <gordonv_at_.....>
Date: Mon Nov 19 2007 - 07:23:03 PST
Bresticker, Shalom wrote:
 > So Tom and Steven favor specifying a top-to-bottom order (like a normal
 > or priority case) instead of allowing any order of evaluation, which is
 > what the LRM says now.
 >
 > I would also favor specifying the order.
 >
 > Anyone object?
 >

Sorry for the late feedback; I was too swamped last week
to get through things.

I think that I am going to have a bit of an objection here.

Consider the following:

    unique case (expr)
        1   : ... /* action 1 */
        i++ : ...
        1   : ... /* action 2 */

I may want to optimize the statically determinable non-unique
cases and not have to walk through things.  So effectively I
may want something that looks like:
    case (expr)
        1   :  /* warn */ /* action 1 */
        i++ : ...

I don't think that would be valid in the approaches that you've
been discussing and I would object to making such optimizations
illegal.

I do agree that requiring a top-down ordering could be required
but only until encountering a case that warns.  So once you
issue a warning, no further evaluation is required and whether
evaluation of case items which are between the first match
and the match which conceptually causes the warning is implementation
defined.

I think that gives us a reasonable approach -- if you have a
well-formed unique case, then you get top-down predictability.
Only when you have an ill-formed case, do you lose some predictability.
While I agree with Steven that I don't want to penalize *all*
side-effects, I don't mind penalizing an ill-formed unique case
with side-effects.

Gord.


> If there are no objections, I can rewrite the proposal along those
> lines. It would make the description much simpler, in my opinion.
> 
> Shalom
> ---------------------------------------------------------------------
> Intel Israel (74) Limited
> 
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
> 

-- 
--------------------------------------------------------------------
Gordon Vreugdenhil                                503-685-0808
Model Technology (Mentor Graphics)                gordonv@model.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Nov 19 07:45:31 2007

This archive was generated by hypermail 2.1.8 : Mon Nov 19 2007 - 07:46:05 PST