--- This system
is (very) experimental ---
The trace shows values exchanged on channels;
"output" is the standard output channel.
Simple Parallel Functional Language L.A. Monash Comp Sci 8/4/93 1: let ch=chan in let 2: 3: receiver = 4: ch?chnl -> chnl!'A' -> {get & use a channel} 5: ch?outAction -> {get an output action} 6: outAction ( {& do the output act } 7: ch?outX -> {get an output action} 8: outX 'C' ( {& do it } 9: ch?inAction -> {get input action} 10: inAction ( {& do it } 11: lambda z.output!z -> {& use val} 12: stop))), 13: 14: sender = 15: let outputB = {an output action, both channel and msg fixed} 16: lambda outContinuation. output!'B' -> outContinuation, 17: 18: outputX = {an output action, only channel fixed} 19: lambda X. lambda outContinuation. 20: output!X -> outContinuation, 21: 22: inputX = {an input action, channel fixed} 23: lambda inContinuation. ch?X -> inContinuation X 24: 25: in ch!output -> ch!outputB -> ch!outputX -> 26: ch!inputX -> ch!'D' -> stop 27: 28: in sender || receiver 29: 30: {\fB Pass Input and Output Actions along (untyped) Channel. \fP} 31: 32: --- end of parsing --- (let ((ch =(chan))) in (let ((receiver =(((ch )?(chnl ))->(((chnl )!('A' ))->(((ch )?(outAction ))->((outAction )(((ch )?(outX ))->(((outX )('C' ))(((ch )?(inAction ))->((inAction )(lambda (z ).(((output )!(z ))->(stop )))))))))))), ((sender =(let ((outputB =(lambda (outContinu ).(((output )!('B' ))->(outContinu )))), ((outputX =(lambda (X ).(lambda (outContinu ).(((output )!(X ))->(outContinu ))))), ((inputX =(lambda (inContinua ).(((ch )?(X ))->((inContinua )(X )))))))) in (((ch )!(output ))->(((ch )!(outputB ))->(((ch )!(outputX ))->(((ch )!(inputX ))->(((ch )!('D' ))->(stop )))))))))) in ((sender )||(receiver )))) --- running --- ch3 chan1 output A ch3 function output B ch3 function output C ch3 function ch3 D output D 2 processes left 68 evals, 25 env cells used, 0 cells used --- finished ---