RE: enhancing "case" semantics

From: <darren.galpin@infineon.com>
Date: Mon Sep 01 2014 - 23:50:31 PDT
Hi Yuri,

Adding a note to 4124 should be enough.

Cheers,

Darren

From: owner-ieee1647@eda.org [mailto:owner-ieee1647@eda.org] On Behalf Of Yuri Tsoglin
Sent: Monday, September 01, 2014 5:13 PM
To: ieee1647@eda.org
Subject: enhancing "case" semantics

Hi,

As part of the 'set' type related additions (Mantis issue #4124), I propose the following enhancement to the semantics of "case" action, which goes beyond just 'set' type aspects.

Currently, each case item must be either an expression of the same (or comparable) type as the case expression, or (if the case expression is of a scalar type) a constant range comparable with that scalar type.

The proposed enhancement allows the case item to be one of the following:

-          An expression of the same (or comparable) type as the case expression

-          An expression of a list of the same (or comparable) type as the case expression

-          If the case expression is of a numeric type - an expression of the set type

-          If the case expression is of an enumerated type - a constant range comparable with that enumerated type

The enhanced semantics imply just two ways of checking whether a case item matches the case expression:

-          If they are of compatible types - matching is according to the semantics of operator ==

-          Otherwise, matching is according to the semantics of operator in
Since operator in is applicable to both lists and sets, this covers all the above cases.

Also, do we need a separate Mantis issue for this, or if we handle it as part of issue #4124, it's enough?

Thanks,
Yuri.




[http://www.cadence.com/mail/footer_logocdns2.jpg]

Yuri Tsoglin | e Language team, Specman RnD

P: 972.3.9004305 M: 972.54.6468177 F: 972.3.9004001 www.cadence.com<http://www.cadence.com>







--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.

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



image001.gif
image002.jpg
Received on Mon Sep 1 23:51:10 2014

This archive was generated by hypermail 2.1.8 : Mon Sep 01 2014 - 23:51:18 PDT