#include "formula_profile.h"

LYMPHOSAT_MATCHER {
    const bool ternary_only_local =
        profile.binary_clause_fraction == 0.0 &&
        profile.ternary_clause_fraction == 1.0 &&
        profile.normalized_clause_span_mean <= 0.016 &&
        profile.small_span_clause_fraction <= 0.001 &&
        profile.binary_graph_degree_mean == 0.0 &&
        profile.positive_block_clause_fraction <= 0.0065 &&
        profile.positive_block_candidate_len <= 3 &&
        profile.occurrence_mean >= 145.0 &&
        profile.occurrence_stddev >= 180.0 &&
        profile.pure_var_fraction == 0.0 &&
        profile.polarity_balance_mean <= 0.02;

    const bool mixed_exactly_one =
        profile.binary_clause_fraction >= 0.07 &&
        profile.binary_clause_fraction <= 0.24 &&
        profile.ternary_clause_fraction >= 0.45 &&
        profile.ternary_clause_fraction <= 0.49 &&
        profile.normalized_clause_span_mean <= 0.12 &&
        profile.small_span_clause_fraction <= 0.13 &&
        profile.binary_graph_degree_mean >= 2.2 &&
        profile.binary_graph_degree_mean <= 3.0 &&
        profile.positive_block_clause_fraction > 0.0 &&
        profile.positive_block_clause_fraction <= 0.003 &&
        profile.positive_block_candidate_len <= 3 &&
        profile.pure_var_fraction <= 0.04 &&
        profile.polarity_balance_mean >= 0.03 &&
        profile.polarity_balance_mean <= 0.11 &&
        profile.occurrence_mean >= 15.0 &&
        profile.occurrence_mean <= 60.0;

    const bool sparse_high_purity =
        profile.binary_clause_fraction <= 0.001 &&
        profile.ternary_clause_fraction >= 0.72 &&
        profile.normalized_clause_span_mean <= 0.017 &&
        profile.binary_graph_degree_mean == 1.0 &&
        profile.positive_block_clause_fraction <= 0.0005 &&
        profile.positive_block_candidate_len == 2 &&
        profile.pure_var_fraction >= 0.25 &&
        profile.polarity_balance_mean >= 0.37 &&
        profile.polarity_balance_mean <= 0.57 &&
        profile.occurrence_mean >= 220.0 &&
        profile.occurrence_stddev >= 200.0;

    return ternary_only_local || mixed_exactly_one || sparse_high_purity;
}
