Package pyxb :: Package utils :: Module fac :: Class MultiConfiguration
[hide private]
[frames] | no frames]

Class MultiConfiguration

source code

       object --+    
                |    
Configuration_ABC --+
                    |
                   MultiConfiguration

Support parallel execution of state machine.

This holds a set of configurations, and executes each transition on each one. Configurations which fail to accept a step are silently dropped; only if this results in no remaining configurations will UnrecognizedSymbolError be raised. If a step admits multiple valid transitions, a configuration is added for each one.

See pyxb.binding.content.AutomatonConfiguration for an alternative solution which holds actions associated with the transition until the non-determinism is resolved.

Instance Methods [hide private]
 
__init__(self, configuration)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
acceptableSymbols(self)
Return the acceptable Symbols given the current configuration.
source code
 
step(self, symbol)
Execute an automaton transition using the given symbol.
source code
 
acceptingConfigurations(self)
Return the set of configurations that are in an accepting state.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  __configurations = None
hash(x)
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, configuration)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

acceptableSymbols(self)

source code 

Return the acceptable Symbols given the current configuration.

This method extracts the symbol from all candidate transitions that are permitted based on the current counter values. Because transitions are presented in a preferred order, the symbols are as well.

Overrides: Configuration_ABC.acceptableSymbols
(inherited documentation)

step(self, symbol)

source code 

Execute an automaton transition using the given symbol.

Parameters:
Returns:
The new configuration resulting from the step.
Raises:
Overrides: Configuration_ABC.step
(inherited documentation)

acceptingConfigurations(self)

source code 

Return the set of configurations that are in an accepting state.

Note that some of the configurations may be within a sub-automaton; their presence in the return value is because the root configuration is also accepting.