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: singleton.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:
018: from prolothar_common.models.directly_follows_graph cimport DirectlyFollowsGraph
+019: from prolothar_common.models.dfg.node import Node
__pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_Node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_prolothar_common_models_dfg_node, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19, __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_Node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Node, __pyx_t_2) < 0) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
020:
+021: from prolothar_common.models.data_petri_net import DataPetriNet, Transition, Place
__pyx_t_3 = __Pyx_PyList_Pack(3, __pyx_mstate_global->__pyx_n_u_DataPetriNet, __pyx_mstate_global->__pyx_n_u_Transition, __pyx_mstate_global->__pyx_n_u_Place); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_prolothar_common_models_data_pet, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DataPetriNet); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DataPetriNet, __pyx_t_3) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Transition); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Transition, __pyx_t_3) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Place); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Place, __pyx_t_3) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
022: from prolothar_process_discovery.discovery.proseqo.covering_pattern.covering_singleton cimport CoveringSingleton
+023: from prolothar_common.models.nested_graph import NestedGraph
__pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_NestedGraph); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_prolothar_common_models_nested_g, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __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_NestedGraph); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NestedGraph, __pyx_t_2) < 0) __PYX_ERR(0, 23, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
024:
+025: from typing import Tuple, Set, List
__pyx_t_3 = __Pyx_PyList_Pack(3, __pyx_mstate_global->__pyx_n_u_Tuple, __pyx_mstate_global->__pyx_n_u_Set, __pyx_mstate_global->__pyx_n_u_List); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Tuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Tuple, __pyx_t_3) < 0) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Set); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Set, __pyx_t_3) < 0) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_List); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_List, __pyx_t_3) < 0) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+026: from math import log2
__pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_log2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_math, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26, __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_log2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_log2, __pyx_t_2) < 0) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
027:
+028: from random import Random
__pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_Random); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_random, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Random); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Random, __pyx_t_3) < 0) __PYX_ERR(0, 28, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
029:
+030: cdef class Singleton(Pattern):
struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton {
struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern __pyx_base;
};
static struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_vtabptr_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton;
+031: def __init__(self, activity: str):
/* Python wrapper */
static int __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_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_activity,0};
PyObject* values[1] = {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, 31, __pyx_L3_error)
if (__pyx_kwds_len > 0) {
switch (__pyx_nargs) {
case 1:
values[0] = __Pyx_ArgRef_VARARGS(__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, "__init__", 0) < 0) __PYX_ERR(0, 31, __pyx_L3_error)
for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(0, 31, __pyx_L3_error) }
}
} else if (unlikely(__pyx_nargs != 1)) {
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, 31, __pyx_L3_error)
}
__pyx_v_activity = ((PyObject*)values[0]);
}
goto __pyx_L6_skip;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __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.pattern.singleton.Singleton.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_activity), (&PyUnicode_Type), 0, "activity", 2))) __PYX_ERR(0, 31, __pyx_L1_error)
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton___init__(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__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 = -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_7pattern_9singleton_9Singleton___init__(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, PyObject *__pyx_v_activity) {
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.pattern.singleton.Singleton.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
+032: super().__init__()
__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_7pattern_9singleton_Singleton), ((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, 32, __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[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_6, (1-__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, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+033: self.activity = activity
__Pyx_INCREF(__pyx_v_activity); __Pyx_GIVEREF(__pyx_v_activity); __Pyx_GOTREF(__pyx_v_self->activity); __Pyx_DECREF(__pyx_v_self->activity); __pyx_v_self->activity = __pyx_v_activity;
034:
+035: def expand_dfg(self, node: Node, dfg: DirectlyFollowsGraph,
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_3expand_dfg(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_7pattern_9singleton_9Singleton_3expand_dfg = {"expand_dfg", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_3expand_dfg, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_3expand_dfg(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
) {
CYTHON_UNUSED PyObject *__pyx_v_node = 0;
CYTHON_UNUSED struct __pyx_obj_16prolothar_common_6models_22directly_follows_graph_DirectlyFollowsGraph *__pyx_v_dfg = 0;
CYTHON_UNUSED PyObject *__pyx_v_recursive = 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("expand_dfg (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_node,&__pyx_mstate_global->__pyx_n_u_dfg,&__pyx_mstate_global->__pyx_n_u_recursive,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, 35, __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, 35, __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, 35, __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, 35, __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, "expand_dfg", 0) < 0) __PYX_ERR(0, 35, __pyx_L3_error)
/* … */
/* 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_7pattern_9singleton_9Singleton_2expand_dfg(CYTHON_UNUSED struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_node, CYTHON_UNUSED struct __pyx_obj_16prolothar_common_6models_22directly_follows_graph_DirectlyFollowsGraph *__pyx_v_dfg, CYTHON_UNUSED PyObject *__pyx_v_recursive) {
PyObject *__pyx_r = NULL;
/* function exit code */
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* … */
__pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_node, __pyx_mstate_global->__pyx_n_u_Node) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dfg, __pyx_mstate_global->__pyx_n_u_DirectlyFollowsGraph) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_recursive, __pyx_mstate_global->__pyx_n_u_bool) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_3expand_dfg, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton_expand_dfg, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 35, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[1]);
__Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_expand_dfg, __pyx_t_3) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* … */
__pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 35, __pyx_L1_error)
__Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]);
__Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]);
+036: recursive: bool = True):
if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_True)); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("expand_dfg", 0, 2, 3, i); __PYX_ERR(0, 35, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 35, __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, 35, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 35, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_True)); } __pyx_v_node = values[0]; __pyx_v_dfg = ((struct __pyx_obj_16prolothar_common_6models_22directly_follows_graph_DirectlyFollowsGraph *)values[1]); __pyx_v_recursive = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("expand_dfg", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 35, __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.pattern.singleton.Singleton.expand_dfg", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dfg), __pyx_mstate_global->__pyx_ptype_16prolothar_common_6models_22directly_follows_graph_DirectlyFollowsGraph, 0, "dfg", 0))) __PYX_ERR(0, 35, __pyx_L1_error) __pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_2expand_dfg(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self), __pyx_v_node, __pyx_v_dfg, __pyx_v_recursive);
037: #singleton is already maximal expanded
038: pass
039:
+040: cpdef fold_dfg(self, DirectlyFollowsGraph dfg):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_5fold_dfg(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_7pattern_9singleton_9Singleton_fold_dfg(CYTHON_UNUSED struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_16prolothar_common_6models_22directly_follows_graph_DirectlyFollowsGraph *__pyx_v_dfg, int __pyx_skip_dispatch) {
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_7pattern_9singleton_Singleton &&
__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_fold_dfg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_5fold_dfg)) {
__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, ((PyObject *)__pyx_v_dfg)};
__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, 40, __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_AddTraceback("prolothar_process_discovery.discovery.proseqo.pattern.singleton.Singleton.fold_dfg", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* … */
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_5fold_dfg(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_7pattern_9singleton_9Singleton_5fold_dfg = {"fold_dfg", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_5fold_dfg, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_5fold_dfg(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_16prolothar_common_6models_22directly_follows_graph_DirectlyFollowsGraph *__pyx_v_dfg = 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("fold_dfg (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_dfg,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, 40, __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, 40, __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, "fold_dfg", 0) < 0) __PYX_ERR(0, 40, __pyx_L3_error)
for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fold_dfg", 1, 1, 1, i); __PYX_ERR(0, 40, __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, 40, __pyx_L3_error)
}
__pyx_v_dfg = ((struct __pyx_obj_16prolothar_common_6models_22directly_follows_graph_DirectlyFollowsGraph *)values[0]);
}
goto __pyx_L6_skip;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("fold_dfg", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 40, __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.pattern.singleton.Singleton.fold_dfg", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dfg), __pyx_mstate_global->__pyx_ptype_16prolothar_common_6models_22directly_follows_graph_DirectlyFollowsGraph, 1, "dfg", 0))) __PYX_ERR(0, 40, __pyx_L1_error)
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_4fold_dfg(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self), __pyx_v_dfg);
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_7pattern_9singleton_9Singleton_4fold_dfg(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, struct __pyx_obj_16prolothar_common_6models_22directly_follows_graph_DirectlyFollowsGraph *__pyx_v_dfg) {
PyObject *__pyx_r = NULL;
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_fold_dfg(__pyx_v_self, __pyx_v_dfg, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __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.pattern.singleton.Singleton.fold_dfg", __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_7pattern_9singleton_9Singleton_5fold_dfg, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton_fold_dfg, 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, 40, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_fold_dfg, __pyx_t_3) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
041: #singleton cannot folder more than one node...
042: pass
043:
+044: cpdef bint contains_activity(self, str activity):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_7contains_activity(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_7pattern_9singleton_9Singleton_contains_activity(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, PyObject *__pyx_v_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_7pattern_9singleton_Singleton &&
__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_contains_activity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_7contains_activity)) {
__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, 44, __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, 44, __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.pattern.singleton.Singleton.contains_activity", __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_7pattern_9singleton_9Singleton_7contains_activity(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_7pattern_9singleton_9Singleton_7contains_activity = {"contains_activity", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_7contains_activity, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_7contains_activity(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("contains_activity (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, 44, __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, 44, __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, "contains_activity", 0) < 0) __PYX_ERR(0, 44, __pyx_L3_error)
for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("contains_activity", 1, 1, 1, i); __PYX_ERR(0, 44, __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, 44, __pyx_L3_error)
}
__pyx_v_activity = ((PyObject*)values[0]);
}
goto __pyx_L6_skip;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("contains_activity", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 44, __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.pattern.singleton.Singleton.contains_activity", __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, 44, __pyx_L1_error)
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_6contains_activity(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__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_7pattern_9singleton_9Singleton_6contains_activity(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__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_7pattern_9singleton_9Singleton_contains_activity(__pyx_v_self, __pyx_v_activity, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 44, __pyx_L1_error)
__pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __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.pattern.singleton.Singleton.contains_activity", __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_7pattern_9singleton_9Singleton_7contains_activity, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton_contains_activity, 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_3)) __PYX_ERR(0, 44, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_contains_activity, __pyx_t_3) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+045: return self.activity == activity
__pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_self->activity, __pyx_v_activity, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 45, __pyx_L1_error) __pyx_r = __pyx_t_6; goto __pyx_L0;
046:
+047: cpdef str get_activity_name(self):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_9get_activity_name(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_7pattern_9singleton_9Singleton_get_activity_name(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, int __pyx_skip_dispatch) {
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_7pattern_9singleton_Singleton &&
__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_activity_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_9get_activity_name)) {
__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, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 47, __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.pattern.singleton.Singleton.get_activity_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_9get_activity_name(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_7pattern_9singleton_9Singleton_9get_activity_name = {"get_activity_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_9get_activity_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_9get_activity_name(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_activity_name (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_activity_name", 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_activity_name", __pyx_kwds); return NULL;}
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_8get_activity_name(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_8get_activity_name(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_get_activity_name(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __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.pattern.singleton.Singleton.get_activity_name", __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_7pattern_9singleton_9Singleton_9get_activity_name, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton_get_activity_name, 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_3)) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_get_activity_name, __pyx_t_3) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+048: return self.activity
__Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->activity); __pyx_r = __pyx_v_self->activity; goto __pyx_L0;
049:
+050: def _generate_activity_name(self) -> str:
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_11_generate_activity_name(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_7pattern_9singleton_9Singleton_11_generate_activity_name = {"_generate_activity_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_11_generate_activity_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_11_generate_activity_name(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("_generate_activity_name (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("_generate_activity_name", 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("_generate_activity_name", __pyx_kwds); return NULL;}
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_10_generate_activity_name(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_10_generate_activity_name(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self) {
PyObject *__pyx_r = NULL;
/* … */
/* function exit code */
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* … */
__pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_str) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_11_generate_activity_name, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton__generate_activity_nam, 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, 50, __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_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_generate_activity_name, __pyx_t_2) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+051: return self.activity
__Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->activity); __pyx_r = __pyx_v_self->activity; goto __pyx_L0;
052:
+053: cpdef set get_activity_set(self):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_13get_activity_set(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_7pattern_9singleton_9Singleton_get_activity_set(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, int __pyx_skip_dispatch) {
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_7pattern_9singleton_Singleton &&
__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_activity_set); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_13get_activity_set)) {
__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, 53, __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, 53, __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.pattern.singleton.Singleton.get_activity_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_13get_activity_set(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_7pattern_9singleton_9Singleton_13get_activity_set = {"get_activity_set", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_13get_activity_set, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_13get_activity_set(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_activity_set (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_activity_set", 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_activity_set", __pyx_kwds); return NULL;}
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_12get_activity_set(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_12get_activity_set(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_get_activity_set(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __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.pattern.singleton.Singleton.get_activity_set", __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_7pattern_9singleton_9Singleton_13get_activity_set, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton_get_activity_set, 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, 53, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_get_activity_set, __pyx_t_2) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+054: return set([self.activity])
__Pyx_XDECREF(__pyx_r); __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PySet_Add(__pyx_t_1, __pyx_v_self->activity) < 0) __PYX_ERR(0, 54, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0;
055:
+056: def get_nr_of_subpatterns(self) -> int:
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_15get_nr_of_subpatterns(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_7pattern_9singleton_9Singleton_15get_nr_of_subpatterns = {"get_nr_of_subpatterns", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_15get_nr_of_subpatterns, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_15get_nr_of_subpatterns(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_nr_of_subpatterns (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_nr_of_subpatterns", 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_nr_of_subpatterns", __pyx_kwds); return NULL;}
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_14get_nr_of_subpatterns(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_14get_nr_of_subpatterns(CYTHON_UNUSED struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self) {
PyObject *__pyx_r = NULL;
/* … */
/* function exit code */
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* … */
__pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < 0) __PYX_ERR(0, 56, __pyx_L1_error)
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_15get_nr_of_subpatterns, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton_get_nr_of_subpatterns, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_get_nr_of_subpatterns, __pyx_t_3) < 0) __PYX_ERR(0, 56, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+057: return 0
__Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_r = __pyx_mstate_global->__pyx_int_0; goto __pyx_L0;
058:
+059: cpdef list get_subpatterns(self):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_17get_subpatterns(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_7pattern_9singleton_9Singleton_get_subpatterns(CYTHON_UNUSED struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, int __pyx_skip_dispatch) {
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_7pattern_9singleton_Singleton &&
__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_subpatterns); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_17get_subpatterns)) {
__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, 59, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 59, __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.pattern.singleton.Singleton.get_subpatterns", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_17get_subpatterns(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_7pattern_9singleton_9Singleton_17get_subpatterns = {"get_subpatterns", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_17get_subpatterns, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_17get_subpatterns(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_subpatterns (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_subpatterns", 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_subpatterns", __pyx_kwds); return NULL;}
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_16get_subpatterns(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_16get_subpatterns(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_get_subpatterns(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __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.pattern.singleton.Singleton.get_subpatterns", __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_7pattern_9singleton_9Singleton_17get_subpatterns, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton_get_subpatterns, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_get_subpatterns, __pyx_t_3) < 0) __PYX_ERR(0, 59, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+060: return []
__Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0;
061:
062:
+063: cpdef list get_start_subpatterns(self):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_19get_start_subpatterns(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_7pattern_9singleton_9Singleton_get_start_subpatterns(CYTHON_UNUSED struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, int __pyx_skip_dispatch) {
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_7pattern_9singleton_Singleton &&
__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_start_subpatterns); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_19get_start_subpatterns)) {
__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, 63, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 63, __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.pattern.singleton.Singleton.get_start_subpatterns", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_19get_start_subpatterns(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_7pattern_9singleton_9Singleton_19get_start_subpatterns = {"get_start_subpatterns", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_19get_start_subpatterns, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_19get_start_subpatterns(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_start_subpatterns (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_start_subpatterns", 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_start_subpatterns", __pyx_kwds); return NULL;}
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_18get_start_subpatterns(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_18get_start_subpatterns(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_get_start_subpatterns(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __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.pattern.singleton.Singleton.get_start_subpatterns", __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_7pattern_9singleton_9Singleton_19get_start_subpatterns, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton_get_start_subpatterns, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_get_start_subpatterns, __pyx_t_3) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+064: return []
__Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0;
065:
+066: cpdef list get_end_subpatterns(self):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_21get_end_subpatterns(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_7pattern_9singleton_9Singleton_get_end_subpatterns(CYTHON_UNUSED struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, int __pyx_skip_dispatch) {
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_7pattern_9singleton_Singleton &&
__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_end_subpatterns); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_21get_end_subpatterns)) {
__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, 66, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 66, __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.pattern.singleton.Singleton.get_end_subpatterns", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_21get_end_subpatterns(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_7pattern_9singleton_9Singleton_21get_end_subpatterns = {"get_end_subpatterns", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_21get_end_subpatterns, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_21get_end_subpatterns(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_end_subpatterns (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_end_subpatterns", 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_end_subpatterns", __pyx_kwds); return NULL;}
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_20get_end_subpatterns(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_20get_end_subpatterns(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_get_end_subpatterns(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __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.pattern.singleton.Singleton.get_end_subpatterns", __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_7pattern_9singleton_9Singleton_21get_end_subpatterns, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton_get_end_subpatterns, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_get_end_subpatterns, __pyx_t_3) < 0) __PYX_ERR(0, 66, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+067: return []
__Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0;
068:
+069: cpdef tuple get_encoded_length_in_code_table(self, frozenset available_activities):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_23get_encoded_length_in_code_table(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_7pattern_9singleton_9Singleton_get_encoded_length_in_code_table(CYTHON_UNUSED struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, PyObject *__pyx_v_available_activities, int __pyx_skip_dispatch) {
PyObject *__pyx_v_code_length = NULL;
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_7pattern_9singleton_Singleton &&
__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_encoded_length_in_code_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_23get_encoded_length_in_code_table)) {
__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, __pyx_v_available_activities};
__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, 69, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_2))) __PYX_ERR(0, 69, __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.pattern.singleton.Singleton.get_encoded_length_in_code_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_code_length);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_23get_encoded_length_in_code_table(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_7pattern_9singleton_9Singleton_23get_encoded_length_in_code_table = {"get_encoded_length_in_code_table", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_23get_encoded_length_in_code_table, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_23get_encoded_length_in_code_table(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_available_activities = 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("get_encoded_length_in_code_table (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_available_activities,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, 69, __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, 69, __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, "get_encoded_length_in_code_table", 0) < 0) __PYX_ERR(0, 69, __pyx_L3_error)
for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_encoded_length_in_code_table", 1, 1, 1, i); __PYX_ERR(0, 69, __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, 69, __pyx_L3_error)
}
__pyx_v_available_activities = ((PyObject*)values[0]);
}
goto __pyx_L6_skip;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("get_encoded_length_in_code_table", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 69, __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.pattern.singleton.Singleton.get_encoded_length_in_code_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_available_activities), (&PyFrozenSet_Type), 1, "available_activities", 1))) __PYX_ERR(0, 69, __pyx_L1_error)
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_22get_encoded_length_in_code_table(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self), __pyx_v_available_activities);
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_7pattern_9singleton_9Singleton_22get_encoded_length_in_code_table(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, PyObject *__pyx_v_available_activities) {
PyObject *__pyx_r = NULL;
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_get_encoded_length_in_code_table(__pyx_v_self, __pyx_v_available_activities, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __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.pattern.singleton.Singleton.get_encoded_length_in_code_table", __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_7pattern_9singleton_9Singleton_23get_encoded_length_in_code_table, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton_get_encoded_length_in, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_get_encoded_length_in_code_table, __pyx_t_3) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+070: code_length = log2(len(available_activities))
__pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_log2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__pyx_v_available_activities == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(0, 70, __pyx_L1_error) } __pyx_t_6 = __Pyx_PySet_GET_SIZE(__pyx_v_available_activities); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 70, __pyx_L1_error) __pyx_t_3 = PyLong_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; __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_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_code_length = __pyx_t_1; __pyx_t_1 = 0;
+071: return code_length, available_activities
__Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_code_length); __Pyx_GIVEREF(__pyx_v_code_length); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_code_length) != (0)) __PYX_ERR(0, 71, __pyx_L1_error); __Pyx_INCREF(__pyx_v_available_activities); __Pyx_GIVEREF(__pyx_v_available_activities); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_available_activities) != (0)) __PYX_ERR(0, 71, __pyx_L1_error); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0;
072:
+073: cpdef CoveringPattern for_covering(self, trace, str last_covered_activity):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_25for_covering(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 struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *__pyx_f_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_for_covering(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, PyObject *__pyx_v_trace, PyObject *__pyx_v_last_covered_activity, int __pyx_skip_dispatch) {
struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *__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_7pattern_9singleton_Singleton &&
__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_for_covering); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_25for_covering)) {
__Pyx_XDECREF((PyObject *)__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[3] = {__pyx_t_3, __pyx_v_trace, __pyx_v_last_covered_activity};
__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__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, 73, __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, 73, __pyx_L1_error)
__pyx_r = ((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;
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.pattern.singleton.Singleton.for_covering", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF((PyObject *)__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_25for_covering(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_7pattern_9singleton_9Singleton_25for_covering = {"for_covering", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_25for_covering, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_25for_covering(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_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("for_covering (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_trace,&__pyx_mstate_global->__pyx_n_u_last_covered_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, 73, __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, 73, __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, 73, __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, "for_covering", 0) < 0) __PYX_ERR(0, 73, __pyx_L3_error)
for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("for_covering", 1, 2, 2, i); __PYX_ERR(0, 73, __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, 73, __pyx_L3_error)
values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 73, __pyx_L3_error)
}
__pyx_v_trace = values[0];
__pyx_v_last_covered_activity = ((PyObject*)values[1]);
}
goto __pyx_L6_skip;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("for_covering", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 73, __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.pattern.singleton.Singleton.for_covering", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_last_covered_activity), (&PyUnicode_Type), 1, "last_covered_activity", 1))) __PYX_ERR(0, 73, __pyx_L1_error)
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_24for_covering(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self), __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_7pattern_9singleton_9Singleton_24for_covering(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, PyObject *__pyx_v_trace, PyObject *__pyx_v_last_covered_activity) {
PyObject *__pyx_r = NULL;
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = ((PyObject *)__pyx_f_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_for_covering(__pyx_v_self, __pyx_v_trace, __pyx_v_last_covered_activity, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __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.pattern.singleton.Singleton.for_covering", __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_7pattern_9singleton_9Singleton_25for_covering, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton_for_covering, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 73, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_for_covering, __pyx_t_3) < 0) __PYX_ERR(0, 73, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+074: return CoveringSingleton(self, trace, last_covered_activity)
__Pyx_XDECREF((PyObject *)__pyx_r); __pyx_t_2 = NULL; __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_18covering_singleton_CoveringSingleton); __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_18covering_singleton_CoveringSingleton); __pyx_t_5 = 1; { PyObject *__pyx_callargs[4] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_trace, __pyx_v_last_covered_activity}; __pyx_t_1 = __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_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); } __pyx_r = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0;
075:
+076: def add_subpatterns_to_nested_graph(self, graph: NestedGraph, base_id: str):
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_27add_subpatterns_to_nested_graph(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_7pattern_9singleton_9Singleton_27add_subpatterns_to_nested_graph = {"add_subpatterns_to_nested_graph", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_27add_subpatterns_to_nested_graph, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_27add_subpatterns_to_nested_graph(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
) {
CYTHON_UNUSED PyObject *__pyx_v_graph = 0;
CYTHON_UNUSED PyObject *__pyx_v_base_id = 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("add_subpatterns_to_nested_graph (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_graph,&__pyx_mstate_global->__pyx_n_u_base_id,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, 76, __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, 76, __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, 76, __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, "add_subpatterns_to_nested_graph", 0) < 0) __PYX_ERR(0, 76, __pyx_L3_error)
for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_subpatterns_to_nested_graph", 1, 2, 2, i); __PYX_ERR(0, 76, __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, 76, __pyx_L3_error)
values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 76, __pyx_L3_error)
}
__pyx_v_graph = values[0];
__pyx_v_base_id = ((PyObject*)values[1]);
}
goto __pyx_L6_skip;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("add_subpatterns_to_nested_graph", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 76, __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.pattern.singleton.Singleton.add_subpatterns_to_nested_graph", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_base_id), (&PyUnicode_Type), 0, "base_id", 2))) __PYX_ERR(0, 76, __pyx_L1_error)
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_26add_subpatterns_to_nested_graph(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self), __pyx_v_graph, __pyx_v_base_id);
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_7pattern_9singleton_9Singleton_26add_subpatterns_to_nested_graph(CYTHON_UNUSED struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_graph, CYTHON_UNUSED PyObject *__pyx_v_base_id) {
PyObject *__pyx_r = NULL;
/* function exit code */
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* … */
__pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_graph, __pyx_mstate_global->__pyx_n_u_NestedGraph) < 0) __PYX_ERR(0, 76, __pyx_L1_error)
if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_base_id, __pyx_mstate_global->__pyx_n_u_str) < 0) __PYX_ERR(0, 76, __pyx_L1_error)
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_27add_subpatterns_to_nested_graph, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton_add_subpatterns_to_nes, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __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_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_add_subpatterns_to_nested_graph, __pyx_t_2) < 0) __PYX_ERR(0, 76, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
077: pass
078:
+079: def _without_degeneration(self):
/* Python wrapper */ static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_29_without_degeneration(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_7pattern_9singleton_9Singleton_28_without_degeneration, " a singleton can never be degenerated\n "); static PyMethodDef __pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_29_without_degeneration = {"_without_degeneration", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_29_without_degeneration, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_28_without_degeneration}; static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_29_without_degeneration(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("_without_degeneration (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("_without_degeneration", 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("_without_degeneration", __pyx_kwds); return NULL;} __pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_28_without_degeneration(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_28_without_degeneration(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self) { PyObject *__pyx_r = NULL; /* … */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.pattern.singleton.Singleton._without_degeneration", __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_7pattern_9singleton_9Singleton_29_without_degeneration, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton__without_degeneration, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_without_degeneration, __pyx_t_2) < 0) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
080: """ a singleton can never be degenerated
081: """
+082: return self, False
__Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF((PyObject *)__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_v_self); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(0, 82, __pyx_L1_error); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, Py_False) != (0)) __PYX_ERR(0, 82, __pyx_L1_error); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0;
083:
+084: def without_degeneration(self):
/* Python wrapper */ static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_31without_degeneration(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_7pattern_9singleton_9Singleton_30without_degeneration, " a singleton can never be degenerated\n "); static PyMethodDef __pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_31without_degeneration = {"without_degeneration", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_31without_degeneration, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_30without_degeneration}; static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_31without_degeneration(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("without_degeneration (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("without_degeneration", 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("without_degeneration", __pyx_kwds); return NULL;} __pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_30without_degeneration(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_30without_degeneration(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self) { PyObject *__pyx_r = NULL; /* … */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.pattern.singleton.Singleton.without_degeneration", __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_7pattern_9singleton_9Singleton_31without_degeneration, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton_without_degeneration, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_without_degeneration_2, __pyx_t_2) < 0) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
085: """ a singleton can never be degenerated
086: """
+087: return self, False
__Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF((PyObject *)__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_v_self); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(0, 87, __pyx_L1_error); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, Py_False) != (0)) __PYX_ERR(0, 87, __pyx_L1_error); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0;
088:
+089: def _merge_subpatterns(self):
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_33_merge_subpatterns(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_7pattern_9singleton_9Singleton_33_merge_subpatterns = {"_merge_subpatterns", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_33_merge_subpatterns, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_33_merge_subpatterns(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("_merge_subpatterns (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("_merge_subpatterns", 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("_merge_subpatterns", __pyx_kwds); return NULL;}
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_32_merge_subpatterns(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_32_merge_subpatterns(CYTHON_UNUSED struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self) {
PyObject *__pyx_r = NULL;
/* … */
/* function exit code */
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* … */
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_33_merge_subpatterns, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton__merge_subpatterns, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); 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_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_merge_subpatterns, __pyx_t_2) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
090: # a singleton has no subpatterns to merge
+091: return False
__Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0;
092:
+093: def _remove_activity(self, activity: str):
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_35_remove_activity(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_7pattern_9singleton_9Singleton_35_remove_activity = {"_remove_activity", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_35_remove_activity, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_35_remove_activity(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("_remove_activity (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, 93, __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, 93, __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, "_remove_activity", 0) < 0) __PYX_ERR(0, 93, __pyx_L3_error)
for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_remove_activity", 1, 1, 1, i); __PYX_ERR(0, 93, __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, 93, __pyx_L3_error)
}
__pyx_v_activity = ((PyObject*)values[0]);
}
goto __pyx_L6_skip;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("_remove_activity", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 93, __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.pattern.singleton.Singleton._remove_activity", __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), 0, "activity", 2))) __PYX_ERR(0, 93, __pyx_L1_error)
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_34_remove_activity(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__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_7pattern_9singleton_9Singleton_34_remove_activity(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, PyObject *__pyx_v_activity) {
PyObject *__pyx_r = NULL;
/* … */
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.pattern.singleton.Singleton._remove_activity", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* … */
__pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_activity, __pyx_mstate_global->__pyx_n_u_str) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_35_remove_activity, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton__remove_activity, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_remove_activity, __pyx_t_3) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+094: if self.activity == activity:
__pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->activity, __pyx_v_activity, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 94, __pyx_L1_error) if (unlikely(__pyx_t_1)) { /* … */ }
+095: raise ValueError('empty singletons are not allowed')
__pyx_t_3 = NULL;
__Pyx_INCREF(__pyx_builtin_ValueError);
__pyx_t_4 = __pyx_builtin_ValueError;
__pyx_t_5 = 1;
{
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_empty_singletons_are_not_allowed};
__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, 95, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__PYX_ERR(0, 95, __pyx_L1_error)
+096: return False
__Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0;
097:
+098: cpdef Pattern _copy(self):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_37_copy(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 struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *__pyx_f_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton__copy(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, int __pyx_skip_dispatch) {
struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *__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_7pattern_9singleton_Singleton &&
__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_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_37_copy)) {
__Pyx_XDECREF((PyObject *)__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, 98, __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_7pattern_7pattern_Pattern))))) __PYX_ERR(0, 98, __pyx_L1_error)
__pyx_r = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *)__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.pattern.singleton.Singleton._copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF((PyObject *)__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_37_copy(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_7pattern_9singleton_9Singleton_37_copy = {"_copy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_37_copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_37_copy(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("_copy (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("_copy", 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("_copy", __pyx_kwds); return NULL;}
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_36_copy(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_36_copy(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = ((PyObject *)__pyx_f_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton__copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __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.pattern.singleton.Singleton._copy", __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_7pattern_9singleton_9Singleton_37_copy, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton__copy, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_copy, __pyx_t_3) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+099: return Singleton(self.activity)
__Pyx_XDECREF((PyObject *)__pyx_r); __pyx_t_2 = NULL; __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton); __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton); __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_self->activity}; __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_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); } __pyx_r = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0;
100:
+101: def add_to_petri_net(self, petri_net: DataPetriNet):
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_39add_to_petri_net(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_7pattern_9singleton_9Singleton_39add_to_petri_net = {"add_to_petri_net", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_39add_to_petri_net, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_39add_to_petri_net(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_petri_net = 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("add_to_petri_net (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_petri_net,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, 101, __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, 101, __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, "add_to_petri_net", 0) < 0) __PYX_ERR(0, 101, __pyx_L3_error)
for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_to_petri_net", 1, 1, 1, i); __PYX_ERR(0, 101, __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, 101, __pyx_L3_error)
}
__pyx_v_petri_net = values[0];
}
goto __pyx_L6_skip;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("add_to_petri_net", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 101, __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.pattern.singleton.Singleton.add_to_petri_net", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_38add_to_petri_net(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self), __pyx_v_petri_net);
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
/* function exit code */
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_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_38add_to_petri_net(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, PyObject *__pyx_v_petri_net) {
PyObject *__pyx_v_activity_name = NULL;
PyObject *__pyx_v_transition = NULL;
PyObject *__pyx_v_pre_place = NULL;
PyObject *__pyx_v_post_place = NULL;
PyObject *__pyx_r = NULL;
/* … */
/* 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_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.pattern.singleton.Singleton.add_to_petri_net", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_activity_name);
__Pyx_XDECREF(__pyx_v_transition);
__Pyx_XDECREF(__pyx_v_pre_place);
__Pyx_XDECREF(__pyx_v_post_place);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* … */
__pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 101, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_petri_net, __pyx_mstate_global->__pyx_n_u_DataPetriNet) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_39add_to_petri_net, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton_add_to_petri_net, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __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_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_add_to_petri_net, __pyx_t_2) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+102: activity_name = self.get_activity_name()
__pyx_t_1 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.get_activity_name(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_activity_name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0;
+103: transition = petri_net.add_transition(Transition(activity_name))
__pyx_t_2 = __pyx_v_petri_net; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Transition); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_activity_name}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__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, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_add_transition, __pyx_callargs+__pyx_t_6, (2-__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, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_transition = __pyx_t_1; __pyx_t_1 = 0;
+104: pre_place = petri_net.add_place(Place.with_empty_label(
__pyx_t_3 = __pyx_v_petri_net; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Place); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_with_empty_label); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+105: '__pre__' + activity_name))
__pyx_t_4 = __Pyx_PyUnicode_ConcatSafe(__pyx_mstate_global->__pyx_n_u_pre, __pyx_v_activity_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_add_place, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_pre_place = __pyx_t_1; __pyx_t_1 = 0;
+106: post_place = petri_net.add_place(Place.with_empty_label(
__pyx_t_2 = __pyx_v_petri_net; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Place); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_with_empty_label); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+107: '__post__' + activity_name))
__pyx_t_4 = __Pyx_PyUnicode_ConcatSafe(__pyx_mstate_global->__pyx_n_u_post, __pyx_v_activity_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_4}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_add_place, __pyx_callargs+__pyx_t_6, (2-__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, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_post_place = __pyx_t_1; __pyx_t_1 = 0;
+108: petri_net.add_connection(pre_place, transition, post_place)
__pyx_t_3 = __pyx_v_petri_net; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_pre_place, __pyx_v_transition, __pyx_v_post_place}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_add_connection, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+109: return pre_place, post_place
__Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_pre_place); __Pyx_GIVEREF(__pyx_v_pre_place); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_pre_place) != (0)) __PYX_ERR(0, 109, __pyx_L1_error); __Pyx_INCREF(__pyx_v_post_place); __Pyx_GIVEREF(__pyx_v_post_place); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_post_place) != (0)) __PYX_ERR(0, 109, __pyx_L1_error); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0;
110:
+111: def _replace_singleton(self, activity: str, pattern: Pattern) -> Pattern:
/* Python wrapper */
static struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_41_replace_singleton(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_7pattern_9singleton_9Singleton_41_replace_singleton = {"_replace_singleton", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_41_replace_singleton, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_41_replace_singleton(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;
struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *__pyx_v_pattern = 0;
#if !CYTHON_METH_FASTCALL
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
#endif
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_replace_singleton (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,&__pyx_mstate_global->__pyx_n_u_pattern,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, 111, __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, 111, __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, 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, "_replace_singleton", 0) < 0) __PYX_ERR(0, 111, __pyx_L3_error)
for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_replace_singleton", 1, 2, 2, i); __PYX_ERR(0, 111, __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, 111, __pyx_L3_error)
values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 111, __pyx_L3_error)
}
__pyx_v_activity = ((PyObject*)values[0]);
__pyx_v_pattern = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *)values[1]);
}
goto __pyx_L6_skip;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("_replace_singleton", 1, 2, 2, __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.pattern.singleton.Singleton._replace_singleton", __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), 0, "activity", 2))) __PYX_ERR(0, 111, __pyx_L1_error)
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pattern), __pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern, 0, "pattern", 0))) __PYX_ERR(0, 111, __pyx_L1_error)
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_40_replace_singleton(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self), __pyx_v_activity, __pyx_v_pattern);
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 struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_40_replace_singleton(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, PyObject *__pyx_v_activity, struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *__pyx_v_pattern) {
struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *__pyx_r = NULL;
/* … */
/* function exit code */
__pyx_L1_error:;
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.pattern.singleton.Singleton._replace_singleton", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF((PyObject *)__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* … */
__pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_activity, __pyx_mstate_global->__pyx_n_u_str) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pattern, __pyx_mstate_global->__pyx_n_u_Pattern) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Pattern) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_41_replace_singleton, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton__replace_singleton, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_replace_singleton, __pyx_t_3) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+112: if activity == self.activity:
__pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_activity, __pyx_v_self->activity, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 112, __pyx_L1_error) if (__pyx_t_1) { /* … */ }
+113: return pattern
__Pyx_XDECREF((PyObject *)__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_pattern); __pyx_r = __pyx_v_pattern; goto __pyx_L0;
114: else:
+115: return self
/*else*/ {
__Pyx_XDECREF((PyObject *)__pyx_r);
__Pyx_INCREF((PyObject *)__pyx_v_self);
__pyx_r = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *)__pyx_v_self);
goto __pyx_L0;
}
116:
+117: def _replace_direct_subpattern(self, subpattern: Pattern,
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_43_replace_direct_subpattern(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_7pattern_9singleton_9Singleton_43_replace_direct_subpattern = {"_replace_direct_subpattern", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_43_replace_direct_subpattern, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_43_replace_direct_subpattern(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
) {
CYTHON_UNUSED struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *__pyx_v_subpattern = 0;
CYTHON_UNUSED struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *__pyx_v_replacement = 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("_replace_direct_subpattern (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_subpattern,&__pyx_mstate_global->__pyx_n_u_replacement,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, 117, __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, 117, __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, 117, __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, "_replace_direct_subpattern", 0) < 0) __PYX_ERR(0, 117, __pyx_L3_error)
for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_replace_direct_subpattern", 1, 2, 2, i); __PYX_ERR(0, 117, __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, 117, __pyx_L3_error)
values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 117, __pyx_L3_error)
}
__pyx_v_subpattern = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *)values[0]);
__pyx_v_replacement = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *)values[1]);
}
goto __pyx_L6_skip;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("_replace_direct_subpattern", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 117, __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.pattern.singleton.Singleton._replace_direct_subpattern", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subpattern), __pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern, 0, "subpattern", 0))) __PYX_ERR(0, 117, __pyx_L1_error)
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_replacement), __pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern, 0, "replacement", 0))) __PYX_ERR(0, 118, __pyx_L1_error)
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_42_replace_direct_subpattern(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self), __pyx_v_subpattern, __pyx_v_replacement);
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_7pattern_9singleton_9Singleton_42_replace_direct_subpattern(CYTHON_UNUSED struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *__pyx_v_subpattern, CYTHON_UNUSED struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *__pyx_v_replacement) {
PyObject *__pyx_r = NULL;
/* … */
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.pattern.singleton.Singleton._replace_direct_subpattern", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* … */
__pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 117, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_subpattern, __pyx_mstate_global->__pyx_n_u_Pattern) < 0) __PYX_ERR(0, 117, __pyx_L1_error)
if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_replacement, __pyx_mstate_global->__pyx_n_u_Pattern) < 0) __PYX_ERR(0, 117, __pyx_L1_error)
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_43_replace_direct_subpattern, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton__replace_direct_subpat, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __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_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_replace_direct_subpattern, __pyx_t_2) < 0) __PYX_ERR(0, 117, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
118: replacement: Pattern):
+119: raise ValueError()
__pyx_t_2 = NULL; __Pyx_INCREF(__pyx_builtin_ValueError); __pyx_t_3 = __pyx_builtin_ValueError; __pyx_t_4 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__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, 119, __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, 119, __pyx_L1_error)
120:
+121: def get_nr_of_forbidden_edges_in_pattern_dfg(
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_45get_nr_of_forbidden_edges_in_pattern_dfg(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_7pattern_9singleton_9Singleton_45get_nr_of_forbidden_edges_in_pattern_dfg = {"get_nr_of_forbidden_edges_in_pattern_dfg", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_45get_nr_of_forbidden_edges_in_pattern_dfg, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_45get_nr_of_forbidden_edges_in_pattern_dfg(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
) {
CYTHON_UNUSED struct __pyx_obj_16prolothar_common_6models_22directly_follows_graph_DirectlyFollowsGraph *__pyx_v_pattern_dfg = 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("get_nr_of_forbidden_edges_in_pattern_dfg (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_pattern_dfg,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, 121, __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, 121, __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, "get_nr_of_forbidden_edges_in_pattern_dfg", 0) < 0) __PYX_ERR(0, 121, __pyx_L3_error)
for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_nr_of_forbidden_edges_in_pattern_dfg", 1, 1, 1, i); __PYX_ERR(0, 121, __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, 121, __pyx_L3_error)
}
__pyx_v_pattern_dfg = ((struct __pyx_obj_16prolothar_common_6models_22directly_follows_graph_DirectlyFollowsGraph *)values[0]);
}
goto __pyx_L6_skip;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("get_nr_of_forbidden_edges_in_pattern_dfg", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 121, __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.pattern.singleton.Singleton.get_nr_of_forbidden_edges_in_pattern_dfg", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pattern_dfg), __pyx_mstate_global->__pyx_ptype_16prolothar_common_6models_22directly_follows_graph_DirectlyFollowsGraph, 0, "pattern_dfg", 0))) __PYX_ERR(0, 122, __pyx_L1_error)
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_44get_nr_of_forbidden_edges_in_pattern_dfg(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self), __pyx_v_pattern_dfg);
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_7pattern_9singleton_9Singleton_44get_nr_of_forbidden_edges_in_pattern_dfg(CYTHON_UNUSED struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_16prolothar_common_6models_22directly_follows_graph_DirectlyFollowsGraph *__pyx_v_pattern_dfg) {
PyObject *__pyx_r = NULL;
/* … */
/* function exit code */
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* … */
__pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pattern_dfg, __pyx_mstate_global->__pyx_n_u_DirectlyFollowsGraph) < 0) __PYX_ERR(0, 121, __pyx_L1_error)
if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < 0) __PYX_ERR(0, 121, __pyx_L1_error)
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_45get_nr_of_forbidden_edges_in_pattern_dfg, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton_get_nr_of_forbidden_ed, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_get_nr_of_forbidden_edges_in_pat, __pyx_t_3) < 0) __PYX_ERR(0, 121, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
122: self, pattern_dfg: DirectlyFollowsGraph) -> int:
+123: return 0
__Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_r = __pyx_mstate_global->__pyx_int_0; goto __pyx_L0;
124:
+125: def _start_activities(self) -> Set[str]:
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_47_start_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_7pattern_9singleton_9Singleton_47_start_activities = {"_start_activities", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_47_start_activities, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_47_start_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("_start_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("_start_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("_start_activities", __pyx_kwds); return NULL;}
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_46_start_activities(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_46_start_activities(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self) {
PyObject *__pyx_r = NULL;
/* … */
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.pattern.singleton.Singleton._start_activities", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* … */
__pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 125, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_Set_str) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_47_start_activities, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton__start_activities, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __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_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_start_activities, __pyx_t_2) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+126: return set([self.activity])
__Pyx_XDECREF(__pyx_r); __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PySet_Add(__pyx_t_1, __pyx_v_self->activity) < 0) __PYX_ERR(0, 126, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0;
127:
+128: def _end_activities(self) -> Set[str]:
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_49_end_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_7pattern_9singleton_9Singleton_49_end_activities = {"_end_activities", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_49_end_activities, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_49_end_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("_end_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("_end_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("_end_activities", __pyx_kwds); return NULL;}
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_48_end_activities(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_48_end_activities(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self) {
PyObject *__pyx_r = NULL;
/* … */
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.pattern.singleton.Singleton._end_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_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_Set_str) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_49_end_activities, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton__end_activities, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_end_activities, __pyx_t_3) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+129: return set([self.activity])
__Pyx_XDECREF(__pyx_r); __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PySet_Add(__pyx_t_1, __pyx_v_self->activity) < 0) __PYX_ERR(0, 129, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0;
130:
+131: def generate_activities(self, random: Random = None) -> List[str]:
/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_51generate_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_7pattern_9singleton_9Singleton_51generate_activities = {"generate_activities", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_51generate_activities, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_51generate_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
) {
CYTHON_UNUSED PyObject *__pyx_v_random = 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("generate_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);
{
PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_random,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, 131, __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, 131, __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, "generate_activities", 0) < 0) __PYX_ERR(0, 131, __pyx_L3_error)
if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
} else {
switch (__pyx_nargs) {
case 1:
values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 131, __pyx_L3_error)
CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
}
__pyx_v_random = values[0];
}
goto __pyx_L6_skip;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("generate_activities", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 131, __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.pattern.singleton.Singleton.generate_activities", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_50generate_activities(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *)__pyx_v_self), __pyx_v_random);
/* function exit code */
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_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_50generate_activities(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_Singleton *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_random) {
PyObject *__pyx_r = NULL;
/* … */
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.pattern.singleton.Singleton.generate_activities", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* … */
__pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_random, __pyx_mstate_global->__pyx_n_u_Random) < 0) __PYX_ERR(0, 131, __pyx_L1_error)
if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_List_str) < 0) __PYX_ERR(0, 131, __pyx_L1_error)
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_7pattern_9singleton_9Singleton_51generate_activities, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Singleton_generate_activities, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[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_7pattern_9singleton_Singleton, __pyx_mstate_global->__pyx_n_u_generate_activities, __pyx_t_2) < 0) __PYX_ERR(0, 131, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+132: return [self.activity]
__Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->activity); __Pyx_GIVEREF(__pyx_v_self->activity); if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->activity) != (0)) __PYX_ERR(0, 132, __pyx_L1_error); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0;