RE: [sv-bc] confusion in determining the type of an self determined binary expression during evalution of type operator

From: Steven Sharp <sharp_at_.....>
Date: Wed Oct 24 2007 - 12:30:47 PDT
>From: "Feldman, Yulik" <yulik.feldman@intel.com>

>I was thinking about using the definition of matching types for this
>purpose. It is already defined and may be OK to use.

It does look reasonable for this.

> The algorithm is then:
>
>1. If all types match, return one of them.
>2. If they don't match, and they are not integral, it is an error.
>3. If they don't match, and they are integral, return the normalized
>type.
>
>Isn't this simple enough?

Your rule includes matching the type of the context for integral types.
So the next thing you would have to do is define what the type of the
context is.  The existing LRM only defines the size and signedness of
the context.

After that, there will be other issues that require more special
exceptions to your rules.  For example, your rules produce the wrong
result for 2-state types.  If you have

	int i, j;
	
	type(cond ? i : j)

your rules would say that the type is int.  But the result is definitely
a 4-state vector, so it cannot be type int.


Steven Sharp
sharp@cadence.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed Oct 24 12:31:05 2007

This archive was generated by hypermail 2.1.8 : Wed Oct 24 2007 - 12:31:34 PDT