Re: [sv-ac] call to vote on 1549

From: John Havlicek <john.havlicek_at_.....>
Date: Mon Aug 20 2007 - 05:32:08 PDT
Hi Shalom:

Here is what I found:

property_actual_arg ::=
     property_instance
   | sequence_actual_arg

sequence_actual_arg ::= 
   event_expression

event_expression ::=
     [ edge_identifier ] expression [ iff expression ]
   | sequence_instance [ iff expression ]
   | event_expression or event_expression
   | event_expression , event_expression
   | ( event_expression )

expression ::=
     primary
   | unary_operator { attribute_instance } primary
   | inc_or_dec_expression
   | ( operator_assignment )
   | expression binary_operator { attribute_instance } expression
   | conditional_expression
   | inside_expression
   | tagged_union_expression

primary ::=
     primary_literal
   | [ implicit_class_handle . | class_scope | package_scope ] hierarchical_identifier select
   | empty_queue
   | concatenation
   | multiple_concatenation
   | function_subroutine_call
   | ( mintypmax_expression )
   | cast
   | assignment_pattern_expression
   | streaming_concatenation
   | sequence_method_call
   | this^6
   | $^21
   | nullo


21) The $ primary shall be legal only in a select for a queue variable or in an open_value_range.


In SV-AC, we thought that we would get $ through primary as shown.

However, note 21 seems to foil this.

I think we need to ensure that $ can be passed as actual argument to a
sequence or property as a part of the resolution to 1350.  One
possibility is that we just put $ back into the sequence_actual_arg
production so that its use is not governed by note 21.

J.H.


