errata/566: Re: errata/566: 9.5: case item expression ambiguity

From: Brad Pierce (Brad.Pierce@synopsys.com)
Date: Tue Mar 23 2004 - 15:10:00 PST

  • Next message: Shalom.Bresticker@motorola.com: "errata/566: Re: errata/566: 9.5: case item expression ambiguity"

    The following reply was made to PR errata/566; it has been noted by GNATS.

    From: "Brad Pierce" <Brad.Pierce@synopsys.com>
    To: <etf-bugs@boyd.com>
    Cc:
    Subject: Re: errata/566: 9.5: case item expression ambiguity
    Date: Tue, 23 Mar 2004 15:18:19 -0800

     Even if, as an interpretation of the current text, those semantics
     were dachuk, they nevertheless make good sense.
     
     The text could specify that, just as with the case expression
     in parentheses, all the case item expressions shall be evaluated
     exactly once, in order, and before any comparisons. The only time
     one would notice the difference would be in the presence of side-effects.
     
     -- Brad
     
     
     
     -----Original Message-----
     From: owner-etf@boyd.com [mailto:owner-etf@boyd.com]On Behalf Of Shalom
     Bresticker
     Sent: Tuesday, March 23, 2004 1:20 AM
     To: etf-bugs@boyd.com
     Subject: errata/566: Re: errata/566: 9.5: case item expression ambiguity
     
     
     The following reply was made to PR errata/566; it has been noted by GNATS.
     
     From: Shalom Bresticker <Shalom.Bresticker@motorola.com>
     To: etf-bugs@boyd.com
     Cc:
     Subject: Re: errata/566: 9.5: case item expression ambiguity
     Date: Tue, 23 Mar 2004 11:25:39 +0200
     
      Although I basically agree with Steven, including about the obscurity
      (I might call it pathology), conceivably someone could interpret the
      phrase "shall be evaluated and compared in the exact order in which they
     are
      given"
      as meaning "shall be evaluated in order" and
      "shall be compared in order", but allowing all the expressions to be first
      evaluated before beginning the comparisons.
      Especially since it also says above,
      "The case expression and the case item expression can be computed at
     runtime".
      This implies that the expressions can be evaluated earlier also.
     
      Still I agree that that is a "dachuk" (difficult, weak, far-fetched)
      interpretation.
     
      But that entire phrase about evaluation and comparison in order was added
     by us
      in issue 402 and is not part of 2001c.
     
      Shalom
     
     
      Steven Sharp wrote:
     
    > And I agree with Brad, that this means that his example code must
     display
    > 1 and could not legally display 2. The description says that the case
    > item expressions shall be evaluated and compared in order and that the
    > linear search shall terminate when one matches. That does not allow
    > evaluating any later case item expressions, including ones attached to
    > the same case item.
    >
    > Mind you, this is a pretty obscure thing, and is not likely to come up
    > in the real world.
     
      --
      Shalom Bresticker Shalom.Bresticker@motorola.com
      Design & Reuse Methodology Tel: +972 9 9522268
      Motorola Semiconductor Israel, Ltd. Fax: +972 9 9522890
      POB 2208, Herzlia 46120, ISRAEL Cell: +972 50 441478
     
      [x]Motorola General Business Information
      [ ]Motorola Internal Use Only
      [ ]Motorola Confidential Proprietary
     
     
     
     



    This archive was generated by hypermail 2.1.4 : Tue Mar 23 2004 - 15:10:27 PST and
    sponsored by Boyd Technology, Inc.