File tree 5 files changed +33
-26
lines changed
5 files changed +33
-26
lines changed Original file line number Diff line number Diff line change 8
8
9
9
#include " prop.h"
10
10
11
- #include < cassert>
12
-
13
11
// / asserts a==b in the propositional formula
14
12
void propt::set_equal (literalt a, literalt b)
15
13
{
16
14
lcnf (a, !b);
17
15
lcnf (!a, b);
18
16
}
19
17
20
- void propt::set_assignment (literalt a, bool value)
21
- {
22
- assert (false );
23
- }
24
-
25
- void propt::copy_assignment_from (const propt &src)
26
- {
27
- assert (false );
28
- }
29
-
30
- // / \return true iff the given literal is part of the final conflict
31
- bool propt::is_in_conflict (literalt l) const
32
- {
33
- assert (false );
34
- return false ;
35
- }
36
-
37
18
// / generates a bitvector of given width with new variables
38
19
// / \return bitvector
39
20
bvt propt::new_variables (std::size_t width)
Original file line number Diff line number Diff line change @@ -98,13 +98,13 @@ class propt:public messaget
98
98
99
99
// satisfying assignment
100
100
virtual tvt l_get (literalt a) const =0;
101
- virtual void set_assignment (literalt a, bool value);
102
- virtual void copy_assignment_from (const propt &prop);
101
+ virtual void set_assignment (literalt a, bool value) = 0;
103
102
104
- // Returns true if an assumption is in the final conflict.
105
- // Note that only literals that are assumptions (see set_assumptions)
106
- // may be queried.
107
- virtual bool is_in_conflict (literalt l) const ;
103
+ // / Returns true if an assumption is in the final conflict.
104
+ // / Note that only literals that are assumptions (see set_assumptions)
105
+ // / may be queried.
106
+ // / \return true iff the given literal is part of the final conflict
107
+ virtual bool is_in_conflict (literalt l) const = 0;
108
108
virtual bool has_is_in_conflict () const { return false ; }
109
109
110
110
// an incremental solver may remove any variables that aren't frozen
Original file line number Diff line number Diff line change 9
9
10
10
#include " dimacs_cnf.h"
11
11
12
+ #include < util/invariant.h>
12
13
#include < util/magic.h>
13
14
14
15
#include < iostream>
@@ -18,6 +19,17 @@ dimacs_cnft::dimacs_cnft():break_lines(false)
18
19
{
19
20
}
20
21
22
+ void dimacs_cnft::set_assignment (literalt a, bool value)
23
+ {
24
+ UNIMPLEMENTED;
25
+ }
26
+
27
+ bool dimacs_cnft::is_in_conflict (literalt l) const
28
+ {
29
+ UNREACHABLE;
30
+ return false ;
31
+ }
32
+
21
33
dimacs_cnf_dumpt::dimacs_cnf_dumpt (std::ostream &_out):out(_out)
22
34
{
23
35
}
Original file line number Diff line number Diff line change @@ -24,11 +24,14 @@ class dimacs_cnft:public cnf_clause_listt
24
24
25
25
// dummy functions
26
26
27
- virtual const std::string solver_text ()
27
+ const std::string solver_text () override
28
28
{
29
29
return " DIMACS CNF" ;
30
30
}
31
31
32
+ void set_assignment (literalt a, bool value) override ;
33
+ bool is_in_conflict (literalt l) const override ;
34
+
32
35
protected:
33
36
void write_problem_line (std::ostream &out);
34
37
void write_clauses (std::ostream &out);
Original file line number Diff line number Diff line change @@ -163,6 +163,17 @@ class bdd_propt:public propt
163
163
164
164
bool has_set_to () const override { return false ; }
165
165
bool cnf_handled_well () const override { return false ; }
166
+
167
+ void set_assignment (literalt, bool ) override
168
+ {
169
+ UNIMPLEMENTED;
170
+ }
171
+
172
+ bool is_in_conflict (literalt) const override
173
+ {
174
+ UNREACHABLE;
175
+ return false ;
176
+ }
166
177
};
167
178
168
179
SCENARIO (" miniBDD" , " [core][solver][miniBDD]" )
You can’t perform that action at this time.
0 commit comments