Node, Port, and Link Logic
To ensure robust codegen compilation, we have established several rules and logics for nodes, ports, and links in Xircuits.
Node Logic
- A node is a Xircuits component.
- Each canvas has a
Start
andFinish
node, which cannot be deleted. - Nodes can be locked, preventing movement or deletion.
- All component library nodes must be linked to compile and execute a workflow.
Port Logic
- Each node has ▶ Ports and optionally parameter ports.
- Parameter Ports are
inArg
andoutArg
rendered intoinPorts
andoutPorts
respectively. - Links can only be created from an
outPort
to aninPort
.
Flow [ ▶
] Ports
- Flow Ports indicate the sequence of execution.
- All flow ports must be linked from
Start
toFinish
. - Flow loops are not allowed.
- Flow ports can only link to other flow ports, and parameter ports to parameter ports.
Compulsory Ports
Compulsory inPorts
are renderedinCompArg
indicated with the*
symbol.- A parameter must be supplied to compile and run the workflow.
Port Type Checking
Ports may have specific expected types (e.g.,
str
orint
).The
any
port bypasses type checking.Port visualization for different data types:
Data Type Port UI string
" "
int
1
float
1.0
boolean
⊤⊥
list
[ ]
tuple
( )
dict
{ }
any
[_]
Dynamic Ports
Dynamic Ports expand dynamically when linked, while being treated as a singular variable in the compiled code.
Types: DynaList, DynaTuple
Linking to an empty dynaport spawns a new identical dynaport below it, with an updated [x] label.
Preview
All Literals can link to DynaLists and DynaTuples.
Removing a link updates subsequent dynaports automatically.
Creating a link to an already linked dynaport shifts existing links and following dynaports.
Preview
Dynaports inherit other default port behaviors, such as reloading.
Link Logic
Links are created by selecting and dragging from a port.
Linking an
outPort
to aninPort
indicates data passing between components.If a link is not dropped on a port, it prompts the component tray interface.
Component Chaining Interface
If a link is not dropped on a port, it prompts the component tray interface.
You can create a point in a link by
ctrl
+ clicking on a link. This will allow you to route links around components.
Smart Link
When linking ▶ ports, Xircuits checks for parameter port label intersections and attempts to link them automatically.
Video: Interface Smart Link