symphonytool / symphony

The Symphony IDE
5 stars 4 forks source link

Interpreter: mu+interrupt+mu fails #260

Closed joey-coleman closed 10 years ago

joey-coleman commented 10 years ago

Found by @klaus15, this will cause an Exception in thread "main" when the trace <a, break> is done.

This only seems to happen when the action after the interrupt tries to go back to the original mu-based loop. Tested in 0.3.2 and d3a55d4.

channels
  a, break

process muXTest = begin
actions
  loop1 = mu X @ ( a -> X )
  loop2 = mu X @ ( a -> X )
  loop3 = a -> loop3

  fail = loop1 /_\ break -> loop1
  ok0  = loop1 /_\ break -> loop2
  ok1  = loop1 /_\ break -> loop3
  ok2  = loop3 /_\ break -> loop1
  ok3  = loop3 /_\ break -> loop3
@ fail
end

/* use trace: <a, break>
   general trace looks like <<a+, break, a*>>
*/
lausdahl commented 10 years ago

From the code:

/**
* Recursion - section 7.5.9 TODO Mutually recursive processes are not implemented yet
*/

....
...
// /THIS IS NOT CORRECT sEMANTICALLY
,..

this is probably why it doesn't work.