pm4py.algo.conformance.dcr.decorators package#

Submodules#

pm4py.algo.conformance.dcr.decorators.decorator module#

class pm4py.algo.conformance.dcr.decorators.decorator.Checker[source]#

Bases: ABC

An interface for Checker implementations and related decorators.

This abstract base class defines the fundamental checker methods that must be implemented by concrete checker classes. These methods are aimed at evaluating various conformance rules within a DCR graph.

Methods#

enabled_checker(act, G, deviations, parameters=None):

Abstract method to check rules when an activity is enabled.

all_checker(act, event, G, deviations, parameters=None):

Abstract method to check rules for all types of activities.

accepting_checker(G, responses, deviations, parameters=None):

Abstract method to check for rules requiring an accepting state.

The checker class provides the methods that must be inherited by the decorators. The checker class instantiates the conformance checker methods that will be overwritten to perform the determine possible deviations. currently supports:

  • For the standard base DCR graph, enabled_checker() and accepting_checker() methods are used

  • For a DCR Graph with distributed, the all_checker() methods was derived to give a means for checking deviating role assignment

Methods#

enabled_Checker(event, graph, deviations, parameters):

method to determine deviations of non enabled events, i.e events that are not allowed to execute

all_checker(event, event_attributes, graph, deviations, parameters):

method to determine deviations of event for each execution

accepting_checker(graph, responses, deviations, parameters):

method to determine deviations that caused DCR graph to be in a non-accepting state.

abstract enabled_checker(event: str, graph: DcrGraph, deviations: List[Any], parameters: Dict[str | Any, Any] | None = None) None[source]#
abstract all_checker(event: str, event_attributes: dict, graph: DcrGraph, deviations: List[Any], parameters: Dict[str | Any, Any] | None = None) None[source]#
abstract accepting_checker(graph: DcrGraph, responses: List[Tuple[str, str]], deviations: List[Any], parameters: Dict[str | Any, Any] | None = None) None[source]#
class pm4py.algo.conformance.dcr.decorators.decorator.ConcreteChecker[source]#

Bases: Checker

The ConcreteChecker class, provides the base for the functionality that the checker should provide.

Contains all the methods needed to perform conformance checking for a base DCR Graph

Methods#

enabled_Checker(act, G, deviations, parameters):

Determine the deviation that caused it not to be enabled

all_checker(act, event, G, deviations, parameters):

Checks for nothing as no rule for a base DCR graph has rules that would be required to determine with every execution of an event

accepting_checker(G, responses, deviations, parameters):

determine the deviation that caused the DCR graph to be non-accepting after an execution of a trace

enabled_checker(event: str, graph: DcrGraph, deviations: List[Any], parameters: Dict[str | Any, Any] | None = None) None[source]#

enabled_checker() is called when an event that is to be executed is not enabled Check all the deviations that could be associated with a not enabled event for a base DCR Graph

Parameters#

event: str

the executed event

graph: DcrGraph

DCR Graph

deviations: List[Any]

the list of deviations

parameters: Optional[Dict[Union[str, Any], Any]]

optional parameters

all_checker(event: str, event_attributes: dict, graph: DcrGraph, deviations: List[Any], parameters: Dict[str | Any, Any] | None = None) None[source]#
accepting_checker(graph: DcrGraph, responses: List[Tuple[str, str]], deviations: List[Any], parameters: Dict[str | Any, Any] | None = None) None[source]#

accepting_checker is called when a DCR graph is not accepting after an execution of a trace checks all response deviations for a base DCR Graph

Parameters#

graph: DcrGraph

DCR Graph

responses: List[Tuple[str, str]]

list of response constraint not fulfilled

deviations: List[Any]

the list of deviations

parameters: Optional[Dict[Union[str, Any], Any]]

Optional, parameter containing keys used

class pm4py.algo.conformance.dcr.decorators.decorator.Decorator(checker: Checker)[source]#

Bases: Checker

A decorator for Checker objects, providing a flexible mechanism to enhance or modify their behavior.

This class implements the decorator pattern to wrap a Checker object. It overrides the Checker interface methods and can add additional functionality before or after invoking these methods on the wrapped Checker instance.

Inherits From#

Checker : The abstract base class for checker implementations.

Attributes#

self._checkerChecker

The internal Checker instance that is being decorated.

Methods#

enabled_checker(act, G, deviations, parameters=None):

