// View db as a queue. From the first 15/16 newest clauses, delete anything with // more than 42 literals. From the last 1/16, delete anything with more than 8. // This is a simplification of Berkmin. We'd need to add the notion of clause // activity in order to do it properly. We'd also need restarts. // Call it a TODO func berkmin(cdb *DB, g *guess.Guess, m *Manager) { var ( beginning = (g.NAssigned() / 16) * 15 count = 0 tmp *Entry ) for e := cdb.Learned; e != nil; e = e.Next { count++ if count > beginning { if len(e.Clause.Lits) > 8 { tmp = e.Prev cdb.DelEntry(e) e = tmp } } else { if len(e.Clause.Lits) > 42 { tmp = e.Prev cdb.DelEntry(e) e = tmp } } } }