[sv-bc] Query related to randomize() method

From: Shabnam Banu <shabnam_at_.....>
Date: Wed Apr 18 2007 - 21:59:54 PDT
Hello,

I have a query related to inline constraint randomize() method.

LRM says that ,

The randomize()...with{...} construct can be used anywhere an expression
 can appear.

Again From BNF ::

constraint_block ::= { { constraint_block_item } }
 constraint_block_item ::= solve identifier_list before identifier_list ;
                                            | constraint_expression

constraint_expression ::= expression_or_dist ;
                                          | expression  > constraint_set
                                          | if ( expression ) 
constraint_set [ else constraint_set ]
                                          | foreach ( array_identifier [ 
loop_variables ] ) constraint_set

expression_or_dist ::=   expression [ dist { dist_list } ]

Hence ,constraintblock can contain any expression.

So, It should be legal
if randomize()with {... }contains within itself randomize()with {....} 
again.


Please clarify that whether randomize()with {... } can contain another 
randomize()with {... }

within its contraint block or not.

i.e , whether the syntax,

p.randomize() with {x > q.randomize() with {x>0;};};

Assumption:: x is present in the class corresponding to the classobject q .

is correct or not.

Thanks and regards,

Shabnam banu









-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed Apr 18 22:03:22 2007

This archive was generated by hypermail 2.1.8 : Wed Apr 18 2007 - 22:03:47 PDT