qat.experimental.dialect.results.ir.attributes module

Models the attributes in the results dialect.

This includes attributes that model post-selection predicates.

class IntegerStatePredicateAttr(key, disallowed_values)

Bases: IntegerStatePredicateAttr

Models a predicate for post selecting results based on an integer state.

This attribute is used to filter results based on a specific integer state value. It is described by a key and a list of disallowed integer values. The key refers to the entry in a record.

Variables:
  • key – The key of the entry in the record that post-selection is performed on.

  • disallowed_values – The list of values that are disallowed and will result in the record being post-selected out of the results collection.

Initializes the IntegerStatePredicateAttr with the given key and disallowed values.

Parameters:
  • key (str | StringAttr) – The key of the entry in the record that post-selection is performed on.

  • disallowed_values (Iterable[int | IntAttr] | ArrayAttr[IntAttr]) – The list of values that are disallowed and will result in the record being post-selected out of the results collection.

disallowed_values: ArrayAttr[IntAttr]
classmethod get_irdl_definition()

Get the IRDL attribute definition.

key: StringAttr
name: ClassVar[str] = 'results.integer_state_predicate'

The attribute name should be a static field in the attribute classes.

class PostSelectPredicateAttr(*parameters)

Bases: ParametrizedAttribute, ABC

Models a predicate for post selecting results.

Eventually, this class could be extended to provide a lowering hook.

name: ClassVar[str] = 'results.post_select_predicate'

The attribute name should be a static field in the attribute classes.