ISSUE 178

Number 178
Category errata
Synopsis 9.4.1, A.6.6 -- if_else_if_statement and function_if_else_statement are redundant
State closed
Class mistaken
Arrival-DateOct 28 2002
Originator "Brad Pierce" <Brad.Pierce@synopsys.com>
Release 2001b, 9.4 (Syntax 9-4), 9.4.1 (Syntax 9-5), A.6.6
Environment
Description
Dan Jacobi <dan.jacobi@intel.com> points out that the following two
nonterminals from 9.4.1/A.6.6 are redundant --

if_else_if_statement
function_if_else_statement

To reduce ambiguity, both of these nonterminals should be removed
from the grammar. Section 9.4.1 should be removed from the LRM.

To see the redundancy, consider an if_else_if_statement of the form --

if (e0) s0 else if (e1) s1 else if (e2) s2 ...
... else if (en-1) sn-1 else if (en) sn else sn+1

= if (e0) s0 else S1

where

S1 = if (e1) s1 else if (e2) s2 ...
... else if (en-1) sn-1 else if (en) sn else sn+1

= if (e1) s1 else S2

where

S2 = if (e2) s2 else if (e3) s3 ...
... else if (en-1) sn-1 else if (en) sn else sn+1

= if (e2) s2 else S3

....

Sn-1 = if (en-1) sn-1 else if (en) sn else sn+1
= if (en-1) sn-1 else Sn

where

Sn = if (en) sn else sn+1

Likewise for function_if_else_if_statement.





Fix
Passed at 12/16/02 ETF meeting - Change status to not-a-bug.

Audit-Trail

From: Shalom Bresticker <Shalom.Bresticker@motorola.com>
To: etf-bugs@boyd.com
Cc:
Subject: Re: errata/178: 9.4.1, A.6.6 -- if_else_if_statement and
function_if_else_statement are redundant
Date: Tue, 29 Oct 2002 11:03:49 +0200

>Category: errata
>Confidential: no
>Originator: Shalom Bresticker <Shalom.Bresticker@motorola.com>
>Release: 2001b
>Class: TBD
>Description:

I agree that these are redundant, but I would not remove 9.4.1
completely.
Also note that Syntax 9-4 in 9.4 must also be modified.


> Dan Jacobi <dan.jacobi@intel.com> points out that the following two
> nonterminals from 9.4.1/A.6.6 are redundant --
>
> if_else_if_statement
> function_if_else_statement
>
> To reduce ambiguity, both of these nonterminals should be removed
> from the grammar. Section 9.4.1 should be removed from the LRM.

Unformatted


Hosted by Boyd Technology