[sv-bc] Issue 70 - Unique/priority if


Subject: [sv-bc] Issue 70 - Unique/priority if
From: Peter Flake (Peter.Flake@synopsys.com)
Date: Wed Oct 29 2003 - 06:21:05 PST


Hi,

This is my proposal.  The BNF was wrong and the text needed clarification.

Please comment.

Peter.

In Section 8.4

REPLACE

conditional_statement ::= // from Annex A.6.6
[ unique_priority ]
if ( expression ) statement_or_null [ else statement_or_null ]
| if_else_if_statement

if_else_if_statement ::=
[ unique_priority ]
if ( expression ) statement_or_null
{
else [ unique_priority ] if ( expression ) statement_or_null }
[
else statement_or_null ]

WITH:

conditional_statement ::= // from Annex A.6.6
if ( expression ) statement_or_null [ else statement_or_null ]
| unique_priority_if_statement

unique_priority_if_statement ::=
[ unique_priority ]
if ( expression ) statement_or_null
{
else if ( expression ) statement_or_null }
[
else statement_or_null ]

REPLACE:

A unique if indicates that there should not be any overlap in a series of if...else...if conditions, allowing
the expressions to be evaluated in parallel. A software tool shall issue an error if it determines that there is a
potential overlap in the conditions.

WITH:

A unique if indicates that there should not be any overlap in a series of if...else...if conditions, i.e. they should be mutually exclusive, allowing
the expressions to be evaluated in parallel. A software tool shall issue an error if it determines that more than
one condition is, or can be, true. A software tool shall also issue an error if it determines that no condition is true,
or it is possible that no condition is true, and the final
if does not have a corresponding else.

REPLACE:

A priority if indicates that a series of if...else...if conditions shall be evaluated in the order listed. In
the preceding example, if the variable
a had a value of 0, it would satisfy both the first and second conditions,
requiring priority logic.

WITH:

A priority if indicates that a series of if...else...if conditions shall be evaluated in the order listed. In
the preceding example, if the variable
a had a value of 0, it would satisfy both the first and second conditions,
requiring priority logic. A software tool shall also issue an error if it determines that no condition is true,
or it is possible that no condition is true, and the final
if does not have a corresponding else.

REPLACE:

The unique and priority keywords apply to the entire series of if...else...if conditions. In the preceding
examples it would have been illegal to insert either keyword after any of the occurrences of
else.

WITH:

The unique and priority keywords apply to the entire series of if...else...if conditions. In the preceding
examples it would have been illegal to insert either keyword after any of the occurrences of
else
To nest another
if statement within such a series of conditions, a begin...end block should be used.



This archive was generated by hypermail 2b28 : Wed Oct 29 2003 - 06:26:47 PST