(** * This is the textual example that corresponds to the DFD drawing in the * spec-lang-overview document. What will be sweet here is with the new * name-not-required syntax, we won't have to give names to op inputs and * outputs, which will let the dataflow text notation correspond more closely * to the DFD diagram notation, where the type names on the wires are assumed * to specify the connectivity, without having to use the name part of a * name/type pair. Again, this will be sweet. * * But wait a minute, it won't do to have no i/o names in an op def, since * unlike the obj component case, this would require that type names be used as * var names in conditions and function bodies. Given this, I'm about to go * update the imple-notes file to say we should nix the whole * overly-complicated component ref via type name business. * * But wait one more time. If all we're doing is dataflow, then the arg ref * via type name is fine, since the dataflow connections are not expressions * that require var names. So, at the risk of having things be bloatwareish, * I'm back with component-ref-via-type-name program. In the case of dfds, * it'll make things potientially much easier, since we don't have to have the * dftool autogen parm names. * * But wait one last time (24apr09). We've determined at this point that var * via type name is difficult at best, particularly for objs, and in this case * ops, with multiple components, cum parameters, of the same type. Therefore, * use of type as names in expressions is outta there. *) object In1 = integer; object In2 = integer; object In3 = integer; object Out1 = integer; object Out2 = integer; object Out3 = integer; object Data1 = integer; object Data2 = integer; operation Op1(i1:In1, i2:In2, i3:In3) -> (o1:Out1, o2:Out2, o3:Out3) components: Op1a, Op1b, Op1c; dataflow: i1->Op1a.i1, i2->Op1b.i2, i3->Op1b.i3, Op1a.o1->o1, Op1a.o3->o3, Op1a.d1->Op1c.d1, Op1b.d2->Op1c.d2, Op1c.o2->o2; end; operation Op1a(i1:In1) -> (o1:Out1, o3:Out3, d1:Data1); operation Op1b(i2:In2, i3:In3) -> (d2:Data2); operation Op1c(d1:Data1, d2:Data2) -> (o2:Out2); operation Op1NoNames(In1, In2, In3) -> (Out1, Out2, Out3) components: Op1a, Op1b, Op1c; dataflow: In1->Op1a.In1, In2->Op1b.In2, In3->Op1b.In3, Op1a.Out1->Out1, Op1a.Out3->Out3, Op1a.Data1->Op1c.Data1, Op1b.Data2->Op1c.Data2, Op1c.Out2->Out2; end;