1

I have encountered a situation where I would like to ignore some inputs.

In my transition action I use a simple if-then-else expression to test for the inputs I wish to produce output tokens for and I generate a "NOP" token for those I'd like to ignore since you must have a type correct expression to satisfy ML.

I attempted to use if this=that then 1`goodToken else 0`goodToken (with and without parenthesis) but this fails the type correctness check on the output portion of the action.

These tokens are passed to the next place which then branches either to transition whose guard allows NOP tokens only or to a transition which does not allow NOP tokens.

In this way I produce and consume these "no token" tokens.

Is there a simple way to accomplish this within ml or by a clever arc expression so that I can simplify my net?

Stephen
  • 1,607
  • 2
  • 18
  • 40
  • The sliding window protocol example, i.e. simple protocol from the Jensen's book introduces the `empty` term. – Dima Chubarov Jul 15 '14 at 13:54
  • When I attempt to make use of the `empty` expression I get an error that the types of the branches of the if then else statement do not match (eg: then branch:BOOL, else branch: Z ms). Any thoughts on resolving that problem? – Stephen Jul 18 '14 at 15:38
  • @DmitriChubarov Note... http://cpntools.org/cpn2000/list_and_multi-set_inscri Seems to indicate that there is some confusion about how to use empty or how it's handled. – Stephen Jul 18 '14 at 15:53

0 Answers0