> X-ExtLoop1: 1
> X-IronPort-AV: E=Sophos;i="4.19,282,1183359600"; 
>    d="scan'208";a="119334345"
> X-MIMEOLE: Produced By Microsoft Exchange V6.5
> Content-class: urn:content-classes:message
> Date: Mon, 20 Aug 2007 05:29:43 +0300
> X-MS-Has-Attach: 
> X-MS-TNEF-Correlator: 
> Thread-Topic: [sv-ac] call to vote on 1549
> Thread-Index: Acfirb+csZ482mj3Tw+3F1GlpaQQVQAJCkXg
> From: "Bresticker, Shalom" <shalom.bresticker@intel.com>
> Cc: <sv-ac@eda-stds.org>
> X-OriginalArrivalTime: 20 Aug 2007 02:29:45.0863 (UTC) FILETIME=[F91A2170:01C7E2D1]
> 
> Go through the BNF in Annex A and see where it is allowed.
> 
> Shalom=20
> 
> > -----Original Message-----
> > From: John Havlicek [mailto:john.havlicek@freescale.com]=20
> > Sent: Monday, August 20, 2007 1:10 AM
> > To: Bresticker, Shalom
> > Cc: john.havlicek@freescale.com; sv-ac@eda-stds.org
> > Subject: Re: [sv-ac] call to vote on 1549
> >=20
> > Hi Shalom:
> >=20
> > This is interesting.  We have thought for a long time that $=20
> > can be passed as actual argument to sequence and property=20
> > instances.  I think tools support this too.
> >=20
> > Does the statement in 6.20.2.1 actually imply that $ can be=20
> > assigned only to parameters and then only to ones of integer=20
> > types?  That is not the way I read it.
> >=20
> > I also do not like the turn of phrase=20
> >=20
> >   "An actual argument can replace any of the following:"
> >=20
> >=20
> > Best regards,
> >=20
> > J.H.
> >=20
> > > X-ExtLoop1: 1
> > > X-IronPort-AV: E=3DSophos;i=3D"4.19,281,1183359600";=20
> > >    d=3D"scan'208";a=3D"284779936"
> > > X-MIMEOLE: Produced By Microsoft Exchange V6.5
> > > Content-class: urn:content-classes:message
> > > Date: Sun, 19 Aug 2007 11:57:00 +0300
> > > X-MS-Has-Attach:=20
> > > X-MS-TNEF-Correlator:=20
> > > Thread-Topic: [sv-ac] call to vote on 1549
> > > Thread-Index: AcfgwmImOfiRY4IgSZCSHsE6gjltOABeqaNg
> > > From: "Bresticker, Shalom" <shalom.bresticker@intel.com>
> > > Cc: <sv-ac@eda-stds.org>
> > > X-OriginalArrivalTime: 19 Aug 2007 08:57:02.0177 (UTC)=20
> > > FILETIME=3D[E89C8510:01C7E23E]
> > >=20
> > > John,
> > >=20
> > > I looked at this a little.
> > >=20
> > > Mantis 1350 discusses ambiguities with respect to the use of $, but=20
> > > the basic restrictions are stated at the beginning of 6.20.2.1:
> > >=20
> > > "The value $ can be assigned to parameters of integer types. A=20
> > > parameter to which $ is assigned shall only be used=20
> > wherever $ can be=20
> > > specified as a literal constant."
> > >=20
> > > Assigning $ to a variable does not fit those criteria.
> > > Nor does passing $ as an argument.
> > > You mentioned passing $ "as actual argument expression to a typed=20
> > > formal argument."
> > > I do not see that it could be passed even to an untyped=20
> > formal argument.
> > >=20
> > > I doubt even that what is written in 16.7 meets those criteria:
> > >=20
> > > "An actual argument can replace any of the following:
> > >  ...
> > >  - Upper delay range or repetition range if the actual=20
> > argument is $"
> > >=20
> > > Regards,
> > > Shalom
> > >=20
> > >=20
> > > > -----Original Message-----
> > > > From: John Havlicek [mailto:john.havlicek@freescale.com]=3D20
> > > > Sent: Friday, August 17, 2007 2:32 PM
> > > > To: Bresticker, Shalom
> > > > Cc: Bustan, Doron; Yaniv.Fais@freescale.com; sv-ac@eda-stds.org
> > > > Subject: Re: [sv-ac] call to vote on 1549 =3D20  Hi Shalom:
> > > >=3D20
> > > > Lisa and I had a discussion yesterday about the example=20
> > in=3D20  the=20
> > > >1549 proposal.
> > > >=3D20
> > > > I do not think the LRM as it stands now allows $ to be=3D20=20
> >  assigned=20
> > > >to a variable or passed as actual argument=3D20  expression=20
> > to a typed=20
> > > >formal argument.  Do you know otherwise?
> > > >=3D20
> > > > The main conceptual issue that I see with allowing $ to be=3D20 =20
> > > >assigned to a variable or passed as actual argument=3D20 =20
> > expression to=20
> > > >a typed formal argument is defining what value=3D20  it has in the=20
> > > >space of possible values for the associated data type.
> > > >=3D20
> > > > It doesn't seem quite right to me to say that if $ is=3D20 =20
> > assigned=20
> > > >to a shortint, for example, then the value is the=3D20  largest one =
> 
> > > >that can be represented in an shortint.  On the=3D20  other=20
> > hand, maybe=20
> > > >this is a useful and sensible definition. =3D20  With definitions =
> of=20
> > > >this kind, the meaning of $ is dependent=3D20  on the data type =
> into=20
> > > >which it is assigned or to which it is=3D20  bound, but there is=20
> > > >already precedent for that in the various=3D20  coercion rules.
> > > >=3D20
> > > > I recommended that we avoid this problem altogether for=20
> > now=3D20  and=20
> > > >not allow $ to be assigned to a variable or passed as=3D20  actual=20
> > > >argument expression to a typed formal argument.  I=3D20  =
> recommended=20
> > > >that Lisa change the example to pass $ to a=3D20  context formal=20
> > > >argument.
> > > >=3D20
> > > > J.H.
> > > >=3D20
> > > > > X-Authentication-Warning: server.eda-stds.org: majordom set=3D20
> > > > sender to=3D20
> > > > > owner-sv-ac@eda.org using -f
> > > > > X-ExtLoop1: 1
> > > > > X-IronPort-AV: E=3D3DSophos;i=3D3D"4.19,269,1183359600";=3D20
> > > > >    d=3D3D"scan'208";a=3D3D"118117813"
> > > > > X-MIMEOLE: Produced By Microsoft Exchange V6.5
> > > > > Content-class: urn:content-classes:message
> > > > > Date: Thu, 16 Aug 2007 09:15:58 +0300 X-MS-Has-Attach:=3D20=20
> > > > > X-MS-TNEF-Correlator:=3D20
> > > > > Thread-Topic: [sv-ac] call to vote on 1549
> > > > > Thread-Index: =3D
> > > AcfeiQ52OKcMoqhRQC+dKxDIPbJwOwADZVDwABotlYAAMwPDUA=3D3D=3D3D
> > > > > From: "Bresticker, Shalom" <shalom.bresticker@intel.com>
> > > > > Cc: <sv-ac@eda-stds.org>
> > > > > X-OriginalArrivalTime: 16 Aug 2007 06:15:59.0713 (UTC)=3D20 =20
> > > > >FILETIME=3D3D[EA184510:01C7DFCC]
> > > > > X-eda.org-MailScanner: Found to be clean, Found to be clean
> > > > > X-Spam-Status: No, No
> > > > > X-MIME-Autoconverted: from quoted-printable to 8bit by=3D20 =20
> > > > >server.eda-stds.org id l7G6GDdJ019035
> > > > > Sender: owner-sv-ac@eda.org
> > > > > X-eda.org-MailScanner-Information: Please contact the ISP for=20
> > > > >more=3D20  information
> > > > > X-eda.org-MailScanner-From: owner-sv-ac@server.eda.org =3D20  =
> The=20
> > > > >LRM states in other places restrictions on the use of $.=3D20  =
> The=20
> > > > >question is whether the example fulfills those conditions.
> > > > >=3D20
> > > > > The following quoted wording is a little unclear:=3D20 =3D20
> > > > > > An actual argument can replace any of the following:
> > > > > > - Identifier
> > > > > > - Expression
> > > > > > - Event control expression
> > > > > > - Upper delay range or repetition range if the actual=3D20
> > > > argument is $
> > > > >=3D20
> > > > > "can replace" seems a little problematic here.
> > > > > An actual argument cannot really replace an expression. E.g.,=20
> > > > >it=3D20  cannot replace a+b. It can replace a formal argument=20
> > > > >which=3D20
> > > > is used as=3D20
> > > > > an expression, which is a little different.
> > > > >=3D20
> > > > > And does this list cover all the possibilities, or is it=3D20
> > > > just intended=3D20
> > > > > to be examples?
> > > > >=3D20
> > > > > And does the last item mean:
> > > > > 1. If the actual argument is $, it can be used only in this=3D20
> > > > way? If it=3D20
> > > > > is not $, can it be used in this way?
> > > > > 2. It can be used in this way only if it is $? If it is $,=3D20
> > > > can it be=3D20
> > > > > used in another way?
> >=20

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Aug 20 05:32:36 2007

This archive was generated by hypermail 2.1.8 : Mon Aug 20 2007 - 05:32:59 PDT