Python

ProgramCounts

ProgramCounts class and public members in the unified Python API.

Class: ProgramCounts

Python · dataclassSince v0.16.0
ProgramCountsfrozen=True
Immutable compiled counts for one selected policy, returned by Ruleset.program_counts().
Creation and access

Internal constructor — do not call. Snapshot returned by Ruleset.program_counts; direct construction does not describe a compiled program.

Fields
predicatesintproperty
Declarations in the domain registry, including unused predicates.
factsintproperty
Facts compiled from policy source, excluding runtime EDB facts.
rulesintproperty
Normalized rules, including expanded OR alternatives.
Example
print(ruleset.program_counts())
ProgramCounts(predicates=4, facts=0, rules=1)

Usage guides