4. Class PBConfig

4.1. Constructor

PBConfig()

An instance of a PBConfig class contains the configuration for all options in PBLib. The following is its default setting:

>>> from pypblib import pblib
>>> c = pblib.PBConfig()
>>> c
PBConfig:
========
PB_Encoder = BEST
AMK_Encoder = BEST
AMO_Encoder = BEST
BIMANDER_M_IS = N_HALF
bimander = 3
k product min lit cnt for splitting = 10
K product k = 2
Commander encoding k = 3
Max clause per constraint = 1000000
Use formula cache = FALSE
Print used encoding = FALSE
Check for duplicate literals = FALSE
Use gac Binary Merge = FALSE
Binary merge no support for single bits = TRUE
Use recursive BDD test = FALSE
Use real robdds = TRUE
Use watch dog encoding in Binary Merger = FALSE

4.3. Methods details

set_PB_Encoder(pb_encoder)

Sets the PB_Encoder configuration. By default: pypblib.pblib.PB_BEST

>>> from pypblib import pblib
>>> config = pblib.PBConfig()
>>> config.set_PB_Encoder(pblib.PB_BDD)
set_AMK_Encoder(amk_encoder)

Sets the AMK_Encoder configuration. By default: pypblib.pblib.AMK_BEST

>>> from pypblib import pblib
>>> config = pblib.PBConfig()
>>> config.set_AMK_Encoder(pblib.AMK_CARD)
set_AMO_Encoder(amo_encoder)

Sets the AMO_Encoder configuration. By default: pypblib.pblib.AMO_BEST

>>> from pypblib import pblib
>>> config = pblib.PBConfig()
>>> config.set_AMO_Encoder(pblib.AMO_NESTED)
set_Bimander(bimander_encode)

Sets the BIMANDER_M_IS configuration. By default: pypblib.pblib.N_HALF

>>> from pypblib import pblib
>>> config = pblib.PBConfig()
>>> config.set_Bimander(pblib.FIXED)
set_bimander_m(m: int)

Sets bimander m. Defalut value is 3.

>>> from pypblib import pblib
>>> config = pblib.PBConfig()
>>> config.set_bimander_m(5)
set_k_product_minimum_lit_count_for_splitting(nim_lits: int)

Sets k-product minimum literals for splitting. Default value is 10.

>>> from pypblib import pblib
>>> config = pblib.PBConfig()
>>> config.set_k_product_minimum_lit_count_for_splitting(12)
set_k_product_k(k: int)

Sets the k value for k-product. Default value is 2.

>>> from pypblib import pblib
>>> config = pblib.PBConfig()
>>> config.set_kproduct_k(4)
set_commander_encoding_k(k: int)

Sets the k value of commander encoding. Default value is 3.

>>> from pypblib import pblib
>>> config = pblib.PBConfig()
>>> config.set_commander_encoding_k(5)
set_max_clause_per_constraint(max: int)

Sets the maximum number of clauses per constraint. Default value is 1000000.

>>> from pypblib import pblib
>>> config = pblib.PBConfig()
>>> config.set_max_clause_per_constraint(2000000)
set_use_formula_cache(use: bool)

Sets the use of formula cache. False by default.

>>> from pypblib import pblib
>>> config = pblib.PBConfig()
>>> config.set_use_formula_cache(True)
check_for_dup_literals(check: bool)

Sets the check for duplicated literals. False by default.

>>> from pypblib import pblib
>>> config = pblib.PBConfig()
>>> config.check_for_dup_literals(True)
use_gac_binary_merge(use: bool)

Sets the use of GAC (generalized arc-consistent). False by default.

>>> from pypblib import pblib
>>> config = pblib.PBConfig()
>>> config.use_gac_binary_merge(True)
binary_merge_no_support_for_single_bits(support: bool)

True by default.

>>> from pypblib import pblib
>>> config = pblib.PBConfig()
>>> config.binary_merge_no_support_for_single_bits(False)
use_recursive_BDD_test(use: bool)

False by default.

>>> from pypblib import pblib
>>> config = pblib.PBConfig()
>>> config.use_recursive_BDD_test(True)
use_real_robdds(use: bool)

True by default.

>>> from pypblib import pblib
>>> config = pblib.PBConfig()
>>> config.use_real_robdds(False)
use_watch_dog_encoding_in_binary_merger(use: bool)

False by default.

>>> from pypblib import pblib
>>> config = pblib.PBConfig()
>>> config.use_watch_dog_encoding_in_binary_merger(True)