#include "formula_profile.h"

LYMPHOSAT_MATCHER {
    const bool knight_small_mixed =
        profile.num_vars <= 100000 &&
        profile.dominant_clause_len == 3 &&
        profile.binary_clause_fraction >= 0.25 &&
        profile.ternary_clause_fraction >= 0.5 &&
        profile.horn_clause_fraction >= 0.84 &&
        profile.all_positive_clause_fraction <= 0.023 &&
        profile.all_negative_clause_fraction <= 0.301 &&
        profile.polarity_balance_mean <= 0.293 &&
        profile.binary_graph_degree_mean >= 6.9 &&
        profile.occurrence_mean >= 24.0 &&
        profile.occurrence_mean <= 27.0;

    const bool knight_large_mixed =
        profile.num_vars >= 100000 &&
        profile.clauses_seen >= 1000000 &&
        profile.horn_clause_fraction >= 0.975 &&
        profile.all_positive_clause_fraction <= 0.003 &&
        profile.ternary_clause_fraction >= 0.67 &&
        profile.binary_clause_fraction >= 0.32 &&
        profile.binary_vars_touched_fraction >= 0.98 &&
        profile.polarity_balance_mean <= 0.09;

    const bool knight_dense_ternary =
        profile.num_vars >= 150000 &&
        profile.clauses_seen >= 1000000 &&
        profile.ternary_clause_fraction >= 0.9999 &&
        profile.binary_clause_fraction == 0.0 &&
        profile.all_positive_clause_fraction <= 0.0002 &&
        profile.all_negative_clause_fraction <= 0.01 &&
        profile.horn_clause_fraction >= 0.97 &&
        profile.binary_graph_degree_mean == 0.0;

    const bool hcp_d_family =
        profile.dominant_clause_len == 4 &&
        profile.exactly_one_intra_pair_coverage >= 0.9999 &&
        profile.positive_block_candidate_len == 8 &&
        profile.binary_clause_fraction >= 0.088 &&
        profile.binary_clause_fraction <= 0.104 &&
        profile.horn_clause_fraction >= 0.605 &&
        profile.horn_clause_fraction <= 0.6135 &&
        profile.all_negative_clause_fraction >= 0.224 &&
        profile.all_negative_clause_fraction <= 0.239 &&
        profile.binary_graph_degree_mean >= 11.4 &&
        profile.binary_graph_degree_mean <= 12.9 &&
        profile.occurrence_mean >= 55.0 &&
        profile.occurrence_mean <= 67.0;

    const bool hcp_cp_family =
        profile.dominant_clause_len == 2 &&
        profile.positive_block_candidate_len == 2 &&
        profile.binary_clause_fraction >= 0.644 &&
        profile.horn_clause_fraction >= 0.84 &&
        profile.all_negative_clause_fraction >= 0.273 &&
        profile.all_negative_clause_fraction <= 0.335 &&
        profile.polarity_balance_mean >= 0.296 &&
        profile.polarity_balance_mean <= 0.317 &&
        profile.occurrence_mean <= 11.0 &&
        profile.binary_graph_degree_mean <= 5.6 &&
        profile.dual_horn_clause_fraction >= 0.44;

    const bool hcp_bij16 =
        profile.dominant_clause_len == 2 &&
        profile.binary_clause_fraction >= 0.9994 &&
        profile.all_negative_clause_fraction >= 0.718 &&
        profile.horn_clause_fraction >= 0.9966 &&
        profile.binary_graph_degree_mean >= 24.0 &&
        profile.binary_vars_touched_fraction >= 1.0 &&
        profile.occurrence_mean >= 26.0 &&
        profile.occurrence_mean <= 26.1 &&
        profile.occurrence_stddev >= 81.0 &&
        profile.dual_horn_clause_fraction <= 0.282 &&
        profile.positive_block_clause_fraction <= 0.0029 &&
        profile.negative_binary_fraction >= 0.718 &&
        profile.mixed_binary_fraction <= 0.279;

    const bool hcp_r_family =
        profile.dominant_clause_len == 2 &&
        profile.binary_clause_fraction >= 0.9977 &&
        profile.all_positive_clause_fraction >= 0.011 &&
        profile.all_positive_clause_fraction <= 0.015 &&
        profile.all_negative_clause_fraction <= 0.028 &&
        profile.horn_clause_fraction >= 0.983 &&
        profile.pure_var_fraction >= 0.916 &&
        profile.polarity_balance_mean >= 0.96 &&
        profile.binary_graph_degree_mean >= 8.4 &&
        profile.occurrence_mean >= 8.4 &&
        profile.occurrence_mean <= 23.8 &&
        profile.positive_block_candidate_len == 2;

    return knight_small_mixed || knight_large_mixed || knight_dense_ternary ||
           hcp_d_family || hcp_cp_family || hcp_bij16 || hcp_r_family;
}
