Re: [Gems-users] About the number of action can be triggered in SLICC


Date: Tue, 03 Nov 2009 13:05:18 +0100
From: Javi Merino <jmerino@xxxxxxxxxxxxx>
Subject: Re: [Gems-users] About the number of action can be triggered in SLICC
王颖 wrote:
> Hi,all
> 
> I have a question about SLICC grammar when I tried to do some work
> about coherency protocols.I wonder if  a cachemsg at the inport can be
> used to "trigger" two different actions, for example:
>  if( in_msg.destination.isElement(machineID)){
> 
> trigger(Event:Agecheck,in_msg.Address);
>  trigger(Event:Fwd_GETX, in_msg.Address);
>                        }


I don't think the Fwd_GETX will be triggered.
        
I've never used it, but looking at slicc/ast/FuncCallExprAST.C:180,
there is a doubleTrigger. You can try something like:
        
if( in_msg.destination.isElement(machineID)){
  doubleTrigger(Event:Agecheck, in_msg.Address, Event:Fwd_GETX, in_msg.Address);
}

Note that, as stated in the code, the second transition cannot fail
because the first event cannot be undone.
        
Hope this helps,
Javi
        
>  Can I code like that?It's a trivial question,but I wanna make sure no
> mistaken will happen.
> Thank you!
> Regards,
>          Lee
>                                                    
> _______________________________________________
> Gems-users mailing list
> Gems-users@xxxxxxxxxxx
> https://lists.cs.wisc.edu/mailman/listinfo/gems-users
> Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/"; to your search.
> 

Attachment: signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente

[← Prev in Thread] Current Thread [Next in Thread→]