ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
instantiate.hpp
Go to the documentation of this file.
1#ifndef _instantiate_hpp_INCLUDED
2#define _instantiate_hpp_INCLUDED
3
4#include "global.h"
5
7
8namespace CaDiCaL {
9
10// We are trying to remove literals in clauses, which occur in few clauses
11// and further restrict this removal to variables for which variable
12// elimination failed. Thus if for instance we succeed in removing the
13// single occurrence of a literal, pure literal elimination can
14// eliminate the corresponding variable in the next variable elimination
15// round. The set of such literal clause candidate pairs is collected at
16// the end of a variable elimination round and tried before returning. The
17// name of this technique is inspired by 'variable instantiation' as
18// described in [AnderssonBjesseCookHanna-DAC'02] and apparently
19// successfully used in the 'Oepir' SAT solver.
20
21struct Clause;
22struct Internal;
23
25
26 friend struct Internal;
27
28 struct Candidate {
29 int lit;
30 int size;
31 size_t negoccs;
33 Candidate (int l, Clause *c, int s, size_t n)
34 : lit (l), size (s), negoccs (n), clause (c) {}
35 };
36
37 vector<Candidate> candidates;
38
39public:
40 void candidate (int l, Clause *c, int s, size_t n) {
41 candidates.push_back (Candidate (l, c, s, n));
42 }
43
44 operator bool () const { return !candidates.empty (); }
45};
46
47} // namespace CaDiCaL
48
50
51#endif
#define ABC_NAMESPACE_CXX_HEADER_START
#define ABC_NAMESPACE_CXX_HEADER_END
friend struct Internal
void candidate(int l, Clause *c, int s, size_t n)
#define bool
Definition espresso.h:254
int lit
Definition satVec.h:130