moniel
moniel copied to clipboard
Automagically recognize Inputs and Outputs
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?
- Ø (empty atom =^? identity)
- a (a:[I,O], pass by, identity) 1.5 a b (||, double pass by, double identity)
- a -> b (a:I, b:O, identity)
- a b->c (c:O, b:I, a:[I,O], (..hmm, most is identity))
- a -> b -> c (yay, finally!)
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)
therefore "Transformation" becomes implicitly output/sink node
There are two way out of this:
- Use I/O (source/sink) flag for every node
- Implicitly insert Input/Output nodes where appropriate
Both are equally weird solutions, so it doesn't matter which to choose.