saealib.Pipeline#
- class saealib.Pipeline(stages=None, name='', label='', notation='', *, steps=None)[source]#
Bases:
objectAn ordered structural DSL sequence lowered to a semantic graph.
A Pipeline has no state execution path. Its entries may be graph-native components, nested pipelines, or structured control values such as
Repeat,Loop, andBranch.- Parameters:
stages (sequence of PipelineEntry, optional) – Ordered structural entries.
stepsis the keyword spelling for the same value.name (str, optional) – Machine-readable identifier for this pipeline.
label (str, optional) – Human-readable description.
notation (str, optional) – LaTeX notation for pseudocode generation.
steps (Sequence[PipelineEntry] | None)
Methods
Look up a named structural value, optionally recursively. |
|
Replace the named entry in the top-level structural sequence. |
|
Render this pipeline as a LaTeX algorithmic block. |
|
Render this pipeline as a plain-text algorithmic block. |
Method Details
- Pipeline.find(name, *, recursive=False)[source]#
Look up a named structural value, optionally recursively.
- Parameters:
name (str) – The
nameof the stage to find.recursive (bool, optional) – If
True, descend into nested pipelines and control bodies. Defaults toFalse.
- Return type:
structural value
- Raises:
KeyError – If no stage with the given name exists.
- Pipeline.replace(name, stage)[source]#
Replace the named entry in the top-level structural sequence.
- Parameters:
name (str) – The
nameof the stage to replace.stage (PipelineEntry) – Replacement structural value.
- Raises:
KeyError – If no stage with the given name exists.
TypeError – If stage is not a structural value.
- Return type:
None