#include "formula_profile.h"

LYMPHOSAT_MATCHER {
    auto in = [](double value, double lo, double hi) {
        return value >= lo && value <= hi;
    };

    const bool okgenerator_5_like =
        profile.dominant_clause_len == 5 &&
        in(profile.clauses_per_var, 19.99, 20.01) &&
        in(profile.occurrence_mean, 99.9, 100.1) &&
        in(profile.top1_occurrence_mass, 0.00245, 0.00270) &&
        in(profile.top5_occurrence_mass, 0.0604, 0.0612) &&
        in(profile.normalized_clause_span_mean, 0.665, 0.670);

    const bool fivecnf_50_like =
        profile.dominant_clause_len == 5 &&
        profile.num_vars == 50 &&
        in(profile.clauses_per_var, 15.1, 16.5) &&
        in(profile.occurrence_mean, 72.5, 79.0) &&
        in(profile.top1_occurrence_mass, 0.0205, 0.0209) &&
        in(profile.top5_occurrence_mass, 0.0617, 0.0623) &&
        in(profile.normalized_clause_span_mean, 0.66, 0.678) &&
        profile.small_span_clause_fraction > 0.06;

    const bool fivecnf_170_like =
        profile.dominant_clause_len == 5 &&
        profile.num_vars == 170 &&
        in(profile.clauses_per_var, 15.5, 15.7) &&
        in(profile.occurrence_mean, 76.8, 77.2) &&
        in(profile.top1_occurrence_mass, 0.0058, 0.0061) &&
        in(profile.top5_occurrence_mass, 0.0535, 0.0538) &&
        in(profile.normalized_clause_span_mean, 0.669, 0.670) &&
        profile.polarity_balance_mean <= 0.01;

    const bool fivecnf_250_like =
        profile.dominant_clause_len == 5 &&
        profile.num_vars == 250 &&
        in(profile.clauses_per_var, 17.1, 17.3) &&
        in(profile.occurrence_mean, 85.3, 85.5) &&
        in(profile.top1_occurrence_mass, 0.0040, 0.0041) &&
        in(profile.top5_occurrence_mass, 0.0523, 0.0525) &&
        in(profile.normalized_clause_span_mean, 0.667, 0.668) &&
        profile.polarity_balance_mean <= 0.007;

    const bool gencnf_5_like =
        profile.dominant_clause_len == 5 &&
        profile.num_vars == 170 &&
        profile.clauses_seen == 3655 &&
        in(profile.clauses_per_var, 21.49, 21.51) &&
        in(profile.occurrence_mean, 107.4, 107.6) &&
        in(profile.top1_occurrence_mass, 0.0075, 0.0076) &&
        in(profile.top5_occurrence_mass, 0.0642, 0.0645) &&
        in(profile.normalized_clause_span_mean, 0.671, 0.672) &&
        profile.polarity_balance_mean >= 0.08;

    const bool gencnf_7_like =
        profile.dominant_clause_len == 7 &&
        profile.num_vars == 85 &&
        profile.clauses_seen == 7539 &&
        in(profile.clauses_per_var, 88.6, 88.8) &&
        in(profile.occurrence_mean, 620.7, 621.0) &&
        in(profile.top1_occurrence_mass, 0.0128, 0.0131) &&
        in(profile.top5_occurrence_mass, 0.0635, 0.0639) &&
        in(profile.normalized_clause_span_mean, 0.757, 0.758);

    const bool gencnf_8_like =
        profile.dominant_clause_len == 8 &&
        profile.num_vars == 61 &&
        profile.clauses_seen == 10980 &&
        profile.clauses_per_var == 180 &&
        in(profile.occurrence_mean, 1439.5, 1440.5) &&
        in(profile.top1_occurrence_mass, 0.0170, 0.0173) &&
        in(profile.top5_occurrence_mass, 0.0682, 0.0686) &&
        in(profile.normalized_clause_span_mean, 0.789, 0.791);

    const bool okgen_1000_like =
        profile.dominant_clause_len == 3 &&
        profile.num_vars == 250 &&
        profile.clauses_seen == 1000 &&
        in(profile.clauses_per_var, 3.99, 4.01) &&
        in(profile.occurrence_mean, 11.9, 12.1) &&
        in(profile.top1_occurrence_mass, 0.00755, 0.00780) &&
        in(profile.top5_occurrence_mass, 0.085, 0.087) &&
        in(profile.polarity_balance_mean, 0.238, 0.244) &&
        in(profile.normalized_clause_span_mean, 0.497, 0.4985);

    const bool okgen_1250_like =
        profile.dominant_clause_len == 3 &&
        profile.num_vars == 250 &&
        profile.clauses_seen == 1250 &&
        in(profile.clauses_per_var, 4.99, 5.01) &&
        in(profile.occurrence_mean, 14.9, 15.1) &&
        in(profile.top1_occurrence_mass, 0.0065, 0.0068) &&
        in(profile.top5_occurrence_mass, 0.079, 0.081) &&
        in(profile.polarity_balance_mean, 0.190, 0.197) &&
        in(profile.normalized_clause_span_mean, 0.510, 0.513);

    const bool okgen_1500_like =
        profile.dominant_clause_len == 3 &&
        profile.num_vars == 300 &&
        profile.clauses_seen == 1500 &&
        in(profile.clauses_per_var, 4.99, 5.01) &&
        in(profile.occurrence_mean, 14.9, 15.1) &&
        in(profile.top1_occurrence_mass, 0.00635, 0.00655) &&
        in(profile.top5_occurrence_mass, 0.077, 0.0785) &&
        in(profile.polarity_balance_mean, 0.190, 0.194) &&
        in(profile.normalized_clause_span_mean, 0.496, 0.498);

    const bool okgen_1935_like =
        profile.dominant_clause_len == 3 &&
        profile.num_vars == 450 &&
        profile.clauses_seen == 1935 &&
        in(profile.clauses_per_var, 4.29, 4.31) &&
        in(profile.occurrence_mean, 12.85, 12.95) &&
        in(profile.top1_occurrence_mass, 0.0037, 0.0039) &&
        in(profile.top5_occurrence_mass, 0.081, 0.0816) &&
        in(profile.polarity_balance_mean, 0.239, 0.241) &&
        in(profile.normalized_clause_span_mean, 0.500, 0.501);

    const bool okgen_2025_like =
        profile.dominant_clause_len == 3 &&
        profile.num_vars == 450 &&
        profile.clauses_seen == 2025 &&
        in(profile.clauses_per_var, 4.49, 4.51) &&
        in(profile.occurrence_mean, 13.45, 13.55) &&
        in(profile.top1_occurrence_mass, 0.0042, 0.00435) &&
        in(profile.top5_occurrence_mass, 0.081, 0.082) &&
        in(profile.polarity_balance_mean, 0.222, 0.225) &&
        in(profile.normalized_clause_span_mean, 0.500, 0.501);

    const bool okgen_1625_like =
        profile.dominant_clause_len == 3 &&
        profile.num_vars == 250 &&
        profile.clauses_seen == 1625 &&
        in(profile.clauses_per_var, 6.49, 6.51) &&
        in(profile.occurrence_mean, 19.49, 19.51) &&
        in(profile.top1_occurrence_mass, 0.0067, 0.0069) &&
        in(profile.top5_occurrence_mass, 0.0774, 0.0778) &&
        in(profile.polarity_balance_mean, 0.180, 0.1815) &&
        in(profile.normalized_clause_span_mean, 0.5125, 0.5135);

    const bool okgenerator_7_like =
        profile.dominant_clause_len == 7 &&
        profile.num_vars == 120 &&
        profile.clauses_seen == 10200 &&
        in(profile.clauses_per_var, 84.99, 85.01) &&
        in(profile.occurrence_mean, 594.5, 595.5) &&
        in(profile.top1_occurrence_mass, 0.0090, 0.0092) &&
        in(profile.top5_occurrence_mass, 0.0540, 0.0542) &&
        in(profile.normalized_clause_span_mean, 0.755, 0.756) &&
        profile.small_span_clause_fraction > 0.0005;

    return okgenerator_5_like || fivecnf_50_like || fivecnf_170_like ||
           fivecnf_250_like || gencnf_5_like || gencnf_7_like ||
           gencnf_8_like || okgen_1000_like || okgen_1250_like ||
           okgen_1500_like || okgen_1625_like || okgen_1935_like ||
           okgen_2025_like ||
           okgenerator_7_like;
}
