Skip to content

aggregate

Module to remove head aggregates.

HeadAggregateNormalizer

Bases: Transformer

Normalize head aggregates into choices and constraint.

E.g. lower <= #count{ t : l : L } <= upper :- body. is turned into: 1. { l : L } :- body. and 2. :- body, not lower <= #count{ t : l, L } <= upper.

visit_Rule(node: AST) -> AST | list[AST]

Transform rules with head aggregates.