class Fibonacci implements CSProcess{
ChannelOutputInt out;
public Fibonacci(ChannelOutputInt out){
this.out = out;
}
public void run(){
One2OneChannelInt P1toP0 = new One2OneChannelInt;
One2OneChannelInt P0toD0 = new One2OneChannelInt;
One2OneChannelInt D0toD1 = new One2OneChannelInt;
One2OneChannelInt D0toT = new One2OneChannelInt;
One2OneChannelInt TtoPlus = new One2OneChannelInt;
One2OneChannelInt D1toPlus = new One2OneChannelInt;
One2OneChannelInt PlustoP1 = new One2OneChannelInt;
new Parallel( CSProcess[]{
Prefix(1, PlustoP1, P1toP0),
Prefix(0, P1toP0, P1toD0),
Delta(P1toD0, D0toD1, D0toT),
Delta(D0toD1, out, D1toPlus),
Tail(D0toT, TtoPlus),
Plus(TtoPlus, D1toPlus, PlustoP1)
}).run();
} }
Previous slide | Next slide | Back to first slide | View graphic version |