Comm-next-continue(l_comm;l_choose;piD;cSt) ==
  let st = Comm-st(cSt) in
   let q = Comm-q(cSt) in
   let waiting = Comm-waiting(cSt) in
   let count = Comm-count(cSt) in
   if waiting
   then <cSt, make-lg([])>
   else let p = Comm-process-q(q;l_comm;st) in
         let q' = fst(p) in
         let st' = fst(snd(p)) in
         let loc = fst(snd(snd(p))) in
         let mList = snd(snd(snd(p))) in
         if null(q')
         then <<st', [], l_comm, ff, count>, make-lg([])>
         else let msgs2choose = map(
x.<l_choose
                                       , mk-tagged("msg";pDVrequest(x;count))
                                       >mList) in
                  <<st', q', loc, tt, count + 1>
                  , make-lg([<l_comm, mk-tagged("msg";pDVcontinue())>]
                    @ msgs2choose)
                  >
         fi 
   fi 
Definitions : 
Comm-st: Comm-st(cSt), 
Comm-q: Comm-q(cSt), 
Comm-waiting: Comm-waiting(cSt), 
Comm-count: Comm-count(cSt), 
Comm-process-q: Comm-process-q(q;id;st), 
pi1: fst(t), 
pi2: snd(t), 
ifthenelse: if b then t else f fi , 
null: null(as), 
bfalse: ff, 
let: let, 
map: map(f;as), 
lambda:
x.A[x], 
pDVrequest: pDVrequest(rndv2;counter), 
btrue: tt, 
add: n + m, 
natural_number: $n, 
make-lg: make-lg(L), 
append: as @ bs, 
cons: [car / cdr], 
pair: <a, b>, 
mk-tagged: mk-tagged(tg;x), 
token: "$token", 
pDVcontinue: pDVcontinue(), 
nil: []
FDL editor aliases : 
Comm-next-continue
Comm-next-continue(l$_{comm}$;l$_{choose}$;piD;cSt)  ==
    let  st  =  Comm-st(cSt)  in
      let  q  =  Comm-q(cSt)  in
      let  waiting  =  Comm-waiting(cSt)  in
      let  count  =  Comm-count(cSt)  in
      if  waiting
      then  <cSt,  make-lg([])>
      else  let  p  =  Comm-process-q(q;l$_{comm}$;st)  in
                  let  q'  =  fst(p)  in
                  let  st'  =  fst(snd(p))  in
                  let  loc  =  fst(snd(snd(p)))  in
                  let  mList  =  snd(snd(snd(p)))  in
                  if  null(q')
                  then  <<st',  [],  l$_{comm}$,  ff,  count>,  make-lg([])>
                  else  let  msgs2choose  =  map(\mlambda{}x.<l$_{choose}$,  mk-tagged("msg";pDVrequest\000C
(x;count))>mList)  in
                                    <<st',  q',  loc,  tt,  count  +  1>
                                    ,  make-lg([<l$_{comm}$,  mk-tagged("msg";pDVcontinue())>]  @  msg\000C
s2choose)
                                    >
                  fi 
      fi 
Date html generated:
2010_08_27-PM-09_42_16
Last ObjectModification:
2010_04_27-PM-03_43_19
Home
Index