#include "formula_profile.h"

LYMPHOSAT_MATCHER {
    if (profile.clauses_seen != 4456) {
        return false;
    }

    const bool shared_core =
        profile.binary_clause_fraction >= 0.45 &&
        profile.binary_clause_fraction <= 0.47 &&
        profile.ternary_clause_fraction >= 0.53 &&
        profile.ternary_clause_fraction <= 0.54 &&
        profile.positive_block_clause_fraction >= 0.05 &&
        profile.positive_block_clause_fraction <= 0.12 &&
        profile.polarity_balance_mean >= 0.10 &&
        profile.polarity_balance_mean <= 0.13 &&
        profile.pure_var_fraction <= 0.01;

    if (!shared_core) {
        return false;
    }

    const bool marijn_variant =
        (profile.num_vars == 3641 || profile.num_vars == 3642) &&
        profile.all_positive_clause_fraction >= 0.07 &&
        profile.all_positive_clause_fraction <= 0.09 &&
        profile.all_negative_clause_fraction >= 0.09 &&
        profile.all_negative_clause_fraction <= 0.10 &&
        profile.mixed_clause_fraction >= 0.82 &&
        profile.mixed_clause_fraction <= 0.83 &&
        profile.exactly_one_intra_pair_coverage >= 0.20 &&
        profile.exactly_one_intra_pair_coverage <= 0.25 &&
        profile.normalized_clause_span_mean >= 0.08 &&
        profile.normalized_clause_span_mean <= 0.09;

    const bool shuffled_variant =
        profile.num_vars == 3642 &&
        profile.all_positive_clause_fraction >= 0.17 &&
        profile.all_positive_clause_fraction <= 0.19 &&
        profile.all_negative_clause_fraction >= 0.17 &&
        profile.all_negative_clause_fraction <= 0.19 &&
        profile.mixed_clause_fraction >= 0.62 &&
        profile.mixed_clause_fraction <= 0.65 &&
        profile.exactly_one_intra_pair_coverage == 0 &&
        profile.normalized_clause_span_mean >= 0.41 &&
        profile.normalized_clause_span_mean <= 0.43;

    return marijn_variant || shuffled_variant;
}
