pm4py.evaluation.soundness.woflan package

Submodules

pm4py.evaluation.soundness.woflan.algorithm module

class pm4py.evaluation.soundness.woflan.algorithm.Outputs(value)[source]

Bases: enum.Enum

An enumeration.

DEAD_TASKS = 'dead_tasks'
LEFT = 'left'
LOCKING_SCENARIOS = 'locking_scenarios'
MCG = 'mcg'
NOT_WELL_HANDLED_PAIRS = 'not_well_handled_pairs'
PLACE_INVARIANTS = 'place_invariants'
RESTRICTED_COVERABILITY_TREE = 'restricted_coverability_tree'
R_G = 'r_g'
R_G_S_C = 'r_g_s_c'
S_COMPONENTS = 's_components'
S_C_NET = 's_c_net'
UNCOVERED_PLACES_S_COMPONENT = 'uncovered_places_s_component'
UNCOVERED_PLACES_UNIFORM = 'uncovered_places_uniform'
UNCOVERED_PLACES_WEIGHTED = 'uncovered_places_weighted'
UNIFORM_PLACE_INVARIANTS = 'uniform_place_invariants'
WEIGHTED_PLACE_INVARIANTS = 'weighted_place_invariants'
class pm4py.evaluation.soundness.woflan.algorithm.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

PRINT_DIAGNOSTICS = 'print_diagnostics'
RETURN_ASAP_WHEN_NOT_SOUND = 'return_asap_when_not_sound'
RETURN_DIAGNOSTICS = 'return_diagnostics'
pm4py.evaluation.soundness.woflan.algorithm.apply(net, i_m, f_m, parameters=None)[source]

Apply the Woflan Soundness check. Trough this process, different steps are executed. :param net: Petri Net representation of PM4Py :param i_m: initial marking of given Net. Marking object of PM4Py :param f_m: final marking of given Net. Marking object of PM4Py :return: True, if net is sound; False otherwise.

Deprecated since version 2.2.2: This will be removed in 3.0.0. deprecated version of WOFLAN; use pm4py.algo.analysis.woflan

pm4py.evaluation.soundness.woflan.algorithm.compute_non_live_sequences(woflan_object)[source]

We want to compute the sequences of transitions which lead to deadlocks. To do this, we first compute a reachbility graph (possible, since we know that the Petri Net is bounded) and then we convert it to a spanning tree. Afterwards, we compute the paths which lead to nodes from which the final marking cannot be reached. Note: We are searching for the shortest sequence. After the first red node, all successors are also red. Therefore, we do not have to consider them. :param woflan_object: Object that contains the necessary information :return: List of sequence of transitions, each sequence is a list

pm4py.evaluation.soundness.woflan.algorithm.compute_unbounded_sequences(woflan_object)[source]

We compute the sequences which lead to an infinite amount of tokens. To do this, we compute a restricted coverability tree. The tree works similar to the graph, despite we consider tree characteristics during the construction. :param woflan_object: Woflan object that contains all needed information. :return: List of unbounded sequences, each sequence is a list of transitions

pm4py.evaluation.soundness.woflan.algorithm.short_circuit_petri_net(net, print_diagnostics=False)[source]

Fist, sink and source place are identified. Then, a transition from source to sink is added to short-circuited the given petri net. If there is no unique source and sink place, an error gets returned :param net: Petri net that is going to be short circuited :return:

pm4py.evaluation.soundness.woflan.algorithm.step_1(woflan_object, return_asap_when_unsound=False)[source]

In the first step, we check if the input is given correct. We check if net is an PM4Py Petri Net representation and if the exist a correct entry for the initial and final marking. :param woflan_object: Object that contains all necessary information :return: Proceed with step 2 if ok; else False

pm4py.evaluation.soundness.woflan.algorithm.step_10(woflan_object, return_asap_when_unsound=False)[source]
pm4py.evaluation.soundness.woflan.algorithm.step_11(woflan_object, return_asap_when_unsound=False)[source]
pm4py.evaluation.soundness.woflan.algorithm.step_12(woflan_object, return_asap_when_unsound=False)[source]
pm4py.evaluation.soundness.woflan.algorithm.step_13(woflan_object, return_asap_when_unsound=False)[source]
pm4py.evaluation.soundness.woflan.algorithm.step_2(woflan_object, return_asap_when_unsound=False)[source]

This method checks if a given Petri net is a workflow net. First, the Petri Net gets short-circuited (connect start and end place with a tau-transition. Second, the Petri Net gets converted into a networkx graph. Finally, it is tested if the resulting graph is a strongly connected component. :param woflan_object: Woflan objet containing all information :return: Bool=True if net is a WF-Net

pm4py.evaluation.soundness.woflan.algorithm.step_3(woflan_object, return_asap_when_unsound=False)[source]
pm4py.evaluation.soundness.woflan.algorithm.step_4(woflan_object, return_asap_when_unsound=False)[source]
pm4py.evaluation.soundness.woflan.algorithm.step_5(woflan_object, return_asap_when_unsound=False)[source]
pm4py.evaluation.soundness.woflan.algorithm.step_6(woflan_object, return_asap_when_unsound=False)[source]
pm4py.evaluation.soundness.woflan.algorithm.step_7(woflan_object, return_asap_when_unsound=False)[source]
pm4py.evaluation.soundness.woflan.algorithm.step_8(woflan_object, return_asap_when_unsound=False)[source]
pm4py.evaluation.soundness.woflan.algorithm.step_9(woflan_object, return_asap_when_unsound=False)[source]
class pm4py.evaluation.soundness.woflan.algorithm.woflan(net, initial_marking, final_marking, print_diagnostics=False)[source]

Bases: object

get_dead_tasks()[source]
get_final_marking()[source]
get_initial_marking()[source]
get_left()[source]
get_locking_scenarios()[source]
get_mcg()[source]
get_net()[source]
get_not_well_handled_pairs()[source]
get_output()[source]

Returns a dictionary representation of the entities that are calculated during WOFLAN

get_place_invariants()[source]
get_r_g()[source]
get_r_g_s_c()[source]
get_restricted_coverability_tree()[source]
get_s_c_net()[source]
get_s_components()[source]
get_uncovered_places_s_component()[source]
get_uncovered_places_uniform()[source]
get_uncovered_places_weighted()[source]
get_uniform_place_invariants()[source]
get_weighted_place_invariants()[source]
set_dead_tasks(dead_tasks)[source]
set_left(left)[source]
set_locking_scenarios(scenarios)[source]
set_mcg(mcg)[source]
set_not_well_handled_pairs(not_well_handled_pairs)[source]
set_place_invariants(invariants)[source]
set_r_g(r_g)[source]
set_r_g_s_c(r_g)[source]
set_restricted_coverability_tree(graph)[source]
set_s_c_net(s_c_net)[source]
set_s_components(s_components)[source]
set_uncovered_places_s_component(uncovered_places)[source]
set_uncovered_places_uniform(places)[source]
set_uncovered_places_weighted(places)[source]
set_uniform_place_invariants(invariants)[source]
set_weighted_place_invariants(invariants)[source]

Module contents