boofun.core.representations.registry

Functions

get_strategy(rep_key)

Retrieve and instantiate the strategy class for the given representation key.

register_partial_strategy(key, *, evaluate)

Register a strategy by supplying only the key methods.

register_strategy(key)

Decorator to register representation classes

boofun.core.representations.registry.get_strategy(rep_key: str) BooleanFunctionRepresentation[source]

Retrieve and instantiate the strategy class for the given representation key.

Parameters:

rep_key – Representation key (e.g., ‘truth_table’)

Returns:

Instance of the strategy class

Raises:

KeyError – If no strategy is registered for the key

boofun.core.representations.registry.register_strategy(key: str)[source]

Decorator to register representation classes

boofun.core.representations.registry.register_partial_strategy(key: str, *, evaluate: Callable, dump: Callable = None, convert_from: Callable = None, convert_to: Callable = None, create_empty: Callable = None, is_complete: Callable = None, get_storage_requirements: Callable = None, time_complexity_rank: Callable = None)[source]

Register a strategy by supplying only the key methods. Missing methods raise NotImplementedError by default.