[sv-ac] parsing problem


Subject: [sv-ac] parsing problem
From: John Havlicek (john.havlicek@motorola.com)
Date: Mon Dec 15 2003 - 07:15:14 PST


All:

Surrendra has pointed out that my proposal 12 on clock flow introduces
a parsing problem. I am not well enough versed in lexical analysis
and parsing to give you a technical characterization of the problem,
but I will describe it.

The proposal makes optional the specification of the clock in places
that it is redundant. Thus, it is not necessary to write a clock
event after the multi-clock concatentation "##" if the clock does not
change. This makes it somewhat tricky to figure out whether what
follows "##" is a parameter expression for a "##n" operator or a
sequence expression that is the right-hand operand of "##". For
example

  @(c) s ## 2 ## 3 ## 4 ## 5 ## 6

vs.

  @(c) s ## 2 ## 3 ## 4 ## 5 ## 6 7

The latter actually means

  @(c) s ##2 ##3 ##4 ##5 ##6 7

A simple solution is to change the multi-clock concatenation symbol so
that it is not identical to the base operator symbol for the
parameterized concatenations "##n".

Surrendra and I have discussed an alternative solution that may be
better. The alternative is to get rid of the special symbol for
multi-clock concatenation and just use the parameterized "##n" in both
singly- and multiply-clocked sequences. In the formal semantics, "##"
means the same thing as "##1", so to get the effect of the old "##"
one would write "##1" instead.
 
For example,

   OLD: @(c) s ## @(d) t

   NEW @(c) s ##1 @(d) t

One could also use any "##n", n > 0, when changing the clock:

   OLD: @(c) ##(n-1) 1 ## @(d) t

   NEW: @(c) ##n @(d) t

The intuition for "##n", n > 0, in any sequence, whether singly- or
multiply-clocked, is then the following:

   s ##n t

means that from the ending point of s, there are n clock tick advances
to get to the starting point of t. The first n-1 of these advances
are to clock ticks of the ending clock of s, while the last advance is
to a clock tick of the leading clock of t.

Best regards,

John H.



This archive was generated by hypermail 2b28 : Mon Dec 15 2003 - 07:16:04 PST