spreadflow_core.dsl.parser module¶
Parser steps used in the domain-specific language for building up flowmaps.
-
class
spreadflow_core.dsl.parser.AliasParser¶ Bases:
spreadflow_core.dsl.stream.StreamBranchBuilds an alias map from stream of operations.
-
get_aliasmap()¶ Returns a map alias -> element
-
predicate(operation)¶
-
-
class
spreadflow_core.dsl.parser.AliasResolverPass¶ Bases:
object-
alias_parser= <spreadflow_core.dsl.parser.AliasParser object>¶
-
connection_parser= <spreadflow_core.dsl.parser.ConnectionParser object>¶
-
default_ins_parser= <spreadflow_core.dsl.parser.DefaultInputParser object>¶
-
default_outs_parser= <spreadflow_core.dsl.parser.DefaultOutputParser object>¶
-
-
class
spreadflow_core.dsl.parser.ComponentParser¶ Bases:
spreadflow_core.dsl.stream.StreamBranchExtracts exactly one component from a stream of operations.
-
get_component()¶ Returns the component.
-
predicate(operation)¶
-
-
class
spreadflow_core.dsl.parser.ComponentsPurgePass¶ Bases:
object-
connection_parser= <spreadflow_core.dsl.parser.ConnectionParser object>¶
-
parent_parser= <spreadflow_core.dsl.parser.ParentParser object>¶
-
-
class
spreadflow_core.dsl.parser.ConnectionParser¶ Bases:
spreadflow_core.dsl.stream.StreamBranchExtracts information about connected ports from a stream of operations.
-
get_links()¶ Returns an iterator over output, input pairs
-
get_portmap()¶ Returns a map output -> input
-
get_portset()¶ Returns a set containing all ports.
-
predicate(operation)¶
-
-
class
spreadflow_core.dsl.parser.DefaultInputParser¶ Bases:
spreadflow_core.dsl.stream.StreamBranchBuilds map of default inputs from a stream of operations.
-
get_portmap()¶ Returns a map element -> port
-
predicate(operation)¶
-
-
class
spreadflow_core.dsl.parser.DefaultOutputParser¶ Bases:
spreadflow_core.dsl.stream.StreamBranchBuilds map of default outputs from a stream of operations.
-
get_portmap()¶ Returns a map element -> port
-
predicate(operation)¶
-
-
class
spreadflow_core.dsl.parser.DescriptionParser¶ Bases:
spreadflow_core.dsl.stream.StreamBranchBuilds map of descriptions from a stream of operations.
-
get_descriptionmap()¶ Returns a map element -> description
-
predicate(operation)¶
-
-
class
spreadflow_core.dsl.parser.EventHandlerParser¶ Bases:
spreadflow_core.dsl.stream.StreamBranchExtracts a list of event handlers from a stream of operations.
-
get_handlers()¶ Returns an iterator over event handler tokens.
-
predicate(operation)¶
-
-
class
spreadflow_core.dsl.parser.EventHandlersPass¶ Bases:
object-
connection_parser= <spreadflow_core.dsl.parser.ConnectionParser object>¶
-
parent_parser= <spreadflow_core.dsl.parser.ParentParser object>¶
-
-
class
spreadflow_core.dsl.parser.LabelParser¶ Bases:
spreadflow_core.dsl.stream.StreamBranchBuilds map of labels from a stream of operations.
-
get_labelmap()¶ Returns a map element -> label
-
predicate(operation)¶
-
-
class
spreadflow_core.dsl.parser.ParentParser¶ Bases:
spreadflow_core.dsl.stream.StreamBranchExtracts information about component hierarchy from a stream of operations.
-
get_nodeset()¶ Returns a set containing all elements.
-
get_parentmap()¶ Returns a map element -> parent.
-
get_parentmap_toposort(reverse=False)¶ Returns an iterator in topological order over element, parent pairs.
-
predicate(operation)¶
-
-
exception
spreadflow_core.dsl.parser.ParserError¶ Bases:
exceptions.Exception
-
class
spreadflow_core.dsl.parser.PartitionBounds(outs, ins)¶ Bases:
tuple-
__getnewargs__()¶ Return self as a plain tuple. Used by copy and pickle.
-
__getstate__()¶ Exclude the OrderedDict from pickling
-
__repr__()¶ Return a nicely formatted representation string
-
ins¶ Alias for field number 1
-
outs¶ Alias for field number 0
-
-
class
spreadflow_core.dsl.parser.PartitionBoundsParser¶ Bases:
spreadflow_core.dsl.stream.StreamBranchBuilds map of partition bounds from a stream of operations.
-
get_partition_bounds()¶ Returns a map partition name -> bounds
-
predicate(operation)¶
-
-
class
spreadflow_core.dsl.parser.PartitionBoundsPass¶ Bases:
object-
connection_parser= <spreadflow_core.dsl.parser.ConnectionParser object>¶
-
partition_parser= <spreadflow_core.dsl.parser.PartitionParser object>¶
-
-
class
spreadflow_core.dsl.parser.PartitionControllersPass¶ Bases:
object-
connection_parser= <spreadflow_core.dsl.parser.ConnectionParser object>¶
-
partition_bounds_parser= <spreadflow_core.dsl.parser.PartitionBoundsParser object>¶
-
partition_parser= <spreadflow_core.dsl.parser.PartitionParser object>¶
-
-
class
spreadflow_core.dsl.parser.PartitionExpanderPass¶ Bases:
objectPropagate the partition of assigned to components to its ports.
-
parent_parser= <spreadflow_core.dsl.parser.ParentParser object>¶
-
partition_parser= <spreadflow_core.dsl.parser.PartitionParser object>¶
-
-
class
spreadflow_core.dsl.parser.PartitionParser¶ Bases:
spreadflow_core.dsl.stream.StreamBranchBuilds map of partitions from a stream of operations.
-
get_partitionmap()¶ Returns a map element -> partition name
-
predicate(operation)¶
-
-
class
spreadflow_core.dsl.parser.PartitionSelectParser¶ Bases:
spreadflow_core.dsl.stream.StreamBranchExtracts the selected partition from a stream of operations.
-
get_selected_partition()¶ Returns the name of the selected partition.
-
predicate(operation)¶
-
-
class
spreadflow_core.dsl.parser.PartitionWorkerPass¶ Bases:
object-
connection_parser= <spreadflow_core.dsl.parser.ConnectionParser object>¶
-
partition_bounds_parser= <spreadflow_core.dsl.parser.PartitionBoundsParser object>¶
-
partition_parser= <spreadflow_core.dsl.parser.PartitionParser object>¶
-
partition_select_parser= <spreadflow_core.dsl.parser.PartitionSelectParser object>¶
-