comparison src/mono_reduce.sml @ 1021:7a4a55e05081

Use call/cc for recv and sleep
author Adam Chlipala <adamc@hcoop.net>
date Sun, 25 Oct 2009 15:29:21 -0400
parents dfe34fad749d
children 217eb87dde31
comparison
equal deleted inserted replaced
1020:dfe34fad749d 1021:7a4a55e05081
110 | ESignalBind (e1, e2) => impure e1 orelse impure e2 110 | ESignalBind (e1, e2) => impure e1 orelse impure e2
111 | ESignalSource e => impure e 111 | ESignalSource e => impure e
112 | EServerCall _ => true 112 | EServerCall _ => true
113 | ERecv _ => true 113 | ERecv _ => true
114 | ESleep _ => true 114 | ESleep _ => true
115 | ESpawn _ => true
115 116
116 val liftExpInExp = Monoize.liftExpInExp 117 val liftExpInExp = Monoize.liftExpInExp
117 118
118 fun multiLift n e = 119 fun multiLift n e =
119 case n of 120 case n of
449 | ESignalReturn e => summarize d e 450 | ESignalReturn e => summarize d e
450 | ESignalBind (e1, e2) => summarize d e1 @ summarize d e2 451 | ESignalBind (e1, e2) => summarize d e1 @ summarize d e2
451 | ESignalSource e => summarize d e 452 | ESignalSource e => summarize d e
452 453
453 | EServerCall (e, _, _) => summarize d e @ [Unsure] 454 | EServerCall (e, _, _) => summarize d e @ [Unsure]
454 | ERecv (e, _, _) => summarize d e @ [Unsure] 455 | ERecv (e, _) => summarize d e @ [Unsure]
455 | ESleep (e, _) => summarize d e @ [Unsure] 456 | ESleep e => summarize d e @ [Unsure]
457 | ESpawn e => summarize d e @ [Unsure]
456 in 458 in
457 (*Print.prefaces "Summarize" 459 (*Print.prefaces "Summarize"
458 [("e", MonoPrint.p_exp MonoEnv.empty (e, ErrorMsg.dummySpan)), 460 [("e", MonoPrint.p_exp MonoEnv.empty (e, ErrorMsg.dummySpan)),
459 ("d", Print.PD.string (Int.toString d)), 461 ("d", Print.PD.string (Int.toString d)),
460 ("s", p_events s)];*) 462 ("s", p_events s)];*)