G|dfps|
feedback: init
halt: halt ==
  <B
  , tuple-type(map(dfp.(df-program-statetype(dfp)?);dfps))  bag(B)
  , <tuple(||dfps||;i.inl df-program-state(dfps[i]) ), init>
  , let n := ||dfps|| in
    let nxt 
     tuple(n;i.let T,S,init,nxt = dfps[i]
               in a,x.case x of inl(z) =nxt z a | inr(z) => <x, {}>  )
    in sb,a.
        let s,buf = sb 
        in if halt s
           then <inr  , {}>
           else let ps 
                 ap2-tuple(n;nxt;a;s)
                in let x 
                    G map-tuple(n;p.(snd(p));ps) buf
                   in <inl <evalall(map-tuple(n;p.(fst(p));ps))
                       , if null(x) then buf else x fi 
                       > 
                   , x
                   >
           fi >



Definitions occuring in Statement :  df-program-state: df-program-state(dfp) df-program-statetype: df-program-statetype(dfp) select: l[i] map: map(f;as) length: ||as|| null: null(as) ifthenelse: if b then t else f fi  it: spreadn: spread4 pi1: fst(t) pi2: snd(t) unit: Unit apply: f a lambda: x.A[x] spread: spread def pair: <a, b> product: x:A  B[x] decide: case b of inl(x) =s[x] | inr(y) =t[y] inr: inr x  inl: inl x  union: left + right empty-bag: {} bag: bag(T) map-tuple: map-tuple(len;f;t) ap2-tuple: ap2-tuple(len;f;x;t) tuple: tuple(n;i.F[i]) tuple-type: tuple-type(L) evalall: evalall(t) callbyvalueall: callbyvalueall callbyvalue: callbyvalue
FDL editor aliases :  feedback-prog

G|dfps|
feedback:  init
halt:  halt  ==
    <B
    ,  tuple-type(map(\mlambda{}dfp.(df-program-statetype(dfp)?);dfps))  \mtimes{}  bag(B)
    ,  <tuple(||dfps||;i.inl  df-program-state(dfps[i])  ),  init>
    ,  let  n  :=  ||dfps||  in
        let  nxt  \mleftarrow{}{}
          tuple(n;i.let  T,S,init,nxt  =  dfps[i]
                              in  \mlambda{}a,x.case  x  of  inl(z)  =>  nxt  z  a  |  inr(z)  =>  <x,  \{\}>    )
        in  \mlambda{}sb,a.
                let  s,buf  =  sb 
                in  if  halt  s
                      then  <inr  \mcdot{}  ,  \{\}>
                      else  let  ps  \mleftarrow{}{}
                                  ap2-tuple(n;nxt;a;s)
                                in  let  x  \mleftarrow{}{}
                                        G  map-tuple(n;\mlambda{}p.(snd(p));ps)  buf
                                      in  <inl  <evalall(map-tuple(n;\mlambda{}p.(fst(p));ps)),  if  null(x)  then  buf  else  x  fi  > 
                                      ,  x
                                      >
                      fi  >


Date html generated: 2011_08_16-AM-09_40_12
Last ObjectModification: 2011_06_24-PM-04_59_04

Home Index