moniel icon indicating copy to clipboard operation
moniel copied to clipboard

Automagically recognize Inputs and Outputs

Open mlajtos opened this issue 8 years ago • 4 comments

Having a metanode like this:

{ [In,Parameter] -> Transformation -> Out}

One can easily omit explicit Input and Output declaration since constructed graph implicitly has this information:

{ [in,Parameter] -> Transformation -> out}

By this rule, every source node without explicit Input type is an Input. And vice versa, every sink node without explicit Output type is an Output.

What to do when node is source AND sink at the same time?

mlajtos avatar Jun 23 '17 11:06 mlajtos

  1. Ø (empty atom =^? identity)
  2. a (a:[I,O], pass by, identity) 1.5 a b (||, double pass by, double identity)
  3. a -> b (a:I, b:O, identity)
  4. a b->c (c:O, b:I, a:[I,O], (..hmm, most is identity))
  5. a -> b -> c (yay, finally!)

mlajtos avatar Oct 26 '17 22:10 mlajtos

So in the end, this:

{ [In,Parameter] -> Transformation -> Out}

becomes:

{ [in, Parameter] -> Transformation }

("In" becomes type-less node and "Out" becomes literaly type-less :D, therefore "Transformation" becomes implicitly output/sink node)

mlajtos avatar Nov 03 '17 00:11 mlajtos

therefore "Transformation" becomes implicitly output/sink node

There are two way out of this:

  1. Use I/O (source/sink) flag for every node
  2. Implicitly insert Input/Output nodes where appropriate

Both are equally weird solutions, so it doesn't matter which to choose.

mlajtos avatar Feb 18 '18 07:02 mlajtos