RE: [sv-ec] Queue delete() method

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Fri Aug 04 2006 - 05:16:58 PDT
Doubly interesting.
So far as I can see, you can't have an empty assignment pattern. See
Syntax 8-2.
This would mean, for example, that you cannot clear a dynamic array by
assignment of an empty array literal.

As previously pointed out many times, a problem specific to queues with
both {} and '{} is the use of a syntax like "q = { q, 6 };". In all
other types of arrays, that would be a literal of two elements, where
the first is q and the second is 6, and not a shortcut for writing a
concatenation of all the elements of q.

Finally, I also note that the sentence, "Unlike arrays, the empty queue,
{}, is a valid queue and the result of some queue operations," as
worded, says that empty dynamic and associative arrays are not valid,
which is not the case. 

Shalom

> -----Original Message-----
> From: owner-sv-ec@server.eda-stds.org [mailto:owner-sv-ec@server.eda-
> stds.org] On Behalf Of Steven Sharp
> Sent: Friday, August 04, 2006 12:04 AM
> To: sv-ec@server.eda-stds.org; Brad.Pierce@synopsys.com
> Subject: RE: [sv-ec] Queue delete() method
> 
> 
> >From: "Brad Pierce" <Brad.Pierce@synopsys.com>
> 
> >The nonterminal "empty_queue" is defined as "{}" in A.8.1, and used
in
> >"primary_literal" in  A.8.4.
> 
> Interesting point.  So {} as an empty queue is not arising as the
> degenerate case of this undefined queue concatenation operation.
> It is specified as a separate thing.  And there is even normative
> text defining it in 5.14:
> 
> "The empty array literal {} is used to denote an empty queue."
> 
> The problem is that {} is not the empty array literal, so this
> statement is self-contradictory.  The empty array literal would
> now be '{}.
> 
> The text clearly states the intent to use the empty array literal,
> and refers to the old syntax for an empty array literal.  This
> appears to be a case where the syntax was not updated when the
> array literal syntax was changed.  This sentence should be updated
> to the new syntax of '{}, as should empty_queue in A.8.1 and the
> attached note.
> 
> I presume that the reason this is specified specially is that an
> empty assignment pattern is not normally legal.  Is that true?
> If so, then the purpose of this text in 5.14, and the empty_queue
> production in A.8.1 is to say that it is legal in the special case
> of an assignment pattern of type queue.  Or maybe empty array literals
> used to be illegal in older BNF, even if empty assignment patterns
> are legal in the current BNF.
> 
> So I conclude that even if the special queue concatenation operation
> were defined, you would still have to use '{} for the empty queue.
> 
> Steven Sharp
> sharp@cadence.com
Received on Fri Aug 4 05:18:11 2006

This archive was generated by hypermail 2.1.8 : Fri Aug 04 2006 - 05:18:33 PDT