pyirk.consistency_checking

pyirk module for consistency checking.

Module Contents

Classes

IrkConsistencyError

IrkTypeError

WrongArgNumber

WrongArgType

Functions

check

check_applied_operator

check_type

:param actual_type: core.Item :param secondary_class_items: List[core.Item] :param expected_type: core.Item;

get_error_location

get_expected_arg_types

enable_consistency_checking

apply_constraint_rules_to_entity

Basic idea: every module should formulate its own constraint rules (as part of the graph).

API

class pyirk.consistency_checking.IrkConsistencyError

Bases: pyirk.core.aux.GeneralPyIRKError

class pyirk.consistency_checking.IrkTypeError

Bases: pyirk.consistency_checking.IrkConsistencyError

class pyirk.consistency_checking.WrongArgNumber

Bases: pyirk.consistency_checking.IrkTypeError

class pyirk.consistency_checking.WrongArgType

Bases: pyirk.consistency_checking.IrkTypeError

pyirk.consistency_checking.check(itm: pyirk.core.Item)
pyirk.consistency_checking.check_applied_operator(itm: pyirk.core.Item)
pyirk.consistency_checking.check_type(actual_type, secondary_class_items, expected_type, raise_exception=True) bool

:param actual_type: core.Item :param secondary_class_items: List[core.Item] :param expected_type: core.Item;

pyirk.consistency_checking.get_error_location()
pyirk.consistency_checking.get_expected_arg_types(itm: pyirk.core.Item) Tuple[pyirk.core.Item]
pyirk.consistency_checking.enable_consistency_checking()
pyirk.consistency_checking.apply_constraint_rules_to_entity(entity: pyirk.builtin_entities.Entity)

Basic idea: every module should formulate its own constraint rules (as part of the graph).

These rules are (indirect) instances I41[“semantic rule”]. If they apply, they result in a ConstraintViolationStatement.