Invokes the enabled_checker method on the decorated Checker instance, potentially adding extra behavior.

all_checker(act, event, G, deviations, parameters=None):

Invokes the all_checker method on the decorated Checker instance, potentially adding extra behavior.

accepting_checker(G, trace, deviations, parameters=None):

Invokes the accepting_checker method on the decorated Checker instance, potentially adding extra behavior.

enabled_checker(event: str, graph: DcrGraph, deviations: List[Any], parameters: Dict[str | Any, Any] | None = None) None[source]#

This method calls enabled_checker() of the underlying class to continue search for cause of deviation between Graph and event Log

Parameters#

event: str

Current event ID in trace

graph: DcrGraph

DCR Graph

deviations: List[Any]

List of deviations

parameters: Optional[Dict[Union[str, Any], Any]]

optional parameters

all_checker(event: str, event_attributes: dict, graph: DcrGraph, deviations: List[Any], parameters: Dict[str | Any, Any] | None = None) None[source]#

This method calls all_checker() of the underlying class to continue search for cause of deviation between Graph and event Log

Parameters#

event: str

Current event ID in trace

event_attributes: dict

Current event with all attributes

graph: DcrGraph

DCR Graph

deviations: List[Any]

List of deviations

parameters: Optional[Dict[Union[str, Any], Any]]

optional parameters

accepting_checker(graph: DcrGraph, responses: List[Tuple[str, str]], deviations: List[Any], parameters: Dict[str | Any, Any] | None = None) None[source]#

This method calls accepting_checker() of the underlying class to continue search for cause of deviation between Graph and event Log

Parameters#

graph: DcrGraph

DCR Graph

responses: List[Tuple[str, str]]

The recorded response relation between events to be executed and it originator

deviations: List[Any]

List of deviations

parameters: Optional[Dict[Union[str, Any], Any]]

optional parameters

pm4py.algo.conformance.dcr.decorators.roledecorator module#

class pm4py.algo.conformance.dcr.decorators.roledecorator.Parameters(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: Enum

GROUP_KEY = 'pm4py:param:group_key'#
class pm4py.algo.conformance.dcr.decorators.roledecorator.RoleDecorator(checker: Checker)[source]#

Bases: Decorator

The RoleDecorator Class is used to provide methods for checking deviations of distributed. It will call a method to check if the current event is executed by an entity that has authority to perform the activity the event represents.

Methods#

enabled_checker(event, graph, deviations, parameters=None)

this method will call the underlying class used to check for deviations

all_checker(event, event_attributes, graph, deviations, parameters=None)

This method will determine if deviations occurs due to violation of role assignments

enabled_checker(e, G, deviations, parameters=None)

this method will call the underlying class used to check for deviations

enabled_checker(event: str, graph: DistributedDcrGraph | DcrGraph, deviations: List[Tuple[str, Any]], parameters: Dict[str | Any, Any] | None = None) None[source]#

This method calls enabled_checker() of the underlying class to continue search for cause of deviation between Graph and event Log

Parameters#

event: str

Current event ID in trace

graph: DcrGraph

DCR Graph

deviations: List[Any]

List of deviations

parameters: Optional[Dict[Union[str, Any], Any]]

optional parameters

all_checker(event: str, event_attributes: dict, graph: DistributedDcrGraph | DcrGraph, deviations: List[Tuple[str, Any]], parameters: Dict[str | Any, Any] | None = None) None[source]#

This method calls all_checker() of the underlying class to continue search for cause of deviation between Graph and event Log

Parameters#

event: str

Current event ID in trace

event_attributes: dict

Current event with all attributes

graph: DcrGraph

DCR Graph

deviations: List[Any]

List of deviations

parameters: Optional[Dict[Union[str, Any], Any]]

optional parameters

accepting_checker(graph: DistributedDcrGraph | DcrGraph, responses: List[Tuple[str, str]], deviations: List[Tuple[str, Any]], parameters: Dict[str | Any, Any] | None = None) None[source]#

This method calls accepting_checker() of the underlying class to continue search for cause of deviation between Graph and event Log

Parameters#

graph: DcrGraph

DCR Graph

responses: List[Tuple[str, str]]

The recorded response relation between events to be executed and it originator

deviations: List[Any]

List of deviations

parameters: Optional[Dict[Union[str, Any], Any]]

optional parameters

Module contents#