#include "formula_profile.h"

LYMPHOSAT_MATCHER {
    const bool qpr_like =
        profile.all_positive_clause_fraction >= 0.12 &&
        profile.all_positive_clause_fraction <= 0.14 &&
        profile.binary_clause_fraction >= 0.14 &&
        profile.binary_clause_fraction <= 0.18 &&
        profile.ternary_clause_fraction >= 0.76 &&
        profile.ternary_clause_fraction <= 0.78 &&
        profile.horn_clause_fraction >= 0.60 &&
        profile.normalized_clause_span_mean <= 0.10 &&
        profile.small_span_clause_fraction >= 0.31 &&
        profile.positive_block_clause_fraction >= 0.09;

    const bool qpr_variant_like =
        profile.all_positive_clause_fraction >= 0.12 &&
        profile.all_positive_clause_fraction <= 0.14 &&
        profile.binary_clause_fraction >= 0.13 &&
        profile.binary_clause_fraction <= 0.15 &&
        profile.ternary_clause_fraction >= 0.765 &&
        profile.ternary_clause_fraction <= 0.78 &&
        profile.normalized_clause_span_mean <= 0.095 &&
        profile.small_span_clause_fraction >= 0.31 &&
        profile.small_span_clause_fraction <= 0.33 &&
        profile.positive_block_clause_fraction >= 0.095;

    const bool stack_like =
        profile.num_vars >= 1000000 &&
        profile.clauses_seen >= 1000000 &&
        profile.binary_clause_fraction >= 0.19 &&
        profile.ternary_clause_fraction >= 0.78 &&
        profile.normalized_clause_span_mean <= 0.02 &&
        profile.binary_vars_touched_fraction <= 0.05 &&
        (profile.pure_var_fraction >= 0.05 ||
         profile.pure_var_fraction <= 0.0015);

    const bool medium_span_like =
        profile.binary_clause_fraction >= 0.18 &&
        profile.binary_clause_fraction <= 0.24 &&
        profile.ternary_clause_fraction >= 0.44 &&
        profile.ternary_clause_fraction <= 0.52 &&
        profile.all_positive_clause_fraction >= 0.025 &&
        profile.all_positive_clause_fraction <= 0.035 &&
        profile.all_negative_clause_fraction >= 0.22 &&
        profile.all_negative_clause_fraction <= 0.27 &&
        profile.horn_clause_fraction >= 0.50 &&
        profile.horn_clause_fraction <= 0.57 &&
        profile.dual_horn_clause_fraction >= 0.46 &&
        profile.dual_horn_clause_fraction <= 0.52 &&
        profile.normalized_clause_span_mean >= 0.28 &&
        profile.normalized_clause_span_mean <= 0.39 &&
        profile.small_span_clause_fraction >= 0.11 &&
        profile.small_span_clause_fraction <= 0.13;

    const bool esawn_like =
        profile.binary_clause_fraction >= 0.65 &&
        profile.binary_clause_fraction <= 0.67 &&
        profile.ternary_clause_fraction >= 0.33 &&
        profile.ternary_clause_fraction <= 0.34 &&
        profile.all_positive_clause_fraction <= 0.005 &&
        profile.horn_clause_fraction >= 0.77 &&
        profile.horn_clause_fraction <= 0.80 &&
        profile.dual_horn_clause_fraction >= 0.74 &&
        profile.dual_horn_clause_fraction <= 0.76 &&
        profile.normalized_clause_span_mean <= 0.01 &&
        profile.small_span_clause_fraction >= 0.30 &&
        profile.small_span_clause_fraction <= 0.33;

    return qpr_like || qpr_variant_like || stack_like || medium_span_like || esawn_like;
}
