[sv-ac] System functions: argument binding by name

From: Srinivasan Venkataramanan <svenka3@gmail.com>
Date: Tue Mar 22 2011 - 10:18:30 PDT

Hello,
  Here is what I was talking about during tonight's SV-AC call with
reference to $assertcontrol arguments. In SV 1800-2005 chapter:

>> 12.4.4 Argument binding by name

------
function int fun( int j = 1, string s = "no" );
...
endfunction

The fun function can be called as follows:
fun( .j(2), .s("yes") );

-------

Similar notation for $assertcontrol would make it LOT clearer for
users - though requires little extra typing (and then there can be
tools/smart editors assisting that part).

Considering the template/prototype:

$assertcontrol (control_type [, [assertion_type][, [directive_type][,
[levels] [, list_of_modules_or_assertions]]]]);

Positional binding as it exists today:

>> $assertcontrol(2, 7, 7, 0);

Named binding I seek

>> $assertcontrol(.control_type(2),
                              .assertion_type(7)
                              .directive_type(7)
                              .levels(0)
                            );

Please suggest as to how take this forward.

Thanks
Srini
www.cvcblr.com

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Mar 22 10:19:00 2011

This archive was generated by hypermail 2.1.8 : Tue Mar 22 2011 - 10:19:07 PDT