Should defaulted ports be named?

The defaulted output port of a subpipeline is given the name "result".
And the defaulted input and output ports of a pipeline (if we keep them)
are given the names "source" and "result".

Since the purpose of these is to simplify the very basic case of
straight-line pipelines, wouldn't it be better for them to have
unusable names such as "!result"?  As it is, you can have explicit
references to a port which is not declared.  This is not only bad
for readability, but makes it more complicated to analyse.  Consider:

  <p:group name="g0">

    <p:group name="g1">
      <p:identity>
         <p:input><p:pipe step="g2" port="result"/></p:input>
      </p:identity>
      ...
    </p:group>

    <p:group name="g2">
      ...
    </p:group>

  <p:group>

To determine that g0 doesn't get a defaulted output, you have to
discover that g2's defaulted output is read in g1.  But when you
process g1, you may not have determined that g2 has a defaulted output
yet.  This is not impossible to solve, but it's another unexpected
constraint on the order you have to analyse the program in.

-- Richard

Received on Tuesday, 30 October 2007 12:03:56 UTC