pystencils.flow.flowgraph.Flowgraph#

class pystencils.flow.flowgraph.Flowgraph(bottom, *, name=None)#

A closed flowgraph in canonical form.

Upon creation, flowgraphs will be canonicalized and checked for consistency.

Parameters:
  • bottom (Bottom) – The Bottom node identifying the graph.

  • name (str | None)

property bottom: Bottom#

Bottom node of this flowgraph

property free_symbols: frozenset[Symbol]#

Parameters to this flowgraph

property exports: frozenset[Symbol]#

Symbols exported from this flowgraph

property effects: frozenset[Store | Reduce]#

Side effects of this flowgraph

subs(substitutions, **kwargs)#

Create a new flowgraph from this one by performing the given substitutions.

This method acts as the SymPy subs method, with the difference that symbol substitutions of the kind symbol -> expr are only applied if symbol is a free symbol of the flowgraph.

See the subs method of sp.Basic for details.

Return type:

Flowgraph

Parameters:

substitutions (Mapping[Basic, Basic])