How to check equality of two channel token values in a Reo connector

1 view
Skip to first unread message

Alireza Farhadi

unread,
Sep 26, 2011, 9:24:08 AM9/26/11
to reo...@googlegroups.com
Dear Member,

I recently faced to a need in permit_detector circuit that is mentioned in previous post. Recall this network has a duty to find proper forks that already had been assigned to a philosopher two take_requests then signals permit_eat port to let the philosopher begins to eat.

For this, I need to set up a network to detect if token value of two input nodes that are named take_request (come from philosopher) and take_fork (come from fork representative) are equal then do other works.

I have no idea for this connector to be able compare token value inputs in the Reo. Dose any one have a suggestion?

P.S. I can solve this problem with a amateur manner by number of filter channel that check static value for both take_request and take_fork channel and synchronize equal filter channel that can result above target but I must use from many filter channels for each equality check also generated extended automata have many transitions with long gourd constraint expression to display all of state of equality with static value.

my mentioned amateur Reo network has been attached

Regards,
Alireza Farhadi
permit_detector-new-reo.png
permit_detector.reo

Christian Krause

unread,
Sep 28, 2011, 4:38:40 AM9/28/11
to reo...@googlegroups.com
Hi Alireza,

if I understand you correctly, you want to compare two different inputs
and allow data-flow only when a constraint is met. What you can do to
achieve this is to use a SyncDrain. In ECT, SyncDrains can be annotated
with a data constraint which must evaluate to true for the SyncDrain to
be able to fire. For example, if you have a SyncDrain between A and B,
you can specify a constraint A==B which will allow dataflow only if the
data values at A and B are the same.

When you draw a SyncDrain, a small text box is shown in the editor. This
is the place where you can enter the constraint. You can also change it
later (either in the diagram editor or in the Properties view). If you
leave the data constraint empty, it defaults to "true".

The data constraint is considered in the mCRL2 converter. In the EA
converter, I am not sure.

I hope this helps for your problem.

Cheers,
Christian

> --
> 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.

Alireza Farhadi

unread,
Sep 28, 2011, 5:25:18 AM9/28/11
to reo...@googlegroups.com
Thanks Christian for you kindness.

If you let me, ask a lot of question in the future.

Regards,
Alireza

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.
--
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.
Reply all
Reply to author
Forward
0 new messages