ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
promote.h File Reference
#include "internal.h"
#include "global.h"
Include dependency graph for promote.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

ABC_NAMESPACE_HEADER_START void kissat_promote_clause (struct kissat *, clause *, unsigned new_glue)
 

Function Documentation

◆ kissat_promote_clause()

ABC_NAMESPACE_HEADER_START void kissat_promote_clause ( struct kissat * solver,
clause * c,
unsigned new_glue )

Definition at line 7 of file promote.c.

7 {
8 if (!GET_OPTION (promote))
9 return;
11 const unsigned old_glue = c->glue;
12 KISSAT_assert (new_glue < old_glue);
13 const unsigned tier1 = TIER1;
14 const unsigned tier2 = MAX (TIER2, TIER1);
15 if (old_glue <= tier1) {
16 LOGCLS (c, "keeping with new glue %u in tier1", new_glue);
17 INC (clauses_kept1);
18 } else if (new_glue <= tier1) {
19 KISSAT_assert (tier1 < old_glue);
20 KISSAT_assert (new_glue <= tier1);
21 LOGCLS (c, "promoting with new glue %u to tier1", new_glue);
22 INC (clauses_promoted1);
23 } else if (tier2 < old_glue && new_glue <= tier2) {
24 KISSAT_assert (tier2 < old_glue);
25 KISSAT_assert (tier1 < new_glue), KISSAT_assert (new_glue <= tier2);
26 LOGCLS (c, "promoting with new glue %u to tier2", new_glue);
27 INC (clauses_promoted2);
28 } else if (old_glue <= tier2) {
29 KISSAT_assert (tier1 < old_glue), KISSAT_assert (old_glue <= tier2);
30 KISSAT_assert (tier1 < new_glue), KISSAT_assert (new_glue <= tier2);
31 LOGCLS (c, "keeping with new glue %u in tier2", new_glue);
32 INC (clauses_kept2);
33 } else {
34 KISSAT_assert (tier2 < old_glue);
35 KISSAT_assert (tier2 < new_glue);
36 LOGCLS (c, "keeping with new glue %u in tier3", new_glue);
37 INC (clauses_kept3);
38 }
39 INC (clauses_improved);
40 c->glue = new_glue;
41#ifndef LOGGING
42 (void) solver;
43#endif
44}
#define MAX(a, b)
Definition avl.h:23
#define INC(NAME)
#define TIER1
Definition internal.h:258
#define TIER2
Definition internal.h:259
#define KISSAT_assert(ignore)
Definition global.h:13
#define solver
Definition kitten.c:211
#define LOGCLS(...)
Definition logging.h:415
#define GET_OPTION(N)
Definition options.h:295
unsigned glue
Definition clause.h:23
bool redundant
Definition clause.h:28
Here is the caller graph for this function: