Generated by Cython 3.1.2
Yellow lines hint at Python interaction.
Click on a line that starts with a "+" to see the C code that Cython generated for it.
Raw output: covering_inclusive_choice.cpp
+001: '''
__pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
002: This file is part of Prolothar-Process-Discovery (More Info: https://github.com/shs-it/prolothar-process-discovery).
003:
004: Prolothar-Process-Discovery is free software: you can redistribute it and/or modify
005: it under the terms of the GNU General Public License as published by
006: the Free Software Foundation, either version 3 of the License, or
007: (at your option) any later version.
008:
009: Prolothar-Process-Discovery is distributed in the hope that it will be useful,
010: but WITHOUT ANY WARRANTY; without even the implied warranty of
011: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
012: GNU General Public License for more details.
013:
014: You should have received a copy of the GNU General Public License
015: along with Prolothar-Process-Discovery. If not, see <https://www.gnu.org/licenses/>.
016: '''
017: from prolothar_common.models.eventlog.trace cimport Trace
+018: from prolothar_process_discovery.discovery.proseqo.pattern.pattern import Pattern
__pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_Pattern); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc_2, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Pattern); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Pattern, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
019: from prolothar_process_discovery.discovery.proseqo.covering_pattern.covering_pattern cimport CoveringPattern
020: from prolothar_process_discovery.discovery.proseqo.cover cimport Cover
021:
+022: cdef class CoveringInclusiveChoice(CoveringPattern):
struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice {
struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern __pyx_base;
struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *(*_CoveringInclusiveChoice__find_matching_subpattern)(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *, PyObject *);
};
static struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *__pyx_vtabptr_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice;
023:
+024: def __init__(self, choice: Pattern, trace, last_covered_activity: str):
/* Python wrapper */
static int __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_choice = 0;
PyObject *__pyx_v_trace = 0;
PyObject *__pyx_v_last_covered_activity = 0;
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
#if CYTHON_ASSUME_SAFE_SIZE
__pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
#else
__pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
#endif
__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
{
PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_choice,&__pyx_mstate_global->__pyx_n_u_trace,&__pyx_mstate_global->__pyx_n_u_last_covered_activity,0};
PyObject* values[3] = {0,0,0};
const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 24, __pyx_L3_error)
if (__pyx_kwds_len > 0) {
switch (__pyx_nargs) {
case 3:
values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 24, __pyx_L3_error)
CYTHON_FALLTHROUGH;
case 2:
values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 24, __pyx_L3_error)
CYTHON_FALLTHROUGH;
case 1:
values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 24, __pyx_L3_error)
CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
const Py_ssize_t kwd_pos_args = __pyx_nargs;
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 24, __pyx_L3_error)
for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 24, __pyx_L3_error) }
}
} else if (unlikely(__pyx_nargs != 3)) {
goto __pyx_L5_argtuple_error;
} else {
values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 24, __pyx_L3_error)
values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 24, __pyx_L3_error)
values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 24, __pyx_L3_error)
}
__pyx_v_choice = values[0];
__pyx_v_trace = values[1];
__pyx_v_last_covered_activity = ((PyObject*)values[2]);
}
goto __pyx_L6_skip;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 24, __pyx_L3_error)
__pyx_L6_skip:;
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
Py_XDECREF(values[__pyx_temp]);
}
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.covering_pattern.covering_inclusive_choice.CoveringInclusiveChoice.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_last_covered_activity), (&PyUnicode_Type), 0, "last_covered_activity", 2))) __PYX_ERR(0, 24, __pyx_L1_error)
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice___init__(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *)__pyx_v_self), __pyx_v_choice, __pyx_v_trace, __pyx_v_last_covered_activity);
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
/* function exit code */
goto __pyx_L0;
__pyx_L1_error:;
__pyx_r = -1;
for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
Py_XDECREF(values[__pyx_temp]);
}
goto __pyx_L7_cleaned_up;
__pyx_L0:;
for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
Py_XDECREF(values[__pyx_temp]);
}
__pyx_L7_cleaned_up:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static int __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice___init__(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *__pyx_v_self, PyObject *__pyx_v_choice, PyObject *__pyx_v_trace, PyObject *__pyx_v_last_covered_activity) {
PyObject *__pyx_7genexpr__pyx_v_option = NULL;
int __pyx_r;
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.covering_pattern.covering_inclusive_choice.CoveringInclusiveChoice.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_XDECREF(__pyx_7genexpr__pyx_v_option);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
+025: super().__init__(choice, trace, last_covered_activity)
__pyx_t_4 = NULL; __Pyx_INCREF(__pyx_builtin_super); __pyx_t_5 = __pyx_builtin_super; __pyx_t_6 = 1; { PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice), ((PyObject *)__pyx_v_self)}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_choice, __pyx_v_trace, __pyx_v_last_covered_activity}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+026: self.covering_options = [
{ /* enter inner scope */
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L5_error)
__Pyx_GOTREF(__pyx_t_1);
/* … */
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->covering_options);
__Pyx_DECREF(__pyx_v_self->covering_options);
__pyx_v_self->covering_options = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
+027: option.for_covering(trace, last_covered_activity)
__pyx_t_5 = __pyx_7genexpr__pyx_v_option;
__Pyx_INCREF(__pyx_t_5);
__pyx_t_6 = 0;
{
PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_trace, __pyx_v_last_covered_activity};
__pyx_t_3 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_for_covering, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L5_error)
__Pyx_GOTREF(__pyx_t_3);
}
if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 26, __pyx_L5_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+028: for option in choice.options]
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_choice, __pyx_mstate_global->__pyx_n_u_options); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 28, __pyx_L5_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (likely(!__pyx_t_8)) { if (likely(PyList_CheckExact(__pyx_t_2))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 28, __pyx_L5_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_2, __pyx_t_7); ++__pyx_t_7; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 28, __pyx_L5_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7)); #else __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); #endif ++__pyx_t_7; } if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28, __pyx_L5_error) } else { __pyx_t_3 = __pyx_t_8(__pyx_t_2); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 28, __pyx_L5_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_option, __pyx_t_3); __pyx_t_3 = 0; /* … */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_7genexpr__pyx_v_option); __pyx_7genexpr__pyx_v_option = 0; goto __pyx_L9_exit_scope; __pyx_L5_error:; __Pyx_XDECREF(__pyx_7genexpr__pyx_v_option); __pyx_7genexpr__pyx_v_option = 0; goto __pyx_L1_error; __pyx_L9_exit_scope:; } /* exit inner scope */
+029: self.current_subpattern_covering = None
__Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF((PyObject *)__pyx_v_self->current_subpattern_covering); __Pyx_DECREF((PyObject *)__pyx_v_self->current_subpattern_covering); __pyx_v_self->current_subpattern_covering = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *)Py_None);
030:
+031: cpdef process_covering_step(self, Cover cover, str last_activity, str next_activity):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_3process_covering_step(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_process_covering_step(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *__pyx_v_self, struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_cover, PyObject *__pyx_v_last_activity, PyObject *__pyx_v_next_activity, int __pyx_skip_dispatch) {
struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *__pyx_v_other_covering_option = 0;
PyObject *__pyx_r = NULL;
/* Check if called by wrapper */
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (
#if !CYTHON_USE_TYPE_SLOTS
unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice &&
__Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
#else
unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
#endif
) {
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_process_covering_step); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_3process_covering_step)) {
__Pyx_XDECREF(__pyx_r);
__pyx_t_3 = NULL;
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1;
__pyx_t_5 = 1;
#if CYTHON_UNPACK_METHODS
if (unlikely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
assert(__pyx_t_3);
PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
__Pyx_INCREF(__pyx_t_3);
__Pyx_INCREF(__pyx__function);
__Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
__pyx_t_5 = 0;
}
#endif
{
PyObject *__pyx_callargs[4] = {__pyx_t_3, ((PyObject *)__pyx_v_cover), __pyx_v_last_activity, __pyx_v_next_activity};
__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L0;
}
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
__pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
}
#endif
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
}
#endif
}
/* … */
/* function exit code */
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.covering_pattern.covering_inclusive_choice.CoveringInclusiveChoice.process_covering_step", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_other_covering_option);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_3process_covering_step(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_3process_covering_step = {"process_covering_step", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_3process_covering_step, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_3process_covering_step(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_cover = 0;
PyObject *__pyx_v_last_activity = 0;
PyObject *__pyx_v_next_activity = 0;
#if !CYTHON_METH_FASTCALL
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
#endif
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("process_covering_step (wrapper)", 0);
#if !CYTHON_METH_FASTCALL
#if CYTHON_ASSUME_SAFE_SIZE
__pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
#else
__pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
#endif
#endif
__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
{
PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cover,&__pyx_mstate_global->__pyx_n_u_last_activity,&__pyx_mstate_global->__pyx_n_u_next_activity,0};
PyObject* values[3] = {0,0,0};
const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 31, __pyx_L3_error)
if (__pyx_kwds_len > 0) {
switch (__pyx_nargs) {
case 3:
values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 31, __pyx_L3_error)
CYTHON_FALLTHROUGH;
case 2:
values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 31, __pyx_L3_error)
CYTHON_FALLTHROUGH;
case 1:
values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 31, __pyx_L3_error)
CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
const Py_ssize_t kwd_pos_args = __pyx_nargs;
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "process_covering_step", 0) < 0) __PYX_ERR(0, 31, __pyx_L3_error)
for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("process_covering_step", 1, 3, 3, i); __PYX_ERR(0, 31, __pyx_L3_error) }
}
} else if (unlikely(__pyx_nargs != 3)) {
goto __pyx_L5_argtuple_error;
} else {
values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 31, __pyx_L3_error)
values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 31, __pyx_L3_error)
values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 31, __pyx_L3_error)
}
__pyx_v_cover = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *)values[0]);
__pyx_v_last_activity = ((PyObject*)values[1]);
__pyx_v_next_activity = ((PyObject*)values[2]);
}
goto __pyx_L6_skip;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("process_covering_step", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 31, __pyx_L3_error)
__pyx_L6_skip:;
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
Py_XDECREF(values[__pyx_temp]);
}
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.covering_pattern.covering_inclusive_choice.CoveringInclusiveChoice.process_covering_step", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cover), __pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover, 1, "cover", 0))) __PYX_ERR(0, 31, __pyx_L1_error)
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_last_activity), (&PyUnicode_Type), 1, "last_activity", 1))) __PYX_ERR(0, 31, __pyx_L1_error)
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_next_activity), (&PyUnicode_Type), 1, "next_activity", 1))) __PYX_ERR(0, 31, __pyx_L1_error)
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_2process_covering_step(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *)__pyx_v_self), __pyx_v_cover, __pyx_v_last_activity, __pyx_v_next_activity);
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
/* function exit code */
goto __pyx_L0;
__pyx_L1_error:;
__pyx_r = NULL;
for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
Py_XDECREF(values[__pyx_temp]);
}
goto __pyx_L7_cleaned_up;
__pyx_L0:;
for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
Py_XDECREF(values[__pyx_temp]);
}
__pyx_L7_cleaned_up:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_2process_covering_step(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *__pyx_v_self, struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_cover, PyObject *__pyx_v_last_activity, PyObject *__pyx_v_next_activity) {
PyObject *__pyx_r = NULL;
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_process_covering_step(__pyx_v_self, __pyx_v_cover, __pyx_v_last_activity, __pyx_v_next_activity, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.covering_pattern.covering_inclusive_choice.CoveringInclusiveChoice.process_covering_step", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* … */
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_3process_covering_step, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoveringInclusiveChoice_process, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice, __pyx_mstate_global->__pyx_n_u_process_covering_step, __pyx_t_3) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
032: cdef CoveringPattern other_covering_option
+033: if not self.started_covering:
__pyx_t_6 = (!__pyx_v_self->__pyx_base.started_covering);
if (__pyx_t_6) {
/* … */
}
+034: self.started_covering = True
__pyx_v_self->__pyx_base.started_covering = 1;
+035: self.current_subpattern_covering = \
__Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF((PyObject *)__pyx_v_self->current_subpattern_covering); __Pyx_DECREF((PyObject *)__pyx_v_self->current_subpattern_covering); __pyx_v_self->current_subpattern_covering = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *)__pyx_t_1); __pyx_t_1 = 0;
+036: self.__find_matching_subpattern(next_activity)
__pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *)__pyx_v_self->__pyx_base.__pyx_vtab)->_CoveringInclusiveChoice__find_matching_subpattern(__pyx_v_self, __pyx_v_next_activity)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1);
+037: if self.current_subpattern_covering is not None:
__pyx_t_6 = (((PyObject *)__pyx_v_self->current_subpattern_covering) != Py_None);
if (likely(__pyx_t_6)) {
/* … */
goto __pyx_L4;
}
+038: self.__add_routing_code(cover, last_activity)
__pyx_t_2 = ((PyObject *)__pyx_v_self);
__Pyx_INCREF(__pyx_t_2);
__pyx_t_5 = 0;
{
PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_cover), __pyx_v_last_activity};
__pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_CoveringInclusiveChoice__add_ro, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
039: else:
+040: raise ValueError('No option of %r contains activity %s' % (
/*else*/ {
__pyx_t_2 = NULL;
__Pyx_INCREF(__pyx_builtin_ValueError);
__pyx_t_4 = __pyx_builtin_ValueError;
/* … */
__pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 4, 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 19 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 40, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_5 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9};
__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
}
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__PYX_ERR(0, 40, __pyx_L1_error)
}
__pyx_L4:;
+041: self.pattern, next_activity))
__pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(((PyObject *)__pyx_v_self->__pyx_base.pattern)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyUnicode_Unicode(__pyx_v_next_activity); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_No_option_of; __pyx_t_8[1] = __pyx_t_3; __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_contains_activity; __pyx_t_8[3] = __pyx_t_7;
042:
+043: if self.completed_covering:
if (unlikely(__pyx_v_self->__pyx_base.completed_covering)) {
/* … */
}
+044: raise ValueError('unallowed covering: already completed covering')
__pyx_t_4 = NULL;
__Pyx_INCREF(__pyx_builtin_ValueError);
__pyx_t_9 = __pyx_builtin_ValueError;
__pyx_t_5 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_unallowed_covering_already_compl};
__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
}
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__PYX_ERR(0, 44, __pyx_L1_error)
045:
+046: if self.current_subpattern_covering.pattern.contains_activity(next_activity):
__pyx_t_6 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *)__pyx_v_self->current_subpattern_covering->pattern->__pyx_vtab)->contains_activity(__pyx_v_self->current_subpattern_covering->pattern, __pyx_v_next_activity, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L1_error)
if (__pyx_t_6) {
/* … */
goto __pyx_L6;
}
+047: if not self.current_subpattern_covering.completed_covering:
__pyx_t_6 = (!__pyx_v_self->current_subpattern_covering->completed_covering);
if (__pyx_t_6) {
/* … */
goto __pyx_L7;
}
+048: self.current_subpattern_covering.process_covering_step(
__pyx_t_1 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *)__pyx_v_self->current_subpattern_covering->__pyx_vtab)->process_covering_step(__pyx_v_self->current_subpattern_covering, __pyx_v_cover, __pyx_v_last_activity, __pyx_v_next_activity, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
049: cover, last_activity, next_activity)
050: else:
+051: cover.add_log_move(last_activity, next_activity,
/*else*/ {
/* … */
__pyx_t_9 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *)__pyx_v_cover->__pyx_vtab)->add_log_move(__pyx_v_cover, __pyx_v_last_activity, __pyx_v_next_activity, ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 51, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
}
__pyx_L7:;
+052: self.get_next_coverable_activities())
__pyx_t_1 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.get_next_coverable_activities(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1);
053: else:
+054: other_covering_option = self.__find_matching_subpattern(next_activity)
/*else*/ {
__pyx_t_9 = ((PyObject *)((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *)__pyx_v_self->__pyx_base.__pyx_vtab)->_CoveringInclusiveChoice__find_matching_subpattern(__pyx_v_self, __pyx_v_next_activity)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 54, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__pyx_v_other_covering_option = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *)__pyx_t_9);
__pyx_t_9 = 0;
055:
+056: if other_covering_option is not None:
__pyx_t_6 = (((PyObject *)__pyx_v_other_covering_option) != Py_None);
if (__pyx_t_6) {
/* … */
goto __pyx_L8;
}
+057: if not self.current_subpattern_covering.completed_covering:
__pyx_t_6 = (!__pyx_v_self->current_subpattern_covering->completed_covering);
if (__pyx_t_6) {
/* … */
}
+058: self.current_subpattern_covering.skip_to_end(
((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *)__pyx_v_self->current_subpattern_covering->__pyx_vtab)->skip_to_end(__pyx_v_self->current_subpattern_covering, __pyx_v_cover, ((struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *)__pyx_t_9), __pyx_v_last_activity, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+059: cover, self.trace, last_activity)
__pyx_t_9 = ((PyObject *)__pyx_v_self->__pyx_base.trace);
__Pyx_INCREF(__pyx_t_9);
+060: self.covering_options.remove(self.current_subpattern_covering)
__pyx_t_1 = __pyx_v_self->covering_options;
__Pyx_INCREF(__pyx_t_1);
__pyx_t_5 = 0;
{
PyObject *__pyx_callargs[2] = {__pyx_t_1, ((PyObject *)__pyx_v_self->current_subpattern_covering)};
__pyx_t_9 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_remove, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 60, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+061: self.current_subpattern_covering = other_covering_option
__Pyx_INCREF((PyObject *)__pyx_v_other_covering_option); __Pyx_GIVEREF((PyObject *)__pyx_v_other_covering_option); __Pyx_GOTREF((PyObject *)__pyx_v_self->current_subpattern_covering); __Pyx_DECREF((PyObject *)__pyx_v_self->current_subpattern_covering); __pyx_v_self->current_subpattern_covering = __pyx_v_other_covering_option;
+062: self.__add_routing_code(cover, last_activity)
__pyx_t_1 = ((PyObject *)__pyx_v_self);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_5 = 0;
{
PyObject *__pyx_callargs[3] = {__pyx_t_1, ((PyObject *)__pyx_v_cover), __pyx_v_last_activity};
__pyx_t_9 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_CoveringInclusiveChoice__add_ro, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 62, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+063: self.current_subpattern_covering.process_covering_step(
__pyx_t_9 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *)__pyx_v_self->current_subpattern_covering->__pyx_vtab)->process_covering_step(__pyx_v_self->current_subpattern_covering, __pyx_v_cover, __pyx_v_last_activity, __pyx_v_next_activity, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
064: cover, last_activity, next_activity)
065: else:
066: #an already used option must contain the activity
067: #=> we have to make a log move
+068: cover.add_log_move(last_activity, next_activity,
/*else*/ {
/* … */
__pyx_t_1 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *)__pyx_v_cover->__pyx_vtab)->add_log_move(__pyx_v_cover, __pyx_v_last_activity, __pyx_v_next_activity, ((PyObject*)__pyx_t_9), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
__pyx_L8:;
}
__pyx_L6:;
+069: self.get_next_coverable_activities())
__pyx_t_9 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.get_next_coverable_activities(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *)__pyx_v_self), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9);
070:
+071: self.completed_covering = len(self.covering_options) == 1 and \
__pyx_t_1 = __pyx_v_self->covering_options; __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(0, 71, __pyx_L1_error) } __pyx_t_10 = __Pyx_PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = (__pyx_t_10 == 1); if (__pyx_t_11) { } else { __pyx_t_6 = __pyx_t_11; goto __pyx_L10_bool_binop_done; } /* … */ __pyx_v_self->__pyx_base.completed_covering = __pyx_t_6;
+072: self.covering_options[0].completed_covering
if (unlikely(__pyx_v_self->covering_options == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 72, __pyx_L1_error)
}
__pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->covering_options, 0, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_completed_covering); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 72, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 72, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_t_6 = __pyx_t_11;
__pyx_L10_bool_binop_done:;
073:
+074: cdef CoveringPattern __find_matching_subpattern(self, str next_activity):
static struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *__pyx_f_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice__CoveringInclusiveChoice__find_matching_subpattern(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *__pyx_v_self, PyObject *__pyx_v_next_activity) {
struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *__pyx_v_option = 0;
struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *__pyx_r = NULL;
/* … */
/* function exit code */
__pyx_r = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *)Py_None); __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.covering_pattern.covering_inclusive_choice.CoveringInclusiveChoice._CoveringInclusiveChoice__find_matching_subpattern", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_option);
__Pyx_XGIVEREF((PyObject *)__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
075: cdef CoveringPattern option
+076: for option in self.covering_options:
if (unlikely(__pyx_v_self->covering_options == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
__PYX_ERR(0, 76, __pyx_L1_error)
}
__pyx_t_1 = __pyx_v_self->covering_options; __Pyx_INCREF(__pyx_t_1);
__pyx_t_2 = 0;
for (;;) {
{
Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
#if !CYTHON_ASSUME_SAFE_SIZE
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 76, __pyx_L1_error)
#endif
if (__pyx_t_2 >= __pyx_temp) break;
}
__pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_2);
++__pyx_t_2;
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern))))) __PYX_ERR(0, 76, __pyx_L1_error)
__Pyx_XDECREF_SET(__pyx_v_option, ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *)__pyx_t_3));
__pyx_t_3 = 0;
/* … */
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+077: if option.pattern.contains_activity(next_activity):
__pyx_t_4 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *)__pyx_v_option->pattern->__pyx_vtab)->contains_activity(__pyx_v_option->pattern, __pyx_v_next_activity, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 77, __pyx_L1_error)
if (__pyx_t_4) {
/* … */
}
+078: return option
__Pyx_XDECREF((PyObject *)__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_option); __pyx_r = __pyx_v_option; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0;
079:
+080: def __add_routing_code(self, cover, last_activity: str):
/* Python wrapper */ static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_5_CoveringInclusiveChoice__add_routing_code(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_4__add_routing_code, "adds a routing code to the current covering subpattern"); static PyMethodDef __pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_5_CoveringInclusiveChoice__add_routing_code = {"_CoveringInclusiveChoice__add_routing_code", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_5_CoveringInclusiveChoice__add_routing_code, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_4__add_routing_code}; static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_5_CoveringInclusiveChoice__add_routing_code(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_cover = 0; PyObject *__pyx_v_last_activity = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_CoveringInclusiveChoice__add_routing_code (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cover,&__pyx_mstate_global->__pyx_n_u_last_activity,0}; PyObject* values[2] = {0,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 80, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 80, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 80, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_CoveringInclusiveChoice__add_routing_code", 0) < 0) __PYX_ERR(0, 80, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_CoveringInclusiveChoice__add_routing_code", 1, 2, 2, i); __PYX_ERR(0, 80, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 80, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 80, __pyx_L3_error) } __pyx_v_cover = values[0]; __pyx_v_last_activity = ((PyObject*)values[1]); } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_CoveringInclusiveChoice__add_routing_code", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 80, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.covering_pattern.covering_inclusive_choice.CoveringInclusiveChoice._CoveringInclusiveChoice__add_routing_code", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_last_activity), (&PyUnicode_Type), 0, "last_activity", 2))) __PYX_ERR(0, 80, __pyx_L1_error) __pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_4__add_routing_code(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *)__pyx_v_self), __pyx_v_cover, __pyx_v_last_activity); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } goto __pyx_L7_cleaned_up; __pyx_L0:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __pyx_L7_cleaned_up:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_42_CoveringInclusiveChoice__add_routing_code_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ /* … */ static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_4__add_routing_code(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *__pyx_v_self, PyObject *__pyx_v_cover, PyObject *__pyx_v_last_activity) { PyObject *__pyx_gb_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_42_CoveringInclusiveChoice__add_routing_code_2generator = 0; PyObject *__pyx_r = NULL; /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.covering_pattern.covering_inclusive_choice.CoveringInclusiveChoice._CoveringInclusiveChoice__add_routing_code", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_gb_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_42_CoveringInclusiveChoice__add_routing_code_2generator); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* … */ __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_last_activity, __pyx_mstate_global->__pyx_n_u_str) < 0) __PYX_ERR(0, 80, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_5_CoveringInclusiveChoice__add_routing_code, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoveringInclusiveChoice___add_ro, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice, __pyx_mstate_global->__pyx_n_u_CoveringInclusiveChoice__add_ro, __pyx_t_2) < 0) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
081: """adds a routing code to the current covering subpattern"""
+082: cover.meta_stream.add_routing_code(
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cover, __pyx_mstate_global->__pyx_n_u_meta_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2);
083: self.pattern,
084: self.current_subpattern_covering.pattern,
+085: frozenset(c.pattern.get_activity_name()
static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_42_CoveringInclusiveChoice__add_routing_code_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice___pyx_scope_struct__genexpr *__pyx_cur_scope;
PyObject *__pyx_r = NULL;
__pyx_cur_scope = (struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice___pyx_scope_struct__genexpr *)__pyx_tp_new_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice___pyx_scope_struct__genexpr(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice___pyx_scope_struct__genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
__pyx_cur_scope = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice___pyx_scope_struct__genexpr *)Py_None);
__Pyx_INCREF(Py_None);
__PYX_ERR(0, 85, __pyx_L1_error)
} else {
__Pyx_GOTREF((PyObject *)__pyx_cur_scope);
}
__pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0;
__Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0);
{
__pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_42_CoveringInclusiveChoice__add_routing_code_2generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_CoveringInclusiveChoice__add_ro_2, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc); if (unlikely(!gen)) __PYX_ERR(0, 85, __pyx_L1_error)
__Pyx_DECREF(__pyx_cur_scope);
__Pyx_RefNannyFinishContext();
return (PyObject *) gen;
}
/* function exit code */
__pyx_L1_error:;
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.covering_pattern.covering_inclusive_choice.CoveringInclusiveChoice._CoveringInclusiveChoice__add_routing_code.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__Pyx_DECREF((PyObject *)__pyx_cur_scope);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_gb_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_42_CoveringInclusiveChoice__add_routing_code_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("genexpr", 0);
__pyx_L3_first_run:;
if (unlikely(__pyx_sent_value != Py_None)) {
if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
__PYX_ERR(0, 85, __pyx_L1_error)
}
/* … */
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_c, __pyx_mstate_global->__pyx_n_u_pattern); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 85, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_4 = __pyx_t_5;
__Pyx_INCREF(__pyx_t_4);
__pyx_t_6 = 0;
{
PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
__pyx_t_3 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_get_activity_name, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
}
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
__Pyx_XGIVEREF(__pyx_t_1);
__pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
__pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
__Pyx_Coroutine_ResetAndClearException(__pyx_generator);
/* return from generator, yielding value */
__pyx_generator->resume_label = 1;
return __pyx_r;
__pyx_L6_resume_from_yield:;
__pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
__pyx_cur_scope->__pyx_t_0 = 0;
__Pyx_XGOTREF(__pyx_t_1);
__pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 85, __pyx_L1_error)
/* … */
/* function exit code */
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
if (__Pyx_PyErr_Occurred()) {
__Pyx_Generator_Replace_StopIteration(0);
__Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
}
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
#if !CYTHON_USE_EXC_INFO_STACK
__Pyx_Coroutine_ResetAndClearException(__pyx_generator);
#endif
__pyx_generator->resume_label = -1;
__Pyx_Coroutine_clear((PyObject*)__pyx_generator);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* … */
__pyx_t_4 = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_42_CoveringInclusiveChoice__add_routing_code_genexpr(NULL, __pyx_v_self->covering_options); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 85, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = __Pyx_PyFrozenSet_New(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 85, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* … */
struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice___pyx_scope_struct__genexpr {
PyObject_HEAD
PyObject *__pyx_genexpr_arg_0;
PyObject *__pyx_v_c;
PyObject *__pyx_t_0;
Py_ssize_t __pyx_t_1;
};
+086: for c in self.covering_options),
if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 86, __pyx_L1_error) }
if (unlikely(__pyx_cur_scope->__pyx_genexpr_arg_0 == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
__PYX_ERR(0, 86, __pyx_L1_error)
}
__pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1);
__pyx_t_2 = 0;
for (;;) {
{
Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
#if !CYTHON_ASSUME_SAFE_SIZE
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 86, __pyx_L1_error)
#endif
if (__pyx_t_2 >= __pyx_temp) break;
}
__pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_2);
++__pyx_t_2;
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_c);
__Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_c, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
/* … */
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+087: last_activity)
__pyx_t_6 = 0;
{
PyObject *__pyx_callargs[5] = {__pyx_t_2, ((PyObject *)__pyx_v_self->__pyx_base.pattern), ((PyObject *)__pyx_v_self->current_subpattern_covering->pattern), __pyx_t_5, __pyx_v_last_activity};
__pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_add_routing_code, __pyx_callargs+__pyx_t_6, (5-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
088:
+089: cpdef int skip_to_end(self, Cover cover, Trace trace, str last_covered_activity):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_7skip_to_end(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_skip_to_end(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *__pyx_v_self, struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_cover, struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *__pyx_v_trace, PyObject *__pyx_v_last_covered_activity, int __pyx_skip_dispatch) {
int __pyx_r;
/* Check if called by wrapper */
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (
#if !CYTHON_USE_TYPE_SLOTS
unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice &&
__Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
#else
unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
#endif
) {
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_skip_to_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_7skip_to_end)) {
__pyx_t_3 = NULL;
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1;
__pyx_t_5 = 1;
#if CYTHON_UNPACK_METHODS
if (unlikely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
assert(__pyx_t_3);
PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
__Pyx_INCREF(__pyx_t_3);
__Pyx_INCREF(__pyx__function);
__Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
__pyx_t_5 = 0;
}
#endif
{
PyObject *__pyx_callargs[4] = {__pyx_t_3, ((PyObject *)__pyx_v_cover), ((PyObject *)__pyx_v_trace), __pyx_v_last_covered_activity};
__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
__pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 89, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_6;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L0;
}
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
__pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
}
#endif
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
}
#endif
}
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.covering_pattern.covering_inclusive_choice.CoveringInclusiveChoice.skip_to_end", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_7skip_to_end(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_7skip_to_end = {"skip_to_end", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_7skip_to_end, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_7skip_to_end(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_cover = 0;
struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *__pyx_v_trace = 0;
PyObject *__pyx_v_last_covered_activity = 0;
#if !CYTHON_METH_FASTCALL
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
#endif
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("skip_to_end (wrapper)", 0);
#if !CYTHON_METH_FASTCALL
#if CYTHON_ASSUME_SAFE_SIZE
__pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
#else
__pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
#endif
#endif
__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
{
PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cover,&__pyx_mstate_global->__pyx_n_u_trace,&__pyx_mstate_global->__pyx_n_u_last_covered_activity,0};
PyObject* values[3] = {0,0,0};
const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 89, __pyx_L3_error)
if (__pyx_kwds_len > 0) {
switch (__pyx_nargs) {
case 3:
values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 89, __pyx_L3_error)
CYTHON_FALLTHROUGH;
case 2:
values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 89, __pyx_L3_error)
CYTHON_FALLTHROUGH;
case 1:
values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 89, __pyx_L3_error)
CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
const Py_ssize_t kwd_pos_args = __pyx_nargs;
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "skip_to_end", 0) < 0) __PYX_ERR(0, 89, __pyx_L3_error)
for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("skip_to_end", 1, 3, 3, i); __PYX_ERR(0, 89, __pyx_L3_error) }
}
} else if (unlikely(__pyx_nargs != 3)) {
goto __pyx_L5_argtuple_error;
} else {
values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 89, __pyx_L3_error)
values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 89, __pyx_L3_error)
values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 89, __pyx_L3_error)
}
__pyx_v_cover = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *)values[0]);
__pyx_v_trace = ((struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *)values[1]);
__pyx_v_last_covered_activity = ((PyObject*)values[2]);
}
goto __pyx_L6_skip;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("skip_to_end", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 89, __pyx_L3_error)
__pyx_L6_skip:;
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
Py_XDECREF(values[__pyx_temp]);
}
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.covering_pattern.covering_inclusive_choice.CoveringInclusiveChoice.skip_to_end", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cover), __pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover, 1, "cover", 0))) __PYX_ERR(0, 89, __pyx_L1_error)
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_trace), __pyx_mstate_global->__pyx_ptype_16prolothar_common_6models_8eventlog_5trace_Trace, 1, "trace", 0))) __PYX_ERR(0, 89, __pyx_L1_error)
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_last_covered_activity), (&PyUnicode_Type), 1, "last_covered_activity", 1))) __PYX_ERR(0, 89, __pyx_L1_error)
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_6skip_to_end(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *)__pyx_v_self), __pyx_v_cover, __pyx_v_trace, __pyx_v_last_covered_activity);
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
/* function exit code */
goto __pyx_L0;
__pyx_L1_error:;
__pyx_r = NULL;
for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
Py_XDECREF(values[__pyx_temp]);
}
goto __pyx_L7_cleaned_up;
__pyx_L0:;
for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
Py_XDECREF(values[__pyx_temp]);
}
__pyx_L7_cleaned_up:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_6skip_to_end(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *__pyx_v_self, struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_cover, struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *__pyx_v_trace, PyObject *__pyx_v_last_covered_activity) {
PyObject *__pyx_r = NULL;
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_skip_to_end(__pyx_v_self, __pyx_v_cover, __pyx_v_trace, __pyx_v_last_covered_activity, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 89, __pyx_L1_error)
__pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.covering_pattern.covering_inclusive_choice.CoveringInclusiveChoice.skip_to_end", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* … */
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_7skip_to_end, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoveringInclusiveChoice_skip_to, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice, __pyx_mstate_global->__pyx_n_u_skip_to_end, __pyx_t_2) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+090: if not self.completed_covering:
__pyx_t_7 = (!__pyx_v_self->__pyx_base.completed_covering);
if (__pyx_t_7) {
/* … */
}
+091: self.completed_covering = True
__pyx_v_self->__pyx_base.completed_covering = 1;
+092: if self.current_subpattern_covering is not None:
__pyx_t_7 = (((PyObject *)__pyx_v_self->current_subpattern_covering) != Py_None);
if (__pyx_t_7) {
/* … */
}
+093: return self.current_subpattern_covering.skip_to_end(
__pyx_t_6 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *)__pyx_v_self->current_subpattern_covering->__pyx_vtab)->skip_to_end(__pyx_v_self->current_subpattern_covering, __pyx_v_cover, __pyx_v_trace, __pyx_v_last_covered_activity, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 93, __pyx_L1_error)
__pyx_r = __pyx_t_6;
goto __pyx_L0;
094: cover, trace, last_covered_activity)
095: else:
+096: return self.covering_options[0].skip_to_end(
/*else*/ {
if (unlikely(__pyx_v_self->covering_options == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
__PYX_ERR(0, 96, __pyx_L1_error)
}
__pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_self->covering_options, 0, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_2 = __pyx_t_4;
__Pyx_INCREF(__pyx_t_2);
/* … */
__pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 96, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_6;
goto __pyx_L0;
}
+097: cover, trace, last_covered_activity)
__pyx_t_5 = 0;
{
PyObject *__pyx_callargs[4] = {__pyx_t_2, ((PyObject *)__pyx_v_cover), ((PyObject *)__pyx_v_trace), __pyx_v_last_covered_activity};
__pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_skip_to_end, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
}
098:
+099: cpdef set get_next_coverable_activities(self):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_9get_next_coverable_activities(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_get_next_coverable_activities(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *__pyx_v_self, int __pyx_skip_dispatch) {
PyObject *__pyx_v_coverable_activities = 0;
struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *__pyx_v_option = 0;
PyObject *__pyx_r = NULL;
/* Check if called by wrapper */
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (
#if !CYTHON_USE_TYPE_SLOTS
unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice &&
__Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
#else
unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
#endif
) {
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_get_next_coverable_activities); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_9get_next_coverable_activities)) {
__Pyx_XDECREF(__pyx_r);
__pyx_t_3 = NULL;
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1;
__pyx_t_5 = 1;
#if CYTHON_UNPACK_METHODS
if (unlikely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
assert(__pyx_t_3);
PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
__Pyx_INCREF(__pyx_t_3);
__Pyx_INCREF(__pyx__function);
__Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
__pyx_t_5 = 0;
}
#endif
{
PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
if (!(likely(PySet_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_t_2))) __PYX_ERR(0, 99, __pyx_L1_error)
__pyx_r = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L0;
}
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
__pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
}
#endif
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
}
#endif
}
/* … */
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.covering_pattern.covering_inclusive_choice.CoveringInclusiveChoice.get_next_coverable_activities", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_coverable_activities);
__Pyx_XDECREF((PyObject *)__pyx_v_option);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_9get_next_coverable_activities(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_9get_next_coverable_activities = {"get_next_coverable_activities", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_9get_next_coverable_activities, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_9get_next_coverable_activities(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
#if !CYTHON_METH_FASTCALL
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
#endif
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_next_coverable_activities (wrapper)", 0);
#if !CYTHON_METH_FASTCALL
#if CYTHON_ASSUME_SAFE_SIZE
__pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
#else
__pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
#endif
#endif
__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_next_coverable_activities", 1, 0, 0, __pyx_nargs); return NULL; }
const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
if (unlikely(__pyx_kwds_len < 0)) return NULL;
if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_next_coverable_activities", __pyx_kwds); return NULL;}
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_8get_next_coverable_activities(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_8get_next_coverable_activities(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_get_next_coverable_activities(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.covering_pattern.covering_inclusive_choice.CoveringInclusiveChoice.get_next_coverable_activities", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* … */
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_9get_next_coverable_activities, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoveringInclusiveChoice_get_next, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice, __pyx_mstate_global->__pyx_n_u_get_next_coverable_activities, __pyx_t_2) < 0) __PYX_ERR(0, 99, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
100: cdef set coverable_activities
101: cdef CoveringPattern option
+102: if not self.current_subpattern_covering.completed_covering:
__pyx_t_6 = (!__pyx_v_self->current_subpattern_covering->completed_covering);
if (__pyx_t_6) {
/* … */
}
+103: return self.current_subpattern_covering.get_next_coverable_activities()
__Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *)__pyx_v_self->current_subpattern_covering->__pyx_vtab)->get_next_coverable_activities(__pyx_v_self->current_subpattern_covering, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0;
104: else:
+105: coverable_activities = set()
/*else*/ {
__pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_coverable_activities = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
+106: for option in self.covering_options:
if (unlikely(__pyx_v_self->covering_options == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
__PYX_ERR(0, 106, __pyx_L1_error)
}
__pyx_t_1 = __pyx_v_self->covering_options; __Pyx_INCREF(__pyx_t_1);
__pyx_t_7 = 0;
for (;;) {
{
Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
#if !CYTHON_ASSUME_SAFE_SIZE
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 106, __pyx_L1_error)
#endif
if (__pyx_t_7 >= __pyx_temp) break;
}
__pyx_t_2 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_7);
++__pyx_t_7;
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern))))) __PYX_ERR(0, 106, __pyx_L1_error)
__Pyx_XDECREF_SET(__pyx_v_option, ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *)__pyx_t_2));
__pyx_t_2 = 0;
/* … */
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+107: if option != self.current_subpattern_covering:
__pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_option), ((PyObject *)__pyx_v_self->current_subpattern_covering), Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error) __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { /* … */ }
+108: coverable_activities.update(option.get_next_coverable_activities())
__pyx_t_2 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *)__pyx_v_option->__pyx_vtab)->get_next_coverable_activities(__pyx_v_option, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PySet_Type__update, __pyx_v_coverable_activities, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+109: return coverable_activities
__Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_coverable_activities); __pyx_r = __pyx_v_coverable_activities; goto __pyx_L0; }
110:
+111: cpdef bint can_cover(self, str activity):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_11can_cover(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_can_cover(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *__pyx_v_self, PyObject *__pyx_v_activity, int __pyx_skip_dispatch) {
PyObject *__pyx_v_option = NULL;
int __pyx_r;
/* Check if called by wrapper */
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (
#if !CYTHON_USE_TYPE_SLOTS
unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice &&
__Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
#else
unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
#endif
) {
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_can_cover); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_11can_cover)) {
__pyx_t_3 = NULL;
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1;
__pyx_t_5 = 1;
#if CYTHON_UNPACK_METHODS
if (unlikely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
assert(__pyx_t_3);
PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
__Pyx_INCREF(__pyx_t_3);
__Pyx_INCREF(__pyx__function);
__Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
__pyx_t_5 = 0;
}
#endif
{
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_activity};
__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_6;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L0;
}
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
__pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
}
#endif
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
}
#endif
}
/* … */
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.covering_pattern.covering_inclusive_choice.CoveringInclusiveChoice.can_cover", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_option);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_11can_cover(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_11can_cover = {"can_cover", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_11can_cover, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_11can_cover(PyObject *__pyx_v_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
PyObject *__pyx_v_activity = 0;
#if !CYTHON_METH_FASTCALL
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
#endif
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("can_cover (wrapper)", 0);
#if !CYTHON_METH_FASTCALL
#if CYTHON_ASSUME_SAFE_SIZE
__pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
#else
__pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
#endif
#endif
__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
{
PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_activity,0};
PyObject* values[1] = {0};
const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 111, __pyx_L3_error)
if (__pyx_kwds_len > 0) {
switch (__pyx_nargs) {
case 1:
values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 111, __pyx_L3_error)
CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
const Py_ssize_t kwd_pos_args = __pyx_nargs;
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "can_cover", 0) < 0) __PYX_ERR(0, 111, __pyx_L3_error)
for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("can_cover", 1, 1, 1, i); __PYX_ERR(0, 111, __pyx_L3_error) }
}
} else if (unlikely(__pyx_nargs != 1)) {
goto __pyx_L5_argtuple_error;
} else {
values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 111, __pyx_L3_error)
}
__pyx_v_activity = ((PyObject*)values[0]);
}
goto __pyx_L6_skip;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("can_cover", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 111, __pyx_L3_error)
__pyx_L6_skip:;
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
Py_XDECREF(values[__pyx_temp]);
}
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.covering_pattern.covering_inclusive_choice.CoveringInclusiveChoice.can_cover", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_activity), (&PyUnicode_Type), 1, "activity", 1))) __PYX_ERR(0, 111, __pyx_L1_error)
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_10can_cover(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *)__pyx_v_self), __pyx_v_activity);
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
/* function exit code */
goto __pyx_L0;
__pyx_L1_error:;
__pyx_r = NULL;
for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
Py_XDECREF(values[__pyx_temp]);
}
goto __pyx_L7_cleaned_up;
__pyx_L0:;
for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
Py_XDECREF(values[__pyx_temp]);
}
__pyx_L7_cleaned_up:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_10can_cover(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice *__pyx_v_self, PyObject *__pyx_v_activity) {
PyObject *__pyx_r = NULL;
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_can_cover(__pyx_v_self, __pyx_v_activity, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L1_error)
__pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.covering_pattern.covering_inclusive_choice.CoveringInclusiveChoice.can_cover", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* … */
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_23CoveringInclusiveChoice_11can_cover, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CoveringInclusiveChoice_can_cove, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_25covering_inclusive_choice_CoveringInclusiveChoice, __pyx_mstate_global->__pyx_n_u_can_cover, __pyx_t_2) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+112: for option in self.covering_options:
if (unlikely(__pyx_v_self->covering_options == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
__PYX_ERR(0, 112, __pyx_L1_error)
}
__pyx_t_1 = __pyx_v_self->covering_options; __Pyx_INCREF(__pyx_t_1);
__pyx_t_7 = 0;
for (;;) {
{
Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
#if !CYTHON_ASSUME_SAFE_SIZE
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 112, __pyx_L1_error)
#endif
if (__pyx_t_7 >= __pyx_temp) break;
}
__pyx_t_2 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_7);
++__pyx_t_7;
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_XDECREF_SET(__pyx_v_option, __pyx_t_2);
__pyx_t_2 = 0;
/* … */
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+113: if option.can_cover(activity):
__pyx_t_4 = __pyx_v_option;
__Pyx_INCREF(__pyx_t_4);
__pyx_t_5 = 0;
{
PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_activity};
__pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_can_cover, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 113, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_6) {
/* … */
}
+114: return True
__pyx_r = 1;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L0;
+115: return False
__pyx_r = 0; goto __pyx_L0;