File tree Expand file tree Collapse file tree 4 files changed +22
-26
lines changed Expand file tree Collapse file tree 4 files changed +22
-26
lines changed Original file line number Diff line number Diff line change @@ -8,32 +8,13 @@ Author: Daniel Kroening, kroening@kroening.com
88
99#include " prop.h"
1010
11- #include < cassert>
12-
1311// / asserts a==b in the propositional formula
1412void propt::set_equal (literalt a, literalt b)
1513{
1614 lcnf (a, !b);
1715 lcnf (!a, b);
1816}
1917
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-
3718// / generates a bitvector of given width with new variables
3819// / \return bitvector
3920bvt 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
9898
9999 // satisfying assignment
100100 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;
103102
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;
108108 virtual bool has_is_in_conflict () const { return false ; }
109109
110110 // an incremental solver may remove any variables that aren't frozen
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ Author: Daniel Kroening, kroening@kroening.com
99
1010#include " dimacs_cnf.h"
1111
12+ #include < util/invariant.h>
1213#include < util/magic.h>
1314
1415#include < iostream>
@@ -18,6 +19,17 @@ dimacs_cnft::dimacs_cnft():break_lines(false)
1819{
1920}
2021
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+
2133dimacs_cnf_dumpt::dimacs_cnf_dumpt (std::ostream &_out):out(_out)
2234{
2335}
Original file line number Diff line number Diff line change @@ -24,11 +24,14 @@ class dimacs_cnft:public cnf_clause_listt
2424
2525 // dummy functions
2626
27- virtual const std::string solver_text ()
27+ const std::string solver_text () override
2828 {
2929 return " DIMACS CNF" ;
3030 }
3131
32+ void set_assignment (literalt a, bool value) override ;
33+ bool is_in_conflict (literalt l) const override ;
34+
3235protected:
3336 void write_problem_line (std::ostream &out);
3437 void write_clauses (std::ostream &out);
You can’t perform that action at this time.
0 commit comments