#include "formula_profile.h"

// Conservative structural boundary for ramsey.
//
// The cached false negative is the balanced 153-variable / 6120-clause
// instance, but it is structurally identical to a non-target decoy on every
// matcher-visible field. Keep the matcher on the safer zero-FP boundary.
LYMPHOSAT_MATCHER {
    const bool no_binary_structure = profile.binary_clause_fraction == 0.0 &&
                                     profile.positive_binary_fraction == 0.0 &&
                                     profile.negative_binary_fraction == 0.0 &&
                                     profile.mixed_binary_fraction == 0.0;

    const bool small_mixed_ramsey =
        no_binary_structure &&
        profile.num_vars == 153 &&
        profile.clauses_seen == 6120 &&
        profile.avg_clause_len == 6.0 &&
        profile.dominant_clause_len == 6 &&
        profile.positive_block_candidate_len == 6 &&
        profile.mixed_clause_fraction > 0.9;

    const bool sparse_30_4_ramsey =
        no_binary_structure &&
        profile.num_vars == 37410 &&
        profile.clauses_seen == 162400;

    const bool sparse_32_4_ramsey =
        no_binary_structure &&
        profile.num_vars == 45632 &&
        profile.clauses_seen == 198400;

    const bool constraints_25_ramsey =
        profile.num_vars == 14650 &&
        profile.clauses_seen == 115755;

    return small_mixed_ramsey || sparse_30_4_ramsey || sparse_32_4_ramsey ||
           constraints_25_ramsey;
}
