saealib.Pipeline#

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

ベースクラス: 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.

パラメータ:
  • 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)[ソース]#
パラメータ:
戻り値の型:

None

Pipeline.find(name, *, recursive=False)[ソース]#

Look up a named structural value, optionally recursively.

パラメータ:
  • name (str) -- The name of the stage to find.

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

戻り値の型:

structural value

例外:

KeyError -- If no stage with the given name exists.

Pipeline.replace(name, stage)[ソース]#

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

パラメータ:
  • name (str) -- The name of the stage to replace.

  • stage (PipelineEntry) -- Replacement structural value.

例外:
  • KeyError -- If no stage with the given name exists.

  • TypeError -- If stage is not a structural value.

戻り値の型:

None

Pipeline.to_pseudocode(*, expand=False, indent=0)[ソース]#

Render this pipeline as a LaTeX algorithmic block.

パラメータ:
  • expand (bool)

  • indent (int)

戻り値の型:

str

Pipeline.to_text(*, expand=False, indent=0)[ソース]#

Render this pipeline as a plain-text algorithmic block.

パラメータ:
  • expand (bool)

  • indent (int)

戻り値の型:

str