saealib.Pipeline#

class saealib.Pipeline(stages=None, name='', label='', notation='', *, steps=None)[source]#

Bases: object

An 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, and Branch.

Parameters:
  • stages (sequence of PipelineEntry, optional) – Ordered structural entries. steps is 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

__init__

find

Look up a named structural value, optionally recursively.

replace

Replace the named entry in the top-level structural sequence.

to_pseudocode

Render this pipeline as a LaTeX algorithmic block.

to_text

Render this pipeline as a plain-text algorithmic block.

Method Details

Pipeline.__init__(stages=None, name='', label='', notation='', *, steps=None)[source]#
Parameters:
Return type:

None

Pipeline.find(name, *, recursive=False)[source]#

Look up a named structural value, optionally recursively.

Parameters:
  • name (str) – The name of the stage to find.

  • recursive (bool, optional) – If True, descend into nested pipelines and control bodies. Defaults to False.

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 name of 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

Pipeline.to_pseudocode(*, expand=False, indent=0)[source]#

Render this pipeline as a LaTeX algorithmic block.

Parameters:
  • expand (bool)

  • indent (int)

Return type:

str

Pipeline.to_text(*, expand=False, indent=0)[source]#

Render this pipeline as a plain-text algorithmic block.

Parameters:
  • expand (bool)

  • indent (int)

Return type:

str