#include "formula_profile.h"

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

    // Normalized md5-equivalence instances share one extremely stable template.
    // The only visible variation is the overall problem scale (`num_vars`) and
    // the normalized span, so keep the boundary tight on the shared constants.
    return profile.clauses_seen == 1'000'000 &&
           in(profile.avg_clause_len, 2.280500, 2.280502) &&
           in(profile.binary_clause_fraction, 0.648672, 0.648674) &&
           in(profile.ternary_clause_fraction, 0.314897, 0.314899) &&
           in(profile.all_positive_clause_fraction, 0.123428, 0.123430) &&
           in(profile.all_negative_clause_fraction, 0.161411, 0.161413) &&
           in(profile.mixed_clause_fraction, 0.715158, 0.715160) &&
           in(profile.horn_clause_fraction, 0.751609, 0.751611) &&
           in(profile.dual_horn_clause_fraction, 0.744045, 0.744047) &&
           in(profile.normalized_clause_span_mean, 0.00012, 0.00246) &&
           in(profile.small_span_clause_fraction, 0.632036, 0.632038) &&
           in(profile.binary_vars_touched_fraction, 0.999997, 0.999998) &&
           in(profile.occurrence_mean, 6.10651, 6.10652) &&
           in(profile.occurrence_stddev, 27.9842, 27.9843) &&
           in(profile.polarity_balance_mean, 0.207652, 0.207653) &&
           in(profile.exactly_one_intra_pair_coverage, 0.666666, 0.666667) &&
           profile.positive_block_candidate_len == 3 &&
           in(profile.positive_block_clause_fraction, 0.059325, 0.059327) &&
           profile.dominant_clause_len == 2 &&
           in(profile.dominant_clause_len_fraction, 0.648672, 0.648674);
}
