<commit_before>#include <stdio.h>
#include <assert.h>

#ifndef DTASK_GEN
#include "factor_tasks.h"
#include "simple_tasks.h"
#include "toplevel_tasks.h"
#endif

#define DEBUG 1

#if DEBUG
#define debugf(args...) printf(args)
#else
#define debugf(...)
#endif

DTASK_GROUP(toplevel_tasks)

extern dtask_state_t factor;
DTASK(factor_events, dtask_set_t)
{
  /* connect factor_tasks to simple_tasks */
  dtask_set_t initial = 0;

  /* TOGGLE triggers COUNT */
  if(*DREF(simple_events) & TOGGLE2) {
    initial |= COUNT;
  }

  factor_events = dtask_run(&factor, initial, events);
  return factor_events != 0;
}

extern dtask_state_t simple;
DTASK(simple_events, dtask_set_t)
{
  dtask_set_t initial = TOGGLE;

  simple_events = dtask_run(&simple, initial, events);
  return simple_events != 0;
}<commit_msg>filter internal TOGGLE in simple_events dtask<commit_after>#include <stdio.h>
#include <assert.h>

#ifndef DTASK_GEN
#include "factor_tasks.h"
#include "simple_tasks.h"
#include "toplevel_tasks.h"
#endif

#define DEBUG 1

#if DEBUG
#define debugf(args...) printf(args)
#else
#define debugf(...)
#endif

DTASK_GROUP(toplevel_tasks)

extern dtask_state_t factor;
DTASK(factor_events, dtask_set_t)
{
  /* connect factor_tasks to simple_tasks */
  dtask_set_t initial = 0;

  /* TOGGLE triggers COUNT */
  if(*DREF(simple_events) & TOGGLE2) {
    initial |= COUNT;
  }

  factor_events = dtask_run(&factor, initial, events);
  return factor_events != 0;
}

extern dtask_state_t simple;
DTASK(simple_events, dtask_set_t)
{
  dtask_set_t initial = TOGGLE;

  simple_events = dtask_run(&simple, initial, events);

  /* TOGGLE2 is the only 'exported' event */
  return (simple_events & TOGGLE2) != 0;
}
{'fraction_non_alphanumeric': 0.12308598351001178, 'fraction_numerical': 0.007067137809187279, 'mean_word_length': 4.96140350877193, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6048487', 'n_tokens_mistral': 663, 'n_tokens_neox': 634, 'n_words': 146}