How to generate extended automta for a Reo circuit contains filter channel

8 views
Skip to first unread message

Alireza Farhadi

unread,
Sep 20, 2011, 5:37:14 AM9/20/11
to reo...@googlegroups.com
Dear Members,

I have designed a component named permit detector and use it in an orchestration Reo network for a modified dining philosopher problem. this component detects if 2 take_request of a philosopher for forks is satisfied or not then permit the philosopher to eating.

Detection operation is based on some filter channels that check input token from each fork status representative port (take_fork) based on existence of specified token value.

If this port to be enabled this means related fork is selected by orchestration network for one of 2 take_requests of a philosopher.

In continue permit detector circuit checks for every take_request of the philosopher if received token value from a take_fork port equals to expected token value for that request. By the way a unique token value has been relied on each philosopher take_request after receiving in the orchestration network)

Permit detector joins 2 outputs of same filter(is sensitive to token0) channels and its output syncs with related take_request0 of the philosopher.

Finally after a delay(simulates sequence ordering to fulfillment of take_request e.i first take_request0, then take_request1) with fifo1 channel, other counterpart for take_request1 must be synced and result sent to permit port.

After designing of this component I want to generate extended automata from that but ECT return an error:

Unknown error in
cwi.reo2ea.ca.transform.channels.FilterTransform.transform(FilterTransform.java:47)

I'm sure I have some mistakes in the circuit. Please guide me how to correct them and how to checks detail behaviors of designed network to expected behavior. Is Solution Tab in ECT help me to sure from expected behavior. 

How I can use it?  Is there any sample?

Regards
Alireza Farhadi

 
permit_detector.png
permit_detector.reo

Christian Krause

unread,
Sep 20, 2011, 8:14:33 AM9/20/11
to reo...@googlegroups.com
Hi Alireza,

If I understand correctly you want to compare the input of a Filter
channel with a constant. In the tool you can either use string
expressions for that written as "mystring" or integers, e.g. 1, 2, 3
etc. Let's assume you use 0 and 1 as constants. Then you would have to
write your Filter constraints as:

take_fork0==1

(name of the source node '==' constant). You can also use other standard
comparison checks, such as >, >= etc. (but not = because this is used
for assignments).

With this you should be able to generate the CA -- I attached a
screenshot of it. By the way: here you will get transitions which will
never be able to fire, because of constraints of the form (x==1 & x==0).
This could be automatically removed but currently it is not implemented.
If you specify no or an empty constraint, 'true' will be used.

Cheers,
Christian

> /
> /
> /Unknown error in/
> /cwi.reo2ea.ca.transform.channels.FilterTransform.transform(FilterTransform.java:47)/


>
> I'm sure I have some mistakes in the circuit. Please guide me how to
> correct them and how to checks detail behaviors of designed network to
> expected behavior. Is Solution Tab in ECT help me to sure from
> expected behavior.
>
> How I can use it? Is there any sample?
>
> Regards
> Alireza Farhadi
>

> --
> You received this message because you are subscribed to the Google
> Groups "reo-dev" group.
> To post to this group, send email to reo...@googlegroups.com.
> To unsubscribe from this group, send email to
> reo-dev+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/reo-dev?hl=en.


--
Christian Krause
Hasso Plattner Institute for Software Systems Engineering
Prof.-Dr.-Helmert-Str. 2-3
D-14482 Potsdam, Germany

Phone: +49 (0)331-5509-525

Screenshot.png

Alireza Farhadi

unread,
Sep 21, 2011, 11:40:32 AM9/21/11
to reo...@googlegroups.com
Dear Dr Krause,

Thanks for your correction,

If I want to check existence of a specified token that is generated by transform channel in previous steps then how do I setup this transform channel for generating 0 or 1 constant as token value(what do I write in expression property of transform channel).

Next question is as you mentioned this syntax:
(name of the source node '==' constant)
for expression property of filter channel, what happens if filter channel source end dose not lay near border source node with a name (assume near of internal node without name). for this situation what name is used for Boolean expression.

Regards,
Alireza Farhadi



To unsubscribe from this group, send email to reo-dev+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/reo-dev?hl=en.


--
Christian Krause
Hasso Plattner Institute for Software Systems Engineering
Prof.-Dr.-Helmert-Str. 2-3
D-14482 Potsdam, Germany

Phone: +49 (0)331-5509-525
--
You received this message because you are subscribed to the Google Groups "reo-dev" group.
To post to this group, send email to reo...@googlegroups.com.
To unsubscribe from this group, send email to reo-dev+unsubscribe@googlegroups.com.

Christian Krause

unread,
Sep 21, 2011, 1:41:27 PM9/21/11
to reo...@googlegroups.com
Dear Alireza,

please read on..

On 09/21/11 17:40, Alireza Farhadi wrote:
> Dear Dr Krause,
>
> Thanks for your correction,
>
> If I want to check existence of a specified token that is generated by
> transform channel in previous steps then how do I setup this transform
> channel for generating 0 or 1 constant as token value(what do I write
> in expression property of transform channel).

If I am not mistaken, you have to write it as an assignment where you
refer to a data transformation function -- so the data transformation is
not defined in-place(!). I did not try it out, but my guess is that for
a Transform channel between two nodes "in" and "out" you need to write
an expression like this:

out=f(in)

This constraint should then occur also in the CA. If you generate code,
I expect that the function "f" will be interpreted as a name of a method
which you have to implement. (Sorry, but I am not sure about this,
because someone else implemented it a while ago already)

If you want to do verification of your connector, please take a look at
the mCRL2 plug-in -- it has full support for data and data-aware
channels and scales much better. This is described in a number of papers
and works very well in practice.

>
> Next question is as you mentioned this syntax:
> (name of the source node '==' constant)
> for expression property of filter channel, what happens if filter
> channel source end dose not lay near border source node with a name
> (assume near of internal node without name). for this situation what
> name is used for Boolean expression.
>

You must name the nodes which you want to use. Otherwise there is no way
to reference them. Note also that when you generate a CA, you have to be
careful with hiding. If you do a series of data transformation and use
buffer in between, then hiding all internal nodes can be dangerous.

Cheers,
Christian

> <mailto:reo...@googlegroups.com>.


> To unsubscribe from this group, send email to

> reo-dev+u...@googlegroups.com
> <mailto:reo-dev%2Bunsu...@googlegroups.com>.


> For more options, visit this group at
> http://groups.google.com/group/reo-dev?hl=en.
>
>
>
> --
> Christian Krause
> Hasso Plattner Institute for Software Systems Engineering
> Prof.-Dr.-Helmert-Str. 2-3
> D-14482 Potsdam, Germany
>
> Phone: +49 (0)331-5509-525
>
> --
> You received this message because you are subscribed to the Google
> Groups "reo-dev" group.
> To post to this group, send email to reo...@googlegroups.com

> <mailto:reo...@googlegroups.com>.


> To unsubscribe from this group, send email to

> reo-dev+u...@googlegroups.com
> <mailto:reo-dev%2Bunsu...@googlegroups.com>.


> For more options, visit this group at
> http://groups.google.com/group/reo-dev?hl=en.
>
>
> --

> You received this message because you are subscribed to the Google
> Groups "reo-dev" group.
> To post to this group, send email to reo...@googlegroups.com.
> To unsubscribe from this group, send email to

> reo-dev+u...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages