#include "formula_profile.h"

// Example matcher for smoke tests. Real matcher packages should replace this
// with a conservative structural boundary for their target solver.
LYMPHOSAT_MATCHER {
    const bool composite_bit_primes =
        profile.avg_clause_len >= 4.46 &&
        profile.avg_clause_len <= 4.50 &&
        profile.binary_clause_fraction >= 0.099 &&
        profile.binary_clause_fraction <= 0.103 &&
        profile.ternary_clause_fraction >= 0.098 &&
        profile.ternary_clause_fraction <= 0.101 &&
        profile.dominant_clause_len == 5 &&
        profile.dominant_clause_len_fraction >= 0.79 &&
        profile.dominant_clause_len_fraction <= 0.81 &&
        profile.normalized_clause_span_mean >= 0.57 &&
        profile.normalized_clause_span_mean <= 0.71 &&
        profile.small_span_clause_fraction <= 0.007 &&
        profile.mixed_clause_fraction >= 0.85 &&
        profile.polarity_balance_mean <= 0.20;

    const bool clustered_ternary =
        profile.num_vars == 1200 &&
        profile.clauses_seen >= 4800 &&
        profile.clauses_seen <= 4919 &&
        profile.avg_clause_len == 3 &&
        profile.binary_clause_fraction == 0 &&
        profile.ternary_clause_fraction == 1 &&
        profile.all_positive_clause_fraction >= 0.11 &&
        profile.all_positive_clause_fraction <= 0.14 &&
        profile.all_negative_clause_fraction >= 0.11 &&
        profile.all_negative_clause_fraction <= 0.14 &&
        profile.mixed_clause_fraction >= 0.73 &&
        profile.mixed_clause_fraction <= 0.77 &&
        profile.horn_clause_fraction >= 0.48 &&
        profile.horn_clause_fraction <= 0.52 &&
        profile.dual_horn_clause_fraction >= 0.48 &&
        profile.dual_horn_clause_fraction <= 0.52 &&
        profile.positive_block_candidate_len == 3 &&
        profile.positive_block_clause_fraction >= 0.11 &&
        profile.positive_block_clause_fraction <= 0.14 &&
        profile.normalized_clause_span_mean >= 0.49 &&
        profile.normalized_clause_span_mean <= 0.51 &&
        profile.small_span_clause_fraction <= 0.002 &&
        profile.polarity_balance_mean >= 0.22 &&
        profile.polarity_balance_mean <= 0.27;

    return composite_bit_primes || clustered_ternary;
}
