# Solver Notes

## Formula Notes

- Training instances are medium-sized product-configuration style CNFs with
  roughly 1.5k-1.9k variables and 5.7k-11.3k clauses.
- Clause distributions are dominated by many unit clauses and binary
  implications, plus a smaller number of long support/cardinality-like clauses.
- Plain unit propagation assigns most fixed feature variables but does not
  directly refute the formulas. However, after those units are present, the
  remaining contradictions are very shallow: a small number of decisions and
  implication conflicts is enough for every train instance.
- All 19 visible train instances are UNSAT. The solver still contains a SAT
  path and verifies any produced model against the original CNF before printing
  `SATISFIABLE`.

## Techniques Used

- A compact, from-scratch CDCL engine with two-watched-literal propagation,
  first-UIP clause learning, static occurrence activity, simple VSIDS-style
  bumps, and occasional restarts.
- Learned clauses are logged as VeriPB `rup` constraints. The final level-zero
  conflict is emitted as an empty `rup >= 1 ;` contradiction.
- SAT output is guarded by an independent full-clause model check; parse
  failures or unsupported states return `UNKNOWN`.

## Remaining Things To Try

- Recover the exact high-level product/feature model encoding. The current
  solver exploits the implication-heavy shape but does not name feature blocks.
- Add clause minimization for even smaller proofs if hidden instances are more
  difficult.
- Tune branching by separating unit-fixed feature variables from auxiliary
  variables once the encoding is mapped.

## Known Limitations

- This is not intended as a full competition SAT solver. It is deliberately
  small and tuned for shallow configuration contradictions.
- UNSAT soundness relies on VeriPB checking the emitted RUP proof. SAT soundness
  relies on the internal model checker before exit code 10.
- If a future instance needs heavy arithmetic/cardinality proof steps, the
  current RUP-only proof logging may be slower than a specialized PB derivation.

## Changelog

- Initial scaffold: placeholder UNKNOWN solver.
- Added DIMACS profiling over the training split and confirmed the family has
  many units, many binary implications, and shallow residual contradictions.
- Replaced the placeholder with a self-contained C++ CDCL solver and VeriPB RUP
  proof logger.
- Locally verified all 19 training instances with `veripb --cnf`.
- Updated metadata and notes for broker submission.
