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: cover.cpp

+001: '''
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_3) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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.eventlog import EventLog
  __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_EventLog); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_prolothar_common_models_eventlog, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_EventLog); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_EventLog, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 019: from prolothar_common.models.dfg.edge cimport Edge
 020: 
 021: from prolothar_common cimport mdl_utils
 022: 
+023: from prolothar_process_discovery.discovery.proseqo.pattern.singleton import Singleton
  __pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_Singleton); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __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_Singleton); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Singleton, __pyx_t_3) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 024: 
+025: from typing import Set, Union, FrozenSet
  __pyx_t_2 = __Pyx_PyList_Pack(3, __pyx_mstate_global->__pyx_n_u_Set, __pyx_mstate_global->__pyx_n_u_Union, __pyx_mstate_global->__pyx_n_u_FrozenSet); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __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_Set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Set, __pyx_t_2) < 0) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Union); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Union, __pyx_t_2) < 0) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FrozenSet); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_FrozenSet, __pyx_t_2) < 0) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 026: 
+027: from more_itertools import pairwise
  __pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_pairwise); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_more_itertools, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __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_pairwise); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pairwise, __pyx_t_3) < 0) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 028: 
+029: cdef class Cover:
struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover {
  struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *(*copy_counts_only)(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *, int __pyx_skip_dispatch);
  float (*get_encoded_length_of_cover)(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_get_encoded_length_of_cover *__pyx_optional_args);
  PyObject *(*add_log_move)(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*add_skipped_pattern)(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *, struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *, struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*get_all_pattern_names)(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *, int __pyx_skip_dispatch);
  PyObject *(*get_following_activities)(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*start_trace_covering)(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *, struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *, int __pyx_skip_dispatch);
  PyObject *(*end_trace_covering)(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *, struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *, int __pyx_skip_dispatch);
  int (*can_cover_trace_with_cache)(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *, struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *, int __pyx_skip_dispatch);
  PyObject *(*use_cache_to_cover_trace)(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *, struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *, int __pyx_skip_dispatch);
  PyObject *(*get_activity_set)(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *, int __pyx_skip_dispatch);
  struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_11pattern_dfg_PatternDfg *(*get_pattern_dfg_with_restored_counts)(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_vtabptr_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover;
+030:     def __init__(self, pattern_dfg: PatternDfg, activity_set: Union[Set[str],FrozenSet[str]],
/* Python wrapper */
static int __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_11pattern_dfg_PatternDfg *__pyx_v_pattern_dfg = 0;
  PyObject *__pyx_v_activity_set = 0;
  PyObject *__pyx_v_store_patterns_in_pattern_stream = 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_pattern_dfg,&__pyx_mstate_global->__pyx_n_u_activity_set,&__pyx_mstate_global->__pyx_n_u_store_patterns_in_pattern_stream,0};
  PyObject* values[3] = {0,0,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 30, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 30, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 30, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 30, __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, 30, __pyx_L3_error)
/* … */
  /* 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_5cover_5Cover___init__(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self, struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_11pattern_dfg_PatternDfg *__pyx_v_pattern_dfg, PyObject *__pyx_v_activity_set, PyObject *__pyx_v_store_patterns_in_pattern_stream) {
  PyObject *__pyx_v_possible_patterns = NULL;
  PyObject *__pyx_v_node = NULL;
  PyObject *__pyx_7genexpr__pyx_v_a = NULL;
  int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.cover.Cover.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_possible_patterns);
  __Pyx_XDECREF(__pyx_v_node);
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_a);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+031:                  store_patterns_in_pattern_stream: bool = False):
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, i); __PYX_ERR(0, 30, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 30, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 30, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 30, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False));
    }
    __pyx_v_pattern_dfg = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_11pattern_dfg_PatternDfg *)values[0]);
    __pyx_v_activity_set = values[1];
    __pyx_v_store_patterns_in_pattern_stream = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 30, __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.cover.Cover.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pattern_dfg), __pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_11pattern_dfg_PatternDfg, 0, "pattern_dfg", 0))) __PYX_ERR(0, 30, __pyx_L1_error)
  __pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover___init__(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *)__pyx_v_self), __pyx_v_pattern_dfg, __pyx_v_activity_set, __pyx_v_store_patterns_in_pattern_stream);
+032:         possible_patterns = [Singleton(a) for a in activity_set]
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_v_activity_set)) || PyTuple_CheckExact(__pyx_v_activity_set)) {
      __pyx_t_2 = __pyx_v_activity_set; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_activity_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32, __pyx_L5_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 32, __pyx_L5_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          __pyx_t_5 = __Pyx_PyList_GetItemRef(__pyx_t_2, __pyx_t_3);
          ++__pyx_t_3;
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 32, __pyx_L5_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
          #else
          __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
          #endif
          ++__pyx_t_3;
        }
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32, __pyx_L5_error)
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 32, __pyx_L5_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_a, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_Singleton); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 32, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
        assert(__pyx_t_6);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
        __pyx_t_8 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_7genexpr__pyx_v_a};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 32, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_a); __pyx_7genexpr__pyx_v_a = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_a); __pyx_7genexpr__pyx_v_a = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_v_possible_patterns = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
+033:         for node in pattern_dfg.get_nodes():
  __pyx_t_2 = ((PyObject *)__pyx_v_pattern_dfg);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_8 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_get_nodes, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 33, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_2, __pyx_t_3);
        ++__pyx_t_3;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 33, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
        #endif
        ++__pyx_t_3;
      }
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 33, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_node, __pyx_t_1);
    __pyx_t_1 = 0;
/* … */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+034:             if not node.pattern.is_singleton():
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_mstate_global->__pyx_n_u_pattern); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 34, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __pyx_t_7;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_8 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_is_singleton, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 34, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10 = (!__pyx_t_9);
    if (__pyx_t_10) {
/* … */
    }
+035:                 possible_patterns.append(node.pattern)
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_mstate_global->__pyx_n_u_pattern); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_possible_patterns, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 35, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+036:         self.pattern_stream = PatternStream(
  __pyx_t_1 = NULL;
  __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_14pattern_stream_PatternStream);
  __pyx_t_7 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_14pattern_stream_PatternStream); 
/* … */
  __Pyx_GIVEREF((PyObject *)__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->pattern_stream);
  __Pyx_DECREF((PyObject *)__pyx_v_self->pattern_stream);
  __pyx_v_self->pattern_stream = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_14pattern_stream_PatternStream *)__pyx_t_2);
  __pyx_t_2 = 0;
+037:                 store_patterns=store_patterns_in_pattern_stream)
  __pyx_t_8 = 1;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, NULL};
    __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 36, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_store_patterns, __pyx_v_store_patterns_in_pattern_stream, __pyx_t_5, __pyx_callargs+1, 0) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
    __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_7, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_2);
  }
+038:         self.meta_stream = MetaStream()
  __pyx_t_7 = NULL;
  __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_11meta_stream_MetaStream);
  __pyx_t_5 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_11meta_stream_MetaStream); 
  __pyx_t_8 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_2);
  }
  __Pyx_GIVEREF((PyObject *)__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->meta_stream);
  __Pyx_DECREF((PyObject *)__pyx_v_self->meta_stream);
  __pyx_v_self->meta_stream = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_11meta_stream_MetaStream *)__pyx_t_2);
  __pyx_t_2 = 0;
+039:         self.move_stream = MoveStream()
  __pyx_t_5 = NULL;
  __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_11move_stream_MoveStream);
  __pyx_t_7 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_11move_stream_MoveStream); 
  __pyx_t_8 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_2);
  }
  __Pyx_GIVEREF((PyObject *)__pyx_t_2);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->move_stream);
  __Pyx_DECREF((PyObject *)__pyx_v_self->move_stream);
  __pyx_v_self->move_stream = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_11move_stream_MoveStream *)__pyx_t_2);
  __pyx_t_2 = 0;
+040:         self.pattern_dfg = pattern_dfg
  __Pyx_INCREF((PyObject *)__pyx_v_pattern_dfg);
  __Pyx_GIVEREF((PyObject *)__pyx_v_pattern_dfg);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->pattern_dfg);
  __Pyx_DECREF((PyObject *)__pyx_v_self->pattern_dfg);
  __pyx_v_self->pattern_dfg = __pyx_v_pattern_dfg;
+041:         self.activity_set = frozenset(activity_set)
  __pyx_t_2 = __Pyx_PyFrozenSet_New(__pyx_v_activity_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->activity_set);
  __Pyx_DECREF(__pyx_v_self->activity_set);
  __pyx_v_self->activity_set = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
+042:         self.__current_trace = None
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_Cover__current_trace);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_Cover__current_trace);
  __pyx_v_self->_Cover__current_trace = ((struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *)Py_None);
+043:         self.__covered_activity_lists = set()
  __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_Cover__covered_activity_lists);
  __Pyx_DECREF(__pyx_v_self->_Cover__covered_activity_lists);
  __pyx_v_self->_Cover__covered_activity_lists = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
+044:         self.__following_activities_cache = {}
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_Cover__following_activities_cache);
  __Pyx_DECREF(__pyx_v_self->_Cover__following_activities_cache);
  __pyx_v_self->_Cover__following_activities_cache = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
+045:         self.__all_pdfg_activity_names = frozenset(pattern_dfg.nodes.keys())
  if (unlikely(__pyx_v_pattern_dfg->__pyx_base.nodes == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys");
    __PYX_ERR(0, 45, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyDict_Keys(__pyx_v_pattern_dfg->__pyx_base.nodes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyFrozenSet_New(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_7);
  __Pyx_GOTREF(__pyx_v_self->_Cover__all_pdfg_activity_names);
  __Pyx_DECREF(__pyx_v_self->_Cover__all_pdfg_activity_names);
  __pyx_v_self->_Cover__all_pdfg_activity_names = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;
 046: 
+047:     cpdef Cover copy_counts_only(self):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_3copy_counts_only(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_5cover_Cover *__pyx_f_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_copy_counts_only(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self, int __pyx_skip_dispatch) {
  struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_copy = 0;
  struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__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_5cover_Cover &&
  __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_counts_only); 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_5cover_5Cover_3copy_counts_only)) {
        __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, 47, __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_5cover_Cover))))) __PYX_ERR(0, 47, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *)__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.cover.Cover.copy_counts_only", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_copy);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_3copy_counts_only(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_5cover_5Cover_2copy_counts_only, "returns a copy of this Cover object. Only the counts are copied.\n        All caches and any other information is not copied\n        ");
static PyMethodDef __pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_3copy_counts_only = {"copy_counts_only", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_3copy_counts_only, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_2copy_counts_only};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_3copy_counts_only(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_counts_only (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_counts_only", 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_counts_only", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_2copy_counts_only(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_2copy_counts_only(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_copy_counts_only(__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.cover.Cover.copy_counts_only", __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_5cover_5Cover_3copy_counts_only, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Cover_copy_counts_only, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc_2, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover, __pyx_mstate_global->__pyx_n_u_copy_counts_only, __pyx_t_2) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 048:         """returns a copy of this Cover object. Only the counts are copied.
 049:         All caches and any other information is not copied
 050:         """
+051:         cdef Cover copy = Cover(self.pattern_dfg, self.activity_set)
  __pyx_t_2 = NULL;
  __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover);
  __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover); 
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_self->pattern_dfg), __pyx_v_self->activity_set};
    __pyx_t_1 = __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_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
  }
  __pyx_v_copy = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *)__pyx_t_1);
  __pyx_t_1 = 0;
+052:         copy.move_stream = self.move_stream.copy_counts_only()
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_11move_stream_MoveStream *)__pyx_v_self->move_stream->__pyx_vtab)->copy_counts_only(__pyx_v_self->move_stream, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_copy->move_stream);
  __Pyx_DECREF((PyObject *)__pyx_v_copy->move_stream);
  __pyx_v_copy->move_stream = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_11move_stream_MoveStream *)__pyx_t_1);
  __pyx_t_1 = 0;
+053:         copy.pattern_stream = self.pattern_stream.copy_counts_only()
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_14pattern_stream_PatternStream *)__pyx_v_self->pattern_stream->__pyx_vtab)->copy_counts_only(__pyx_v_self->pattern_stream, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_copy->pattern_stream);
  __Pyx_DECREF((PyObject *)__pyx_v_copy->pattern_stream);
  __pyx_v_copy->pattern_stream = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_14pattern_stream_PatternStream *)__pyx_t_1);
  __pyx_t_1 = 0;
+054:         copy.meta_stream = self.meta_stream.copy_counts_only()
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_11meta_stream_MetaStream *)__pyx_v_self->meta_stream->__pyx_vtab)->copy_counts_only(__pyx_v_self->meta_stream, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_copy->meta_stream);
  __Pyx_DECREF((PyObject *)__pyx_v_copy->meta_stream);
  __pyx_v_copy->meta_stream = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_11meta_stream_MetaStream *)__pyx_t_1);
  __pyx_t_1 = 0;
+055:         return copy
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_copy);
  __pyx_r = __pyx_v_copy;
  goto __pyx_L0;
 056: 
+057:     cpdef float get_encoded_length_of_cover(self, log: EventLog, bint verbose=False):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_5get_encoded_length_of_cover(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static float __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_get_encoded_length_of_cover(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self, PyObject *__pyx_v_log, int __pyx_skip_dispatch, struct __pyx_opt_args_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_get_encoded_length_of_cover *__pyx_optional_args) {
  int __pyx_v_verbose = ((int)0);
  float __pyx_v_encoded_length;
  PyObject *__pyx_v_trace = NULL;
  float __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_verbose = __pyx_optional_args->verbose;
    }
  }
  /* 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_5cover_Cover &&
  __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_of_cover); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_5get_encoded_length_of_cover)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_verbose); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 57, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 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_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_log, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_7 = __Pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_7 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 57, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.cover.Cover.get_encoded_length_of_cover", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_trace);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_5get_encoded_length_of_cover(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_4get_encoded_length_of_cover, "returns length of pattern stream + length of metrastream +\n        L_N(nr_of_traces) + encoding for length of traces");
static PyMethodDef __pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_5get_encoded_length_of_cover = {"get_encoded_length_of_cover", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_5get_encoded_length_of_cover, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_4get_encoded_length_of_cover};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_5get_encoded_length_of_cover(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_log = 0;
  int __pyx_v_verbose;
  #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_of_cover (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_log,&__pyx_mstate_global->__pyx_n_u_verbose,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, 57, __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, 57, __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, 57, __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_of_cover", 0) < 0) __PYX_ERR(0, 57, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_encoded_length_of_cover", 0, 1, 2, i); __PYX_ERR(0, 57, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 57, __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, 57, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_log = values[0];
    if (values[1]) {
      __pyx_v_verbose = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_verbose == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 57, __pyx_L3_error)
    } else {
      __pyx_v_verbose = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_encoded_length_of_cover", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 57, __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.cover.Cover.get_encoded_length_of_cover", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_4get_encoded_length_of_cover(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *)__pyx_v_self), __pyx_v_log, __pyx_v_verbose);

  /* 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_5cover_5Cover_4get_encoded_length_of_cover(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self, PyObject *__pyx_v_log, int __pyx_v_verbose) {
  PyObject *__pyx_r = NULL;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.verbose = __pyx_v_verbose;
  __pyx_t_1 = __pyx_vtabptr_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover->get_encoded_length_of_cover(__pyx_v_self, __pyx_v_log, 1, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 57, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.cover.Cover.get_encoded_length_of_cover", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_log, __pyx_mstate_global->__pyx_n_u_EventLog) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_5get_encoded_length_of_cover, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Cover_get_encoded_length_of_cove, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc_2, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __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_5cover_Cover, __pyx_mstate_global->__pyx_n_u_get_encoded_length_of_cover, __pyx_t_3) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 058:         """returns length of pattern stream + length of metrastream +
 059:         L_N(nr_of_traces) + encoding for length of traces"""
+060:         cdef float encoded_length = self.pattern_stream.get_code_length(verbose=verbose)
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.verbose = __pyx_v_verbose;
  __pyx_t_7 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_14pattern_stream_PatternStream *)__pyx_v_self->pattern_stream->__pyx_vtab)->get_code_length(__pyx_v_self->pattern_stream, 0, &__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 60, __pyx_L1_error)
  __pyx_v_encoded_length = __pyx_t_7;
+061:         encoded_length += self.meta_stream.get_code_length(verbose=verbose)
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.verbose = __pyx_v_verbose;
  __pyx_t_7 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_11meta_stream_MetaStream *)__pyx_v_self->meta_stream->__pyx_vtab)->get_code_length(__pyx_v_self->meta_stream, 0, &__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 61, __pyx_L1_error)
  __pyx_v_encoded_length = (__pyx_v_encoded_length + __pyx_t_7);
+062:         encoded_length += self.move_stream.get_encoded_length(verbose=verbose)
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_encoded_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = ((PyObject *)__pyx_v_self->move_stream);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_verbose); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_verbose, __pyx_t_5, __pyx_t_3, __pyx_callargs+1, 0) < 0) __PYX_ERR(0, 62, __pyx_L1_error)
    __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_get_encoded_length, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_7 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_encoded_length = __pyx_t_7;
+063:         if verbose:
  if (__pyx_v_verbose) {
/* … */
  }
+064:             print('encoded length of streams: %.2f' % encoded_length)
    __pyx_t_2 = NULL;
    __Pyx_INCREF(__pyx_builtin_print);
    __pyx_t_1 = __pyx_builtin_print; 
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_encoded_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 64, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_encoded_length_of_streams_2f, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+065:         encoded_length += mdl_utils.L_N(log.get_nr_of_traces())
  __pyx_t_1 = __pyx_v_log;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_get_nr_of_traces, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_t_10 = __Pyx_PyLong_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_11 = __pyx_f_16prolothar_common_9mdl_utils_L_N(__pyx_t_10, 0); if (unlikely(__pyx_t_11 == ((double)0.0))) __PYX_ERR(0, 65, __pyx_L1_error)
  __pyx_v_encoded_length = (__pyx_v_encoded_length + __pyx_t_11);
+066:         for trace in log.traces:
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_log, __pyx_mstate_global->__pyx_n_u_traces); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_12 = 0;
    __pyx_t_13 = NULL;
  } else {
    __pyx_t_12 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 66, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_13)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 66, __pyx_L1_error)
          #endif
          if (__pyx_t_12 >= __pyx_temp) break;
        }
        __pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_12);
        ++__pyx_t_12;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 66, __pyx_L1_error)
          #endif
          if (__pyx_t_12 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_12));
        #else
        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_12);
        #endif
        ++__pyx_t_12;
      }
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error)
    } else {
      __pyx_t_3 = __pyx_t_13(__pyx_t_1);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 66, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_trace, __pyx_t_3);
    __pyx_t_3 = 0;
/* … */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+067:             encoded_length +=  mdl_utils.L_N(len(trace))
    __pyx_t_14 = PyObject_Length(__pyx_v_trace); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 67, __pyx_L1_error)
    __pyx_t_11 = __pyx_f_16prolothar_common_9mdl_utils_L_N(__pyx_t_14, 0); if (unlikely(__pyx_t_11 == ((double)0.0))) __PYX_ERR(0, 67, __pyx_L1_error)
    __pyx_v_encoded_length = (__pyx_v_encoded_length + __pyx_t_11);
+068:         if verbose:
  if (__pyx_v_verbose) {
/* … */
  }
+069:             print('encoded length of cover: %.2f' % encoded_length)
    __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_builtin_print);
    __pyx_t_4 = __pyx_builtin_print; 
    __pyx_t_2 = PyFloat_FromDouble(__pyx_v_encoded_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_encoded_length_of_cover_2f, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 69, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+070:         return encoded_length
  __pyx_r = __pyx_v_encoded_length;
  goto __pyx_L0;
 071: 
+072:     cpdef add_log_move(self, str last_covered_activity, str activity_to_cover,
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_7add_log_move(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_5cover_5Cover_add_log_move(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self, PyObject *__pyx_v_last_covered_activity, PyObject *__pyx_v_activity_to_cover, PyObject *__pyx_v_model_available_activities, 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_5cover_Cover &&
  __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_add_log_move); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_7add_log_move)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_last_covered_activity, __pyx_v_activity_to_cover, __pyx_v_model_available_activities};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __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.cover.Cover.add_log_move", __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_5cover_5Cover_7add_log_move(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_5cover_5Cover_6add_log_move, "adds a log move to this cover. delegates calls to the move stream and\n        the pattern stream of this cover");
static PyMethodDef __pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_7add_log_move = {"add_log_move", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_7add_log_move, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_6add_log_move};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_7add_log_move(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_last_covered_activity = 0;
  PyObject *__pyx_v_activity_to_cover = 0;
  PyObject *__pyx_v_model_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("add_log_move (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_last_covered_activity,&__pyx_mstate_global->__pyx_n_u_activity_to_cover,&__pyx_mstate_global->__pyx_n_u_model_available_activities,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, 72, __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, 72, __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, 72, __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, 72, __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_log_move", 0) < 0) __PYX_ERR(0, 72, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_log_move", 1, 3, 3, i); __PYX_ERR(0, 72, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 72, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 72, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 72, __pyx_L3_error)
    }
    __pyx_v_last_covered_activity = ((PyObject*)values[0]);
    __pyx_v_activity_to_cover = ((PyObject*)values[1]);
    __pyx_v_model_available_activities = ((PyObject*)values[2]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_log_move", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 72, __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.cover.Cover.add_log_move", __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, 72, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_activity_to_cover), (&PyUnicode_Type), 1, "activity_to_cover", 1))) __PYX_ERR(0, 72, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_model_available_activities), (&PySet_Type), 1, "model_available_activities", 1))) __PYX_ERR(0, 73, __pyx_L1_error)
  __pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_6add_log_move(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *)__pyx_v_self), __pyx_v_last_covered_activity, __pyx_v_activity_to_cover, __pyx_v_model_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_5cover_5Cover_6add_log_move(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self, PyObject *__pyx_v_last_covered_activity, PyObject *__pyx_v_activity_to_cover, PyObject *__pyx_v_model_available_activities) {
  PyObject *__pyx_r = NULL;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_add_log_move(__pyx_v_self, __pyx_v_last_covered_activity, __pyx_v_activity_to_cover, __pyx_v_model_available_activities, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __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.cover.Cover.add_log_move", __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_5cover_5Cover_7add_log_move, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Cover_add_log_move, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc_2, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover, __pyx_mstate_global->__pyx_n_u_add_log_move, __pyx_t_3) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 073:                        set model_available_activities):
 074:         """adds a log move to this cover. delegates calls to the move stream and
 075:         the pattern stream of this cover"""
+076:         self.move_stream.add_log_move(last_covered_activity)
  __pyx_t_1 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_11move_stream_MoveStream *)__pyx_v_self->move_stream->__pyx_vtab)->add_log_move(__pyx_v_self->move_stream, __pyx_v_last_covered_activity, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+077:         if model_available_activities:
  __pyx_t_6 = (__pyx_v_model_available_activities != Py_None)&&(__Pyx_PySet_GET_SIZE(__pyx_v_model_available_activities) != 0);
  if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_6 < 0))) __PYX_ERR(0, 77, __pyx_L1_error)
  if (__pyx_t_6) {
/* … */
    goto __pyx_L3;
  }
+078:             self.pattern_stream.add(
    __pyx_t_2 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_14pattern_stream_PatternStream *)__pyx_v_self->pattern_stream->__pyx_vtab)->add(__pyx_v_self->pattern_stream, ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *)__pyx_t_1), ((PyObject*)__pyx_t_4), 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+079:                 Singleton(activity_to_cover),
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Singleton); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 79, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __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_v_activity_to_cover};
      __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, 79, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern))))) __PYX_ERR(0, 79, __pyx_L1_error)
 080:                 # a log move cannot be a model available move
+081:                 self.activity_set.difference(model_available_activities)
    __pyx_t_2 = __pyx_v_self->activity_set;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_model_available_activities};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_difference, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
 082:             )
 083:         else:
+084:             self.pattern_stream.add(
  /*else*/ {
/* … */
    __pyx_t_4 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_14pattern_stream_PatternStream *)__pyx_v_self->pattern_stream->__pyx_vtab)->add(__pyx_v_self->pattern_stream, ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *)__pyx_t_2), ((PyObject*)__pyx_t_1), 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_L3:;
+085:                 Singleton(activity_to_cover),
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Singleton); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_activity_to_cover};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __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, 85, __pyx_L1_error)
 086:                 # a log move cannot be a model available move
+087:                 self.activity_set
    __pyx_t_1 = __pyx_v_self->activity_set;
    __Pyx_INCREF(__pyx_t_1);
 088:             )
 089: 
+090:     cpdef add_skipped_pattern(self, Pattern pattern, Pattern preceding_pattern,
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_9add_skipped_pattern(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_5cover_5Cover_add_skipped_pattern(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self, 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_v_preceding_pattern, PyObject *__pyx_v_last_covered_activity, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_alternative_patterns = 0;
  PyObject *__pyx_r = NULL;
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover &&
  __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_add_skipped_pattern); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_9add_skipped_pattern)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_3, ((PyObject *)__pyx_v_pattern), ((PyObject *)__pyx_v_preceding_pattern), __pyx_v_last_covered_activity};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __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.cover.Cover.add_skipped_pattern", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_alternative_patterns);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_9add_skipped_pattern(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_5cover_5Cover_8add_skipped_pattern, "adds codes to the streams of the cover for skipping the given pattern");
static PyMethodDef __pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_9add_skipped_pattern = {"add_skipped_pattern", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_9add_skipped_pattern, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_8add_skipped_pattern};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_9add_skipped_pattern(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *__pyx_v_pattern = 0;
  struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *__pyx_v_preceding_pattern = 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("add_skipped_pattern (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,&__pyx_mstate_global->__pyx_n_u_preceding_pattern,&__pyx_mstate_global->__pyx_n_u_last_covered_activity,0};
  PyObject* values[3] = {0,0,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 90, __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, 90, __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, 90, __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, 90, __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_skipped_pattern", 0) < 0) __PYX_ERR(0, 90, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_skipped_pattern", 1, 3, 3, i); __PYX_ERR(0, 90, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 90, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 90, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 90, __pyx_L3_error)
    }
    __pyx_v_pattern = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *)values[0]);
    __pyx_v_preceding_pattern = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *)values[1]);
    __pyx_v_last_covered_activity = ((PyObject*)values[2]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_skipped_pattern", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 90, __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.cover.Cover.add_skipped_pattern", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pattern), __pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern, 1, "pattern", 0))) __PYX_ERR(0, 90, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_preceding_pattern), __pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern, 1, "preceding_pattern", 0))) __PYX_ERR(0, 90, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_last_covered_activity), (&PyUnicode_Type), 1, "last_covered_activity", 1))) __PYX_ERR(0, 91, __pyx_L1_error)
  __pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_8add_skipped_pattern(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *)__pyx_v_self), __pyx_v_pattern, __pyx_v_preceding_pattern, __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_5cover_5Cover_8add_skipped_pattern(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self, 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_v_preceding_pattern, PyObject *__pyx_v_last_covered_activity) {
  PyObject *__pyx_r = NULL;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_add_skipped_pattern(__pyx_v_self, __pyx_v_pattern, __pyx_v_preceding_pattern, __pyx_v_last_covered_activity, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __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.cover.Cover.add_skipped_pattern", __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_5cover_5Cover_9add_skipped_pattern, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Cover_add_skipped_pattern, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc_2, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover, __pyx_mstate_global->__pyx_n_u_add_skipped_pattern, __pyx_t_3) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 091:                               str last_covered_activity):
 092:         """adds codes to the streams of the cover for skipping the given pattern"""
 093:         cdef frozenset alternative_patterns
+094:         if preceding_pattern is not None:
  __pyx_t_6 = (((PyObject *)__pyx_v_preceding_pattern) != Py_None);
  if (__pyx_t_6) {
/* … */
    goto __pyx_L3;
  }
+095:             alternative_patterns = self.get_following_activities(preceding_pattern.get_activity_name())
    __pyx_t_1 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *)__pyx_v_preceding_pattern->__pyx_vtab)->get_activity_name(__pyx_v_preceding_pattern, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *)__pyx_v_self->__pyx_vtab)->get_following_activities(__pyx_v_self, ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_alternative_patterns = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
 096:         else:
+097:             alternative_patterns = self.__all_pdfg_activity_names
  /*else*/ {
    __pyx_t_2 = __pyx_v_self->_Cover__all_pdfg_activity_names;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v_alternative_patterns = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L3:;
 098: 
+099:         self.pattern_stream.add(pattern, alternative_patterns)
  __pyx_t_2 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_14pattern_stream_PatternStream *)__pyx_v_self->pattern_stream->__pyx_vtab)->add(__pyx_v_self->pattern_stream, __pyx_v_pattern, __pyx_v_alternative_patterns, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+100:         pattern.for_covering(
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_7pattern_7pattern_Pattern *)__pyx_v_pattern->__pyx_vtab)->for_covering(__pyx_v_pattern, __pyx_t_2, __pyx_v_last_covered_activity, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+101:                 self.__current_trace, last_covered_activity).skip_to_end(
  __pyx_t_2 = ((PyObject *)__pyx_v_self->_Cover__current_trace);
  __Pyx_INCREF(__pyx_t_2);
/* … */
  ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *)((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *)__pyx_t_1)->__pyx_vtab)->skip_to_end(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_16covering_pattern_16covering_pattern_CoveringPattern *)__pyx_t_1), __pyx_v_self, ((struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *)__pyx_t_2), __pyx_v_last_covered_activity, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+102:                 self, self.__current_trace, last_covered_activity)
  __pyx_t_2 = ((PyObject *)__pyx_v_self->_Cover__current_trace);
  __Pyx_INCREF(__pyx_t_2);
 103: 
+104:     cpdef frozenset get_all_pattern_names(self):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_11get_all_pattern_names(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_5cover_5Cover_get_all_pattern_names(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__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_5cover_Cover &&
  __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_all_pattern_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_11get_all_pattern_names)) {
        __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, 104, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(PyFrozenSet_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("frozenset", __pyx_t_2))) __PYX_ERR(0, 104, __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.cover.Cover.get_all_pattern_names", __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_5cover_5Cover_11get_all_pattern_names(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_5cover_5Cover_11get_all_pattern_names = {"get_all_pattern_names", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_11get_all_pattern_names, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_11get_all_pattern_names(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_all_pattern_names (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_all_pattern_names", 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_all_pattern_names", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_10get_all_pattern_names(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_10get_all_pattern_names(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_get_all_pattern_names(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __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.cover.Cover.get_all_pattern_names", __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_5cover_5Cover_11get_all_pattern_names, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Cover_get_all_pattern_names, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc_2, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover, __pyx_mstate_global->__pyx_n_u_get_all_pattern_names, __pyx_t_3) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+105:         return self.__all_pdfg_activity_names
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_Cover__all_pdfg_activity_names);
  __pyx_r = __pyx_v_self->_Cover__all_pdfg_activity_names;
  goto __pyx_L0;
 106: 
+107:     cpdef frozenset get_following_activities(self, str activity):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_13get_following_activities(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_get_following_activities(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self, PyObject *__pyx_v_activity, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_following_activities = 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_5cover_Cover &&
  __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_following_activities); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_13get_following_activities)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __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, 107, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(PyFrozenSet_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("frozenset", __pyx_t_2))) __PYX_ERR(0, 107, __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_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.cover.Cover.get_following_activities", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_following_activities);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_13get_following_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*/
PyDoc_STRVAR(__pyx_doc_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_12get_following_activities, "\n        for one high-level activity returns the following activities in the\n        pattern graph of this cover. this method speeds up repetitive requests\n        with a cache\n        ");
static PyMethodDef __pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_13get_following_activities = {"get_following_activities", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_13get_following_activities, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_12get_following_activities};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_13get_following_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
) {
  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("get_following_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_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, 107, __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, 107, __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_following_activities", 0) < 0) __PYX_ERR(0, 107, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_following_activities", 1, 1, 1, i); __PYX_ERR(0, 107, __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, 107, __pyx_L3_error)
    }
    __pyx_v_activity = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_following_activities", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 107, __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.cover.Cover.get_following_activities", __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, 107, __pyx_L1_error)
  __pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_12get_following_activities(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *)__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_5cover_5Cover_12get_following_activities(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__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_5cover_5Cover_get_following_activities(__pyx_v_self, __pyx_v_activity, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __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.cover.Cover.get_following_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_CyFunction_New(&__pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_13get_following_activities, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Cover_get_following_activities, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc_2, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover, __pyx_mstate_global->__pyx_n_u_get_following_activities, __pyx_t_3) < 0) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 108:         """
 109:         for one high-level activity returns the following activities in the
 110:         pattern graph of this cover. this method speeds up repetitive requests
 111:         with a cache
 112:         """
+113:         try:
  {
    /*try:*/ {
/* … */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
/* … */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
  }
+114:             return self.__following_activities_cache[activity]
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(__pyx_v_self->_Cover__following_activities_cache == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 114, __pyx_L3_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->_Cover__following_activities_cache, __pyx_v_activity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(PyFrozenSet_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("frozenset", __pyx_t_1))) __PYX_ERR(0, 114, __pyx_L3_error)
      __pyx_r = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;
+115:         except KeyError:
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_9) {
      __Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.cover.Cover.get_following_activities", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(0, 115, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_4);
+116:             following_activities = frozenset(self.pattern_dfg.get_following_activities(activity))
      __pyx_t_3 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_11pattern_dfg_PatternDfg *)__pyx_v_self->pattern_dfg->__pyx_base.__pyx_vtab)->__pyx_base.get_following_activities(((struct __pyx_obj_16prolothar_common_6models_22directly_follows_graph_DirectlyFollowsGraph *)__pyx_v_self->pattern_dfg), __pyx_v_activity, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 116, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = __Pyx_PyFrozenSet_New(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 116, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_following_activities = ((PyObject*)__pyx_t_10);
      __pyx_t_10 = 0;
+117:             self.__following_activities_cache[activity] = following_activities
      if (unlikely(__pyx_v_self->_Cover__following_activities_cache == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 117, __pyx_L5_except_error)
      }
      if (unlikely((PyDict_SetItem(__pyx_v_self->_Cover__following_activities_cache, __pyx_v_activity, __pyx_v_following_activities) < 0))) __PYX_ERR(0, 117, __pyx_L5_except_error)
+118:             return following_activities
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_following_activities);
      __pyx_r = __pyx_v_following_activities;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;
 119: 
+120:     cpdef start_trace_covering(self, Trace trace):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_15start_trace_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 PyObject *__pyx_f_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_start_trace_covering(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self, struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *__pyx_v_trace, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_activity_list = 0;
  PyObject *__pyx_r = NULL;
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover &&
  __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_start_trace_covering); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_15start_trace_covering)) {
        __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_trace)};
          __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, 120, __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.cover.Cover.start_trace_covering", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_activity_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_15start_trace_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*/
PyDoc_STRVAR(__pyx_doc_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_14start_trace_covering, "signal that now the given trace starts to get covered");
static PyMethodDef __pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_15start_trace_covering = {"start_trace_covering", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_15start_trace_covering, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_14start_trace_covering};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_15start_trace_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
) {
  struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *__pyx_v_trace = 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("start_trace_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,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, 120, __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, 120, __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, "start_trace_covering", 0) < 0) __PYX_ERR(0, 120, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("start_trace_covering", 1, 1, 1, i); __PYX_ERR(0, 120, __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, 120, __pyx_L3_error)
    }
    __pyx_v_trace = ((struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("start_trace_covering", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 120, __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.cover.Cover.start_trace_covering", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_trace), __pyx_mstate_global->__pyx_ptype_16prolothar_common_6models_8eventlog_5trace_Trace, 1, "trace", 0))) __PYX_ERR(0, 120, __pyx_L1_error)
  __pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_14start_trace_covering(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *)__pyx_v_self), __pyx_v_trace);
  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_5cover_5Cover_14start_trace_covering(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self, struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *__pyx_v_trace) {
  PyObject *__pyx_r = NULL;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_start_trace_covering(__pyx_v_self, __pyx_v_trace, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __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.cover.Cover.start_trace_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_5cover_5Cover_15start_trace_covering, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Cover_start_trace_covering, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc_2, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover, __pyx_mstate_global->__pyx_n_u_start_trace_covering, __pyx_t_3) < 0) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 121:         """signal that now the given trace starts to get covered"""
+122:         self.__current_trace = trace
  __Pyx_INCREF((PyObject *)__pyx_v_trace);
  __Pyx_GIVEREF((PyObject *)__pyx_v_trace);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_Cover__current_trace);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_Cover__current_trace);
  __pyx_v_self->_Cover__current_trace = __pyx_v_trace;
+123:         cdef tuple activity_list = tuple(trace.to_activity_list())
  __pyx_t_1 = ((struct __pyx_vtabstruct_16prolothar_common_6models_8eventlog_5trace_Trace *)__pyx_v_trace->__pyx_vtab)->to_activity_list(__pyx_v_trace, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 123, __pyx_L1_error)
  }
  __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_activity_list = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
+124:         if activity_list in self.__covered_activity_lists:
  if (unlikely(__pyx_v_self->_Cover__covered_activity_lists == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 124, __pyx_L1_error)
  }
  __pyx_t_6 = (__Pyx_PySet_ContainsTF(__pyx_v_activity_list, __pyx_v_self->_Cover__covered_activity_lists, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 124, __pyx_L1_error)
  if (unlikely(__pyx_t_6)) {
/* … */
  }
+125:             raise ValueError('covering steps in cache. use "use_cache_to_cover_trace"')
    __pyx_t_1 = NULL;
    __Pyx_INCREF(__pyx_builtin_ValueError);
    __pyx_t_4 = __pyx_builtin_ValueError; 
    __pyx_t_5 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_covering_steps_in_cache_use_use};
      __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_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __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, 125, __pyx_L1_error)
+126:         self.pattern_stream.start_trace_covering(activity_list)
  __pyx_t_2 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_14pattern_stream_PatternStream *)__pyx_v_self->pattern_stream->__pyx_vtab)->start_trace_covering(__pyx_v_self->pattern_stream, __pyx_v_activity_list, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+127:         self.meta_stream.start_trace_covering(activity_list)
  __pyx_t_2 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_11meta_stream_MetaStream *)__pyx_v_self->meta_stream->__pyx_vtab)->start_trace_covering(__pyx_v_self->meta_stream, __pyx_v_activity_list, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+128:         self.move_stream.start_trace_covering(activity_list)
  __pyx_t_4 = ((PyObject *)__pyx_v_self->move_stream);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_activity_list};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_start_trace_covering, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 129: 
+130:     cpdef end_trace_covering(self, Trace trace):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_17end_trace_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 PyObject *__pyx_f_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_end_trace_covering(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self, struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *__pyx_v_trace, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_activity_list = 0;
  PyObject *__pyx_r = NULL;
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover &&
  __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_end_trace_covering); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_17end_trace_covering)) {
        __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_trace)};
          __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, 130, __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.cover.Cover.end_trace_covering", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_activity_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_17end_trace_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*/
PyDoc_STRVAR(__pyx_doc_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_16end_trace_covering, "signal that now the given trace is get covered");
static PyMethodDef __pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_17end_trace_covering = {"end_trace_covering", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_17end_trace_covering, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_16end_trace_covering};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_17end_trace_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
) {
  struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *__pyx_v_trace = 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("end_trace_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,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, 130, __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, 130, __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, "end_trace_covering", 0) < 0) __PYX_ERR(0, 130, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("end_trace_covering", 1, 1, 1, i); __PYX_ERR(0, 130, __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, 130, __pyx_L3_error)
    }
    __pyx_v_trace = ((struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("end_trace_covering", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 130, __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.cover.Cover.end_trace_covering", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_trace), __pyx_mstate_global->__pyx_ptype_16prolothar_common_6models_8eventlog_5trace_Trace, 1, "trace", 0))) __PYX_ERR(0, 130, __pyx_L1_error)
  __pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_16end_trace_covering(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *)__pyx_v_self), __pyx_v_trace);
  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_5cover_5Cover_16end_trace_covering(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self, struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *__pyx_v_trace) {
  PyObject *__pyx_r = NULL;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_end_trace_covering(__pyx_v_self, __pyx_v_trace, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __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.cover.Cover.end_trace_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_5cover_5Cover_17end_trace_covering, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Cover_end_trace_covering, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc_2, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover, __pyx_mstate_global->__pyx_n_u_end_trace_covering, __pyx_t_3) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 131:         """signal that now the given trace is get covered"""
+132:         self.__current_trace = None
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_Cover__current_trace);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_Cover__current_trace);
  __pyx_v_self->_Cover__current_trace = ((struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *)Py_None);
+133:         cdef tuple activity_list = tuple(trace.to_activity_list())
  __pyx_t_1 = ((struct __pyx_vtabstruct_16prolothar_common_6models_8eventlog_5trace_Trace *)__pyx_v_trace->__pyx_vtab)->to_activity_list(__pyx_v_trace, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 133, __pyx_L1_error)
  }
  __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_activity_list = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
+134:         self.pattern_stream.end_trace_covering(activity_list)
  __pyx_t_2 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_14pattern_stream_PatternStream *)__pyx_v_self->pattern_stream->__pyx_vtab)->end_trace_covering(__pyx_v_self->pattern_stream, __pyx_v_activity_list, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+135:         self.meta_stream.end_trace_covering(activity_list)
  __pyx_t_2 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_11meta_stream_MetaStream *)__pyx_v_self->meta_stream->__pyx_vtab)->end_trace_covering(__pyx_v_self->meta_stream, __pyx_v_activity_list, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+136:         self.move_stream.end_trace_covering(activity_list)
  __pyx_t_1 = ((PyObject *)__pyx_v_self->move_stream);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_activity_list};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_end_trace_covering, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+137:         self.__covered_activity_lists.add(activity_list)
  if (unlikely(__pyx_v_self->_Cover__covered_activity_lists == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add");
    __PYX_ERR(0, 137, __pyx_L1_error)
  }
  __pyx_t_6 = PySet_Add(__pyx_v_self->_Cover__covered_activity_lists, __pyx_v_activity_list); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 137, __pyx_L1_error)
 138: 
+139:     cpdef bint can_cover_trace_with_cache(self, Trace trace):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_19can_cover_trace_with_cache(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_5cover_5Cover_can_cover_trace_with_cache(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self, struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *__pyx_v_trace, 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_5cover_Cover &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_can_cover_trace_with_cache); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_19can_cover_trace_with_cache)) {
        __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_trace)};
          __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, 139, __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, 139, __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.cover.Cover.can_cover_trace_with_cache", __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_5cover_5Cover_19can_cover_trace_with_cache(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_5cover_5Cover_18can_cover_trace_with_cache, "returns True if a trace with the same activity sequence already\n        has been covered");
static PyMethodDef __pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_19can_cover_trace_with_cache = {"can_cover_trace_with_cache", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_19can_cover_trace_with_cache, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_18can_cover_trace_with_cache};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_19can_cover_trace_with_cache(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_8eventlog_5trace_Trace *__pyx_v_trace = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("can_cover_trace_with_cache (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,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, 139, __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, 139, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "can_cover_trace_with_cache", 0) < 0) __PYX_ERR(0, 139, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("can_cover_trace_with_cache", 1, 1, 1, i); __PYX_ERR(0, 139, __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, 139, __pyx_L3_error)
    }
    __pyx_v_trace = ((struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("can_cover_trace_with_cache", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 139, __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.cover.Cover.can_cover_trace_with_cache", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_trace), __pyx_mstate_global->__pyx_ptype_16prolothar_common_6models_8eventlog_5trace_Trace, 1, "trace", 0))) __PYX_ERR(0, 139, __pyx_L1_error)
  __pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_18can_cover_trace_with_cache(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *)__pyx_v_self), __pyx_v_trace);
  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_5cover_5Cover_18can_cover_trace_with_cache(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self, struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *__pyx_v_trace) {
  PyObject *__pyx_r = NULL;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_can_cover_trace_with_cache(__pyx_v_self, __pyx_v_trace, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __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.cover.Cover.can_cover_trace_with_cache", __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_5cover_5Cover_19can_cover_trace_with_cache, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Cover_can_cover_trace_with_cache, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc_2, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover, __pyx_mstate_global->__pyx_n_u_can_cover_trace_with_cache, __pyx_t_3) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 140:         """returns True if a trace with the same activity sequence already
 141:         has been covered"""
+142:         return tuple(trace.to_activity_list()) in self.__covered_activity_lists
  __pyx_t_1 = ((struct __pyx_vtabstruct_16prolothar_common_6models_8eventlog_5trace_Trace *)__pyx_v_trace->__pyx_vtab)->to_activity_list(__pyx_v_trace, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 142, __pyx_L1_error)
  }
  __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v_self->_Cover__covered_activity_lists == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 142, __pyx_L1_error)
  }
  __pyx_t_6 = (__Pyx_PySet_ContainsTF(__pyx_t_2, __pyx_v_self->_Cover__covered_activity_lists, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;
 143: 
+144:     cpdef use_cache_to_cover_trace(self, Trace trace):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_21use_cache_to_cover_trace(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_5cover_5Cover_use_cache_to_cover_trace(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self, struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *__pyx_v_trace, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_activity_list = 0;
  PyObject *__pyx_r = NULL;
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover &&
  __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_use_cache_to_cover_trace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_21use_cache_to_cover_trace)) {
        __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_trace)};
          __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, 144, __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.cover.Cover.use_cache_to_cover_trace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_activity_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_21use_cache_to_cover_trace(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_5cover_5Cover_20use_cache_to_cover_trace, "repeats the addition of codes as it is stored in a cache for the\n        same sequence of activities as the given trace");
static PyMethodDef __pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_21use_cache_to_cover_trace = {"use_cache_to_cover_trace", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_21use_cache_to_cover_trace, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_20use_cache_to_cover_trace};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_21use_cache_to_cover_trace(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_8eventlog_5trace_Trace *__pyx_v_trace = 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("use_cache_to_cover_trace (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,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, 144, __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, 144, __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, "use_cache_to_cover_trace", 0) < 0) __PYX_ERR(0, 144, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("use_cache_to_cover_trace", 1, 1, 1, i); __PYX_ERR(0, 144, __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, 144, __pyx_L3_error)
    }
    __pyx_v_trace = ((struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("use_cache_to_cover_trace", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 144, __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.cover.Cover.use_cache_to_cover_trace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_trace), __pyx_mstate_global->__pyx_ptype_16prolothar_common_6models_8eventlog_5trace_Trace, 1, "trace", 0))) __PYX_ERR(0, 144, __pyx_L1_error)
  __pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_20use_cache_to_cover_trace(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *)__pyx_v_self), __pyx_v_trace);
  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_5cover_5Cover_20use_cache_to_cover_trace(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self, struct __pyx_obj_16prolothar_common_6models_8eventlog_5trace_Trace *__pyx_v_trace) {
  PyObject *__pyx_r = NULL;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_use_cache_to_cover_trace(__pyx_v_self, __pyx_v_trace, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __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.cover.Cover.use_cache_to_cover_trace", __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_5cover_5Cover_21use_cache_to_cover_trace, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Cover_use_cache_to_cover_trace, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc_2, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover, __pyx_mstate_global->__pyx_n_u_use_cache_to_cover_trace, __pyx_t_3) < 0) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 145:         """repeats the addition of codes as it is stored in a cache for the
 146:         same sequence of activities as the given trace"""
+147:         cdef tuple activity_list = tuple(trace.to_activity_list())
  __pyx_t_1 = ((struct __pyx_vtabstruct_16prolothar_common_6models_8eventlog_5trace_Trace *)__pyx_v_trace->__pyx_vtab)->to_activity_list(__pyx_v_trace, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 147, __pyx_L1_error)
  }
  __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_activity_list = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
+148:         self.pattern_stream.use_cache_to_cover_trace(activity_list)
  __pyx_t_2 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_14pattern_stream_PatternStream *)__pyx_v_self->pattern_stream->__pyx_vtab)->use_cache_to_cover_trace(__pyx_v_self->pattern_stream, __pyx_v_activity_list, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+149:         self.meta_stream.use_cache_to_cover_trace(activity_list)
  __pyx_t_2 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_13cover_streams_11meta_stream_MetaStream *)__pyx_v_self->meta_stream->__pyx_vtab)->use_cache_to_cover_trace(__pyx_v_self->meta_stream, __pyx_v_activity_list, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+150:         self.move_stream.use_cache_to_cover_trace(activity_list)
  __pyx_t_1 = ((PyObject *)__pyx_v_self->move_stream);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_activity_list};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_use_cache_to_cover_trace, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 151: 
+152:     cpdef frozenset get_activity_set(self):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_23get_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_5cover_5Cover_get_activity_set(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__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_5cover_Cover &&
  __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, 152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_23get_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, 152, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(PyFrozenSet_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("frozenset", __pyx_t_2))) __PYX_ERR(0, 152, __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.cover.Cover.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_5cover_5Cover_23get_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*/
PyDoc_STRVAR(__pyx_doc_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_22get_activity_set, "returns the activity set = singletons");
static PyMethodDef __pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_23get_activity_set = {"get_activity_set", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_23get_activity_set, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_22get_activity_set};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_23get_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_5cover_5Cover_22get_activity_set(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_22get_activity_set(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_get_activity_set(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __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.cover.Cover.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_3 = __Pyx_CyFunction_New(&__pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_23get_activity_set, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Cover_get_activity_set, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc_2, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover, __pyx_mstate_global->__pyx_n_u_get_activity_set, __pyx_t_3) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 153:         """returns the activity set = singletons"""
+154:         return self.activity_set
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->activity_set);
  __pyx_r = __pyx_v_self->activity_set;
  goto __pyx_L0;
 155: 
+156:     cpdef PatternDfg get_pattern_dfg_with_restored_counts(self):
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_25get_pattern_dfg_with_restored_counts(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_11pattern_dfg_PatternDfg *__pyx_f_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_get_pattern_dfg_with_restored_counts(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self, int __pyx_skip_dispatch) {
  struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_11pattern_dfg_PatternDfg *__pyx_v_pattern_dfg = 0;
  PyObject *__pyx_v_sources = 0;
  PyObject *__pyx_v_edge = NULL;
  PyObject *__pyx_v_last_working_edge = NULL;
  PyObject *__pyx_v_pattern_a = NULL;
  PyObject *__pyx_v_pattern_b = NULL;
  struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_11pattern_dfg_PatternDfg *__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_5cover_Cover &&
  __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_pattern_dfg_with_restored_co); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_25get_pattern_dfg_with_restored_counts)) {
        __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, 156, __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_11pattern_dfg_PatternDfg))))) __PYX_ERR(0, 156, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_11pattern_dfg_PatternDfg *)__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_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("prolothar_process_discovery.discovery.proseqo.cover.Cover.get_pattern_dfg_with_restored_counts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pattern_dfg);
  __Pyx_XDECREF(__pyx_v_sources);
  __Pyx_XDECREF(__pyx_v_edge);
  __Pyx_XDECREF(__pyx_v_last_working_edge);
  __Pyx_XDECREF(__pyx_v_pattern_a);
  __Pyx_XDECREF(__pyx_v_pattern_b);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_25get_pattern_dfg_with_restored_counts(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_5cover_5Cover_24get_pattern_dfg_with_restored_counts, "first, sets all counts of the PatternDfg to 0.\n        Then, the pattern stream is used to set counts in the graph.\n        This is only allowed, if store_patterns_in_pattern_stream was set to\n        true. Otherwise a ValueError is thrown.\n        ");
static PyMethodDef __pyx_mdef_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_25get_pattern_dfg_with_restored_counts = {"get_pattern_dfg_with_restored_counts", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_25get_pattern_dfg_with_restored_counts, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_24get_pattern_dfg_with_restored_counts};
static PyObject *__pyx_pw_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_25get_pattern_dfg_with_restored_counts(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_pattern_dfg_with_restored_counts (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_pattern_dfg_with_restored_counts", 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_pattern_dfg_with_restored_counts", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_24get_pattern_dfg_with_restored_counts(((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_24get_pattern_dfg_with_restored_counts(struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_27prolothar_process_discovery_9discovery_7proseqo_5cover_5Cover_get_pattern_dfg_with_restored_counts(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __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.cover.Cover.get_pattern_dfg_with_restored_counts", __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_5cover_5Cover_25get_pattern_dfg_with_restored_counts, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Cover_get_pattern_dfg_with_resto, NULL, __pyx_mstate_global->__pyx_n_u_prolothar_process_discovery_disc_2, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_27prolothar_process_discovery_9discovery_7proseqo_5cover_Cover, __pyx_mstate_global->__pyx_n_u_get_pattern_dfg_with_restored_co, __pyx_t_3) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 157:         """first, sets all counts of the PatternDfg to 0.
 158:         Then, the pattern stream is used to set counts in the graph.
 159:         This is only allowed, if store_patterns_in_pattern_stream was set to
 160:         true. Otherwise a ValueError is thrown.
 161:         """
+162:         cdef PatternDfg pattern_dfg = self.pattern_dfg.copy()
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_11pattern_dfg_PatternDfg *)__pyx_v_self->pattern_dfg->__pyx_base.__pyx_vtab)->copy(__pyx_v_self->pattern_dfg, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pattern_dfg = ((struct __pyx_obj_27prolothar_process_discovery_9discovery_7proseqo_11pattern_dfg_PatternDfg *)__pyx_t_1);
  __pyx_t_1 = 0;
+163:         cdef list sources = pattern_dfg.get_source_activities()
  __pyx_t_2 = ((PyObject *)__pyx_v_pattern_dfg);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_get_source_activities, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(0, 163, __pyx_L1_error)
  __pyx_v_sources = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
 164: 
+165:         for edge in pattern_dfg.edges.values():
  __pyx_t_6 = 0;
  if (unlikely(__pyx_v_pattern_dfg->__pyx_base.edges == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
    __PYX_ERR(0, 165, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_pattern_dfg->__pyx_base.edges, 1, __pyx_mstate_global->__pyx_n_u_values, (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_2;
  __pyx_t_2 = 0;
  while (1) {
    __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_7, &__pyx_t_6, NULL, &__pyx_t_2, NULL, __pyx_t_8);
    if (unlikely(__pyx_t_9 == 0)) break;
    if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_edge, __pyx_t_2);
    __pyx_t_2 = 0;
+166:             (<Edge>edge).count = 0
    ((struct __pyx_obj_16prolothar_common_6models_3dfg_4edge_Edge *)__pyx_v_edge)->count = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 167: 
+168:         last_working_edge = None
  __Pyx_INCREF(Py_None);
  __pyx_v_last_working_edge = ((PyObject*)Py_None);
+169:         for pattern_a, pattern_b in pairwise(
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pairwise); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
/* … */
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4);
    __pyx_t_7 = 0;
    __pyx_t_11 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 169, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_11)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 169, __pyx_L1_error)
          #endif
          if (__pyx_t_7 >= __pyx_temp) break;
        }
        __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_4, __pyx_t_7);
        ++__pyx_t_7;
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 169, __pyx_L1_error)
          #endif
          if (__pyx_t_7 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7));
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_7);
        #endif
        ++__pyx_t_7;
      }
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error)
    } else {
      __pyx_t_1 = __pyx_t_11(__pyx_t_4);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 169, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_1);
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 169, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_2);
      } else {
        __pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 0);
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_3);
        __pyx_t_2 = __Pyx_PyList_GetItemRef(sequence, 1);
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_2);
      }
      #else
      __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10);
      index = 0; __pyx_t_3 = __pyx_t_12(__pyx_t_10); if (unlikely(!__pyx_t_3)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_2 = __pyx_t_12(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_10), 2) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
      __pyx_t_12 = NULL;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L8_unpacking_done;
      __pyx_L7_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_12 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 169, __pyx_L1_error)
      __pyx_L8_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_pattern_a, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_pattern_b, __pyx_t_2);
    __pyx_t_2 = 0;
/* … */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+170:                 self.pattern_stream.get_sequence_of_added_patterns()):
  __pyx_t_10 = ((PyObject *)__pyx_v_self->pattern_stream);
  __Pyx_INCREF(__pyx_t_10);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_get_sequence_of_added_patterns, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __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, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
+171:             edge = (pattern_a.get_activity_name(), pattern_b.get_activity_name())
    __pyx_t_2 = __pyx_v_pattern_a;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_get_activity_name, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_3 = __pyx_v_pattern_b;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_get_activity_name, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 171, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 171, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_edge, __pyx_t_3);
    __pyx_t_3 = 0;
+172:             if edge not in pattern_dfg.edges and last_working_edge:
    if (unlikely(__pyx_v_pattern_dfg->__pyx_base.edges == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 172, __pyx_L1_error)
    }
    __pyx_t_14 = (__Pyx_PyDict_ContainsTF(__pyx_v_edge, __pyx_v_pattern_dfg->__pyx_base.edges, Py_NE)); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 172, __pyx_L1_error)
    if (__pyx_t_14) {
    } else {
      __pyx_t_13 = __pyx_t_14;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_14 = (__pyx_v_last_working_edge != Py_None)&&(__Pyx_PyTuple_GET_SIZE(__pyx_v_last_working_edge) != 0);
    if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_14 < 0))) __PYX_ERR(0, 172, __pyx_L1_error)
    __pyx_t_13 = __pyx_t_14;
    __pyx_L10_bool_binop_done:;
    if (__pyx_t_13) {
/* … */
    }
 173:                 #we had a log move => connect to last non-move activity
+174:                 edge = (last_working_edge[1], edge[1])
      if (unlikely(__pyx_v_last_working_edge == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 174, __pyx_L1_error)
      }
      __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_last_working_edge, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_edge, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 174, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 174, __pyx_L1_error);
      __pyx_t_3 = 0;
      __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_edge, __pyx_t_1);
      __pyx_t_1 = 0;
+175:             if edge in pattern_dfg.edges:
    if (unlikely(__pyx_v_pattern_dfg->__pyx_base.edges == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 175, __pyx_L1_error)
    }
    __pyx_t_13 = (__Pyx_PyDict_ContainsTF(__pyx_v_edge, __pyx_v_pattern_dfg->__pyx_base.edges, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 175, __pyx_L1_error)
    if (__pyx_t_13) {
/* … */
    }
+176:                 pattern_dfg.add_count(edge[0], edge[1])
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_edge, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 176, __pyx_L1_error)
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_edge, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __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, 176, __pyx_L1_error)
      __pyx_t_3 = ((struct __pyx_vtabstruct_27prolothar_process_discovery_9discovery_7proseqo_11pattern_dfg_PatternDfg *)__pyx_v_pattern_dfg->__pyx_base.__pyx_vtab)->__pyx_base.add_count(((struct __pyx_obj_16prolothar_common_6models_22directly_follows_graph_DirectlyFollowsGraph *)__pyx_v_pattern_dfg), ((PyObject*)__pyx_t_1), ((PyObject*)__pyx_t_2), 0, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+177:                 last_working_edge = edge
      __Pyx_INCREF(__pyx_v_edge);
      __Pyx_DECREF_SET(__pyx_v_last_working_edge, __pyx_v_edge);
 178:             #if we are at the end of a trace
+179:             if edge[1] in sources:
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_edge, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_13 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_v_sources, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_13) {
/* … */
    }
+180:                 last_working_edge = edge
      __Pyx_INCREF(__pyx_v_edge);
      __Pyx_DECREF_SET(__pyx_v_last_working_edge, __pyx_v_edge);
 181: 
+182:         return pattern_dfg
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_pattern_dfg);
  __pyx_r = __pyx_v_pattern_dfg;
  goto __pyx_L0;