Spinroot

A forum for Spin users

You are not logged in.

#1 2013-06-27 19:56:38

robstewartuk
Member
Registered: 2013-01-04
Posts: 8

Missing parameters in send

Take the following simple model:

mtype = { Foo , Bar };
chan master = [10] of { mtype , int , int } ;

active proctype Master() {
chan sender;
int i , x ;
do
:: master ? Foo( i , x ) -> skip ;
:: master ? Bar( i ) -> skip;
od
}

active proctype Slave() {
do
:: master ! Foo( 5 , 10 ) -> skip ;
:: master ! Bar( 3 ) -> skip ;
od
}

I'd like to know whether there are any severe side effects to not satisfying all parameters for a message on a channel. The Foo constructor has only one int, Bar has two int's. When simulating, I see the following warnings:

11: warning: missing params in send
16: warning: missing params in next recv
17: warning: missing params in send

Is this a perfectly acceptable use of sending/receiving over channels?

Offline

#2 2013-06-29 04:27:28

spinroot
forum
Registered: 2010-11-18
Posts: 695
Website

Re: Missing parameters in send

its a warning, not an error
but -- it would be wiser to just send a 0 for the unused fields... so that the warning goes away

Offline

Board footer

Powered by FluxBB