#include "formula_profile.h"

LYMPHOSAT_MATCHER {
    const bool short_triple_progression =
        profile.binary_clause_fraction < 0.01 &&
        profile.positive_block_candidate_len == 3 &&
        profile.positive_block_clause_fraction >= 0.97 &&
        profile.all_positive_clause_fraction >= 0.97 &&
        profile.all_negative_clause_fraction <= 0.03 &&
        profile.clauses_per_var >= 20.0 &&
        profile.normalized_clause_span_mean >= 0.13 &&
        profile.normalized_clause_span_mean <= 0.35;

    const bool balanced_no_binary_block =
        profile.binary_clause_fraction < 0.01 &&
        (profile.positive_block_candidate_len == 4 ||
         profile.positive_block_candidate_len == 5) &&
        profile.all_positive_clause_fraction == 0.5 &&
        profile.positive_block_clause_fraction == 0.5 &&
        profile.clauses_per_var >= 8.0 &&
        profile.clauses_per_var <= 30.0 &&
        profile.normalized_clause_span_mean >= 0.32 &&
        profile.normalized_clause_span_mean <= 0.35;

    const bool four_literal_positive_block =
        profile.binary_clause_fraction < 0.01 &&
        profile.positive_block_candidate_len == 4 &&
        profile.positive_block_clause_fraction >= 0.90 &&
        profile.all_positive_clause_fraction >= 0.90 &&
        profile.all_negative_clause_fraction <= 0.11 &&
        profile.clauses_per_var >= 20.0 &&
        profile.normalized_clause_span_mean >= 0.32 &&
        profile.normalized_clause_span_mean <= 0.35;

    const bool wide_cardinality_block =
        profile.binary_clause_fraction < 0.01 &&
        profile.positive_block_candidate_len >= 12 &&
        profile.positive_block_clause_fraction >= 0.45 &&
        profile.all_positive_clause_fraction >= 0.45 &&
        profile.clauses_per_var >= 200.0 &&
        profile.normalized_clause_span_mean >= 0.8;

    const bool mixed_binary_progression =
        profile.binary_clause_fraction >= 0.7 &&
        profile.positive_block_candidate_len == 2 &&
        profile.positive_block_clause_fraction >= 0.05 &&
        profile.positive_block_clause_fraction <= 0.17 &&
        profile.all_positive_clause_fraction >= 0.07 &&
        profile.all_positive_clause_fraction <= 0.18 &&
        profile.pure_var_fraction >= 0.05 &&
        profile.binary_graph_degree_mean >= 7.0 &&
        profile.horn_clause_fraction >= 0.84 &&
        profile.normalized_clause_span_mean >= 0.1 &&
        profile.normalized_clause_span_mean <= 0.48;

    return short_triple_progression || four_literal_positive_block ||
           balanced_no_binary_block;
}
