Module("parallel",[Imports([Import("process"),Import("pipe")]),Strategies([SDef("par",[DefaultVarDec("s1"),DefaultVarDec("s2")],Seq(Where(AM(CallNoArgs(SVar("pipe")),Var("p"))),Seq(Call(SVar("fork"),[Scope(["t1"],Seq(AM(LChoice(CallNoArgs(SVar("s1")),BA(CallNoArgs(SVar("exit")),NoAnnoList(Int("1")))),Var("t1")),Seq(BA(CallNoArgs(SVar("stdout-to-pipe")),Var("p")),Seq(BA(CallNoArgs(SVar("WriteToTextFile")),NoAnnoList(Tuple([Var("stdout"),Var("t1")]))),BA(CallNoArgs(SVar("exit")),NoAnnoList(Int("0")))))))]),Seq(Match(NoAnnoList(Tuple([Var("pid"),Var("t")]))),Seq(AM(BA(CallNoArgs(SVar("s2")),Var("t")),Var("t2")),Seq(AM(BA(CallNoArgs(SVar("read-term-from-pipe")),Var("p")),Var("t1")),Seq(BA(CallNoArgs(SVar("waitpid")),Var("pid")),Seq(Choice(CallNoArgs(SVar("exited")),Choice(CallNoArgs(SVar("signaled")),CallNoArgs(SVar("stopped")))),Build(NoAnnoList(Tuple([Var("t1"),Var("t2")])))))))))))])])
