Skip to content

Instance Assignment

Leon Starr edited this page Jul 10, 2025 · 20 revisions

We split the assigment statement on the assignment operator (.= or ..= in Scrall) to obtain the left and right hand sides (lhs, rhs)

We also note the cardinality of the assignment as one or many instances assigned.

Next we create a Flow_ap named tuple for the executing instance flow.

Now we need to be careful here, because an assigner does not have an executing instance. So the xi_instance_flow is None in the case of an assigner Activity.

Now we process the rhs of our statement which, in the case of an instance assignment, will always be an instance set.

We careate an instance of Instance Set which sets some initial self attributes and then we process.

(These are split out since we need some return values from process)

Instance Set.process(...)

The self.component flow attribute represents the current input to our data flow in process. This is either the executing instance or, if this is an assigner, it is None.

The first action we parse out is a special case, so we use a boolean first_action initially set to True

Now we iterate through the components of the iset parse.

Clone this wiki locally