specless.automaton.fdfa.FDFABuilder

class specless.automaton.fdfa.FDFABuilder[source]

Bases: Builder

Implements the generic automaton builder class for FDFA objects

Methods

load_YAML_config_data

reads in the object configuration parameters from a YAML config file

__call__(graph_data: str, number_input_symbols: int | None = None, graph_data_format: str = 'dot_string') FDFA[source]

Returns an initialized FDFA instance given the graph_data

graph_data and graph_data_format must match

Parameters:
  • graph_data – The string containing graph data. Could be a filename or just the raw data

  • number_input_symbols – The number of input symbols to the FDFA needed to compute the correct frequency flows in the case of cycles. Only really optional when using a graph_data_format that already has this information.

  • graph_data_format – The graph data file format. {‘dot_file’, ‘dot_string’, ‘learning_interface’}

Returns:

instance of an initialized FDFA object

Raises:
  • ValueError – checks if graph_data and graph_data_format have a compatible data loader.

  • ValueError – checks, based on graph_data_format, whether it is legal to not specify the number_input_symbols.

static load_YAML_config_data(config_file_name: str) dict

reads in the object configuration parameters from a YAML config file

Parameters:

config_file_name ((filepath) string) – The YAML configuration file name

Returns:

configuration data dictionary for the simulation

Return type:

dict