#include "formula_profile.h"

LYMPHOSAT_MATCHER {
    const bool shared_signature =
        profile.dominant_clause_len == 3 &&
        profile.binary_clause_fraction <= 0.0005 &&
        profile.ternary_clause_fraction >= 0.995 &&
        profile.positive_block_candidate_len == 3 &&
        profile.positive_block_clause_fraction >= 0.120 &&
        profile.positive_block_clause_fraction <= 0.135 &&
        profile.all_positive_clause_fraction >= 0.120 &&
        profile.all_positive_clause_fraction <= 0.135 &&
        profile.all_negative_clause_fraction >= 0.120 &&
        profile.all_negative_clause_fraction <= 0.135 &&
        profile.horn_clause_fraction >= 0.49 &&
        profile.horn_clause_fraction <= 0.513 &&
        profile.dual_horn_clause_fraction >= 0.491 &&
        profile.dual_horn_clause_fraction <= 0.509 &&
        profile.occurrence_mean >= 11.75 &&
        profile.occurrence_mean <= 11.95 &&
        profile.top5_occurrence_mass >= 0.145 &&
        profile.top5_occurrence_mass <= 0.17 &&
        profile.normalized_clause_span_mean >= 0.49 &&
        profile.normalized_clause_span_mean <= 0.52 &&
        profile.binary_vars_touched_fraction == 0 &&
        profile.binary_graph_degree_mean == 0 &&
        profile.exactly_one_intra_pair_coverage == 0 &&
        profile.pure_var_fraction == 0;

    const bool compact_window =
        profile.num_vars >= 2750 && profile.num_vars <= 5050 &&
        profile.clauses_seen >= 10880 && profile.clauses_seen <= 20000;

    const bool wide_window =
        profile.num_vars >= 8300 && profile.num_vars <= 9400 &&
        profile.clauses_seen >= 33200 && profile.clauses_seen <= 37250;

    return shared_signature && (compact_window || wide_window);
}
