[great-users] cut operator

Aditya Agrawal aagrawa at us.ibm.com
Tue May 3 12:10:15 CDT 2005


Dear Tivadar,

In GReAT the test case has a default semantics that is the equivalent of a 
set of if blocks

if(Case1) 
{
}

if(Case2)
{
}

....


The cut operator in an earlier if statement makes the rest become else ifs

Thus, if I have 3 cases 1, 2, and 3 and the second one has a cut, the 
equivalent pseudo code will be as follows:

if(Case1)
{
}

if(Case2)
{
}
else
{
       if(Case3)
       {
       }
{


The effect you are wanting to get is a different thing and the cut wont 
help you there. What you need is to change the attribute "For All" in the 
case from true to false. This attribute tells the matcher weather to look 
for all the matches or the first match.

Thanks,
Adi


-----------------------------------
Aditya Agrawal
Researcher
IBM T. J. Watson
mailto:aagrawa at us.ibm.com
+1 (914) 784-6068 (TL 863)


great-users-bounces at list.isis.vanderbilt.edu wrote on 05/03/2005 10:59:58 
AM:

> Hi,
> 
> How does the cut operator work in a test case ?
> 
> In the attached example, I'd like to choose a single Corridor from 
> the house and run the rest of the rules on it (regardless of how 
> many corridors the house has).
> I tried to use a test case with a cut operator, but I still get all 
> the matches on the output side.
> 
> thanks,
> 
> Tivadar
>  <<Transf.xme>>  <<House.xme>> 
> 
> 
> [attachment "Transf.xme" deleted by Aditya Agrawal/Watson/IBM] 
> [attachment "House.xme" deleted by Aditya Agrawal/Watson/IBM] 
> _______________________________________________
> great-users mailing list
> great-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/great-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/great-users/attachments/20050503/8bef1c5a/attachment.htm


More information about the great-users mailing list