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
6
ABC_NAMESPACE_CXX_HEADER_START
7
8
namespace
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
21
struct
Clause
;
22
struct
Internal
;
23
24
class
Instantiator
{
25
26
friend
struct
Internal
;
27
28
struct
Candidate {
29
int
lit
;
30
int
size;
31
size_t
negoccs;
32
Clause
*
clause
;
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
39
public
:
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
49
ABC_NAMESPACE_CXX_HEADER_END
50
51
#endif
ABC_NAMESPACE_CXX_HEADER_START
#define ABC_NAMESPACE_CXX_HEADER_START
Definition
abc_namespaces.h:52
ABC_NAMESPACE_CXX_HEADER_END
#define ABC_NAMESPACE_CXX_HEADER_END
Definition
abc_namespaces.h:53
global.h
CaDiCaL::Instantiator
Definition
instantiate.hpp:24
CaDiCaL::Instantiator::Internal
friend struct Internal
Definition
instantiate.hpp:26
CaDiCaL::Instantiator::candidate
void candidate(int l, Clause *c, int s, size_t n)
Definition
instantiate.hpp:40
bool
#define bool
Definition
espresso.h:254
CaDiCaL
Definition
arena.hpp:8
lit
int lit
Definition
satVec.h:130
CaDiCaL::Clause
Definition
clause.hpp:34
CaDiCaL::Internal
Definition
internal.hpp:136
clause
Definition
clause.h:22
vector
Definition
vector.h:32
src
sat
cadical
instantiate.hpp
Generated by Doxygen 1.13.2 © 2025 EPTansuo. All rights reserved.
鲁ICP备2021046540号