#include "formula_profile.h"

LYMPHOSAT_MATCHER {
    const bool context_model =
        profile.exactly_one_intra_pair_coverage >= 0.99 &&
        profile.exactly_one_intra_pair_coverage <= 1.0 &&
        profile.positive_block_candidate_len >= 3 &&
        profile.positive_block_candidate_len <= 5 &&
        profile.binary_clause_fraction >= 0.24 &&
        profile.binary_clause_fraction <= 0.34 &&
        profile.ternary_clause_fraction >= 0.63 &&
        profile.ternary_clause_fraction <= 0.76 &&
        profile.all_positive_clause_fraction >= 0.031 &&
        profile.all_positive_clause_fraction <= 0.075 &&
        profile.horn_clause_fraction >= 0.77 &&
        profile.horn_clause_fraction <= 0.85 &&
        profile.positive_block_clause_fraction >= 0.029 &&
        profile.positive_block_clause_fraction <= 0.062 &&
        profile.normalized_clause_span_mean >= 0.11 &&
        profile.normalized_clause_span_mean <= 0.15;

    const bool table_model =
        profile.exactly_one_intra_pair_coverage >= 0.49 &&
        profile.exactly_one_intra_pair_coverage <= 0.51 &&
        profile.positive_block_candidate_len >= 15 &&
        profile.positive_block_candidate_len <= 32 &&
        profile.binary_clause_fraction >= 0.78 &&
        profile.binary_clause_fraction <= 0.85 &&
        profile.ternary_clause_fraction >= 0.14 &&
        profile.ternary_clause_fraction <= 0.20 &&
        profile.all_positive_clause_fraction <= 0.0115 &&
        profile.horn_clause_fraction >= 0.963 &&
        profile.positive_block_clause_fraction <= 0.011 &&
        profile.normalized_clause_span_mean <= 0.103 &&
        profile.small_span_clause_fraction >= 0.50;

    const bool sgp_family =
        profile.positive_block_candidate_len == 2 &&
        profile.exactly_one_intra_pair_coverage >= 0.0 &&
        profile.exactly_one_intra_pair_coverage <= 0.0001 &&
        profile.binary_clause_fraction >= 0.69 &&
        profile.binary_clause_fraction <= 0.84 &&
        profile.ternary_clause_fraction >= 0.18 &&
        profile.ternary_clause_fraction <= 0.30 &&
        profile.all_positive_clause_fraction >= 0.20 &&
        profile.all_positive_clause_fraction <= 0.23 &&
        profile.horn_clause_fraction >= 0.67 &&
        profile.horn_clause_fraction <= 0.71 &&
        profile.positive_block_clause_fraction >= 0.17 &&
        profile.positive_block_clause_fraction <= 0.205 &&
        profile.normalized_clause_span_mean >= 0.366 &&
        profile.normalized_clause_span_mean <= 0.386 &&
        profile.small_span_clause_fraction <= 0.002;

    const bool cp_c18_social_golfer =
        profile.positive_block_candidate_len == 2 &&
        profile.exactly_one_intra_pair_coverage >= 0.099 &&
        profile.exactly_one_intra_pair_coverage <= 0.120 &&
        profile.binary_clause_fraction >= 0.217 &&
        profile.binary_clause_fraction <= 0.236 &&
        profile.ternary_clause_fraction >= 0.332 &&
        profile.ternary_clause_fraction <= 0.341 &&
        profile.all_positive_clause_fraction >= 0.105 &&
        profile.all_positive_clause_fraction <= 0.124 &&
        profile.horn_clause_fraction >= 0.264 &&
        profile.horn_clause_fraction <= 0.266 &&
        profile.positive_block_clause_fraction >= 0.086 &&
        profile.positive_block_clause_fraction <= 0.105 &&
        profile.normalized_clause_span_mean >= 0.425 &&
        profile.normalized_clause_span_mean <= 0.435 &&
        profile.small_span_clause_fraction >= 0.022 &&
        profile.small_span_clause_fraction <= 0.029;

    return context_model || table_model || sgp_family || cp_c18_social_golfer;
}
