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
StartandFinishnode, 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
inArgandoutArgrendered intoinPortsandoutPortsrespectively. - Links can only be created from an
outPortto aninPort.
Flow [ ▶ ] Ports
- Flow Ports indicate the sequence of execution.
- All flow ports must be linked from
StarttoFinish. - Flow loops are not allowed.
- Flow ports can only link to other flow ports, and parameter ports to parameter ports.
Compulsory Ports
Compulsory inPortsare renderedinCompArgindicated 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.,
strorint). -
The
anyport bypasses type checking. -
Port visualization for different data types:
Data Type Port UI string" "int1float1.0boolean⊤⊥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.