[sv-ac] 1601: "context" keyword instead of "implicit"

From: Bassam Tabbara <Bassam.Tabbara_at_.....>
Date: Tue Jan 09 2007 - 19:05:10 PST
Hi All,
 
** I suggest we consider and discuss the keyword "context" as a
substitute for the "implicit" earlier suggestion (a new keyword we'd
have to add to SV...) for the args formerly known as untyped :) (see
1601 for details). Follows is some motivation:
    a) There is legacy/precedence in [System]Verilog of
context-determined expressions. This is indeed adequate for 1601 since
the semantic checks will be performed for the final substitution (aka
after inlining) context. This substitution context (i.e. the formal's
placement in the body) plays a role in determining the type -- it's not
just the actual that determines the type so context seems more adequate
than implicit with this argument. For example "untyped" args are often
used in the body when there is need for flexibility/genericity e.g. to
allow easy casting (under Boolean < Sequence < Property) when/where
context requires.
    b) "context" is a keyword in SV -- used as a DPI tf property to
indicate context dependence.
    c) Use a "close enough" keyword that maintains the meaning of both
the suggested keyword itself (i.e. not make it terribly overloaded), and
the 1601 proposal intent (i.e. implicit typing). Even if you disregard
the argument above about context being more adequate when considering
the final substitution context (say because you feel I snuck in some
orthogonal flexibility/casting requirements), "context" keyword might
still work if we think of it as the "actual's instantiation context", a
slight tweak to legacy use, however in this case the "implicit" keyword
would be better if adding it is an option.
 
** To distill things -- 1601's description will be amended in the 2
{sequence|property} places (among other fixes to language/explanation
relative to 928 and 1549) roughly to read something like:
 
"determine (strong) version" -- actual in final substitution context
determines type as in (a)/(b)
context  is used to specify that the argument's type is implicitly
determined after the actual is substituted [for the formal] in the
{sequence|property} context. There are two ways to achieve implicit
typing of arguments. The first is to write the implicitly type arguments
first in the list prior to specifying any type. The second is to use
thecontext type.

"indicate (light) version" -- actual indicates type (i.e. simply
changing implicit to context) as in (c)/(b)
context  is used to specify that the argument's type is implicitly
indicated by the {sequence|property} actual from the instantiation
context. There are two ways to achieve implicit typing of arguments. The
first is to write the implicitly type arguments first in the list prior
to specifying any type. The second is to use the context type.

 
Thx.
-Bassam.
 

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Jan 9 19:06:08 2007

This archive was generated by hypermail 2.1.8 : Tue Jan 09 2007 - 19:06:22 PST