[sv-bc] RE: Query on Formal Syntax of property_case_item [SV 2012]

From: John Havlicek <johnh@cadence.com>
Date: Tue Oct 07 2014 - 05:56:58 PDT
The backward incompatibility note of the proposal for Mantis 3525 does say that there is now an optional ";" after property_expr in property_case_item.  That is just to say that I don't think this syntactic phenomenon was unconsidered and unintentional, even if undesirable.

Originally, the sequence and property constructs followed an expression-like syntax, and this made for challenges in bringing in statement-like constructs such as "case" and "if-else".  In the past, I argued that we need "case" and "if-else" in assertions, but it would be bad if the semicolon rules forced inconsistencies with the way "case" and "if-else" look in procedural code.

There was ugliness.

But the committee opted for relaxed rules that allow the assertion code to follow a style that is similar to procedural code, e.g. by allowing semicolon after a Boolean property statement in a case item and by not requiring semicolon after endcase of a case statement standing as property statement in a case item.  The relaxed rules also allow code that has a style unlike procedural code, as in the examples motivating Mantis 5038.

I will be happy to have a better overall solution, and I think it will be great if SV-BC can help.  My hope is that alignment of assertion syntax with procedural code stays in the discussion.

J.H. 

From: owner-sv-ac@eda.org [mailto:owner-sv-ac@eda.org] On Behalf Of Bresticker, Shalom
Sent: Tuesday, October 07, 2014 1:34 AM
To: sv-ac@eda.org
Subject: [sv-ac] FW: Query on Formal Syntax of property_case_item [SV 2012]



From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Steven Sharp
Sent: Tuesday, October 07, 2014 09:16
To: Datta, Kausik; sv-bc@eda.org
Subject: [sv-bc] RE: Query on Formal Syntax of property_case_item [SV 2012]

This appears to be an unintentional side-effect of the changes for Mantis 3525.  I have filed a new Mantis 5038.

From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Datta, Kausik
Sent: Monday, October 06, 2014 9:30 AM
To: sv-bc@eda.org
Subject: [sv-bc] Query on Formal Syntax of property_case_item [SV 2012]

Hi,

In SV 2012 LRM the semicolon [;] in property_case_item is optional, this means writing two expressions without any symbol in between is valid in SV.

For example  the following syntax is a valid one as per LRM

case (expr1) expr2 : expr3 expr4 : expr5 endcase
where there is no delimiter in between expr3 and expr4.

Is this an intended syntax? But all examples in this area in LRM has [;] after property_expr.

Formal Syntax:
property_expr ::= case ( expression_or_dist ) property_case_item { property_case_item } endcase

property_case_item::=
expression_or_dist { , expression_or_dist } : property_expr [ ; ]
| default [ : ] property_expr [ ; ]

Thanks
Kausik Datta


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner, and is 
believed to be clean. 

-- 
This message has been scanned for viruses and 
dangerous content by MailScanner, and is 
believed to be clean. 
---------------------------------------------------------------------
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.

-- 
This message has been scanned for viruses and 
dangerous content by MailScanner, and is 
believed to be clean. 

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Oct 7 05:57:28 2014

This archive was generated by hypermail 2.1.8 : Tue Oct 07 2014 - 05:57:45 PDT