cana.function_generation.other module

General / non-structured Boolean function generators.

These typically return dense BitLut tables rather than expression strings.

cana.function_generation.other.random_automata_table(indegree, bias, bias_constraint='soft')[source]

Return a random Boolean lookup table as a BitLut.

Parameters:
  • indegree (int) – Number of inputs (LUT has 2**indegree rows).

  • bias (float) – Probability of a 1 under soft / soft_no_constant, or the target fraction of ones under hard.

  • bias_constraint ({"soft", "hard", "soft_no_constant"}) – Sampling regime for the output column.