CBMC
prop.cpp
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module:
4
5
Author: Daniel Kroening, kroening@kroening.com
6
7
\*******************************************************************/
8
9
#include "
prop.h
"
10
12
void
propt::set_equal
(
literalt
a,
literalt
b)
13
{
14
lcnf
(a, !b);
15
lcnf
(!a, b);
16
}
17
20
bvt
propt::new_variables
(std::size_t width)
21
{
22
bvt
result;
23
result.reserve(width);
24
for
(std::size_t i=0; i<width; i++)
25
result.push_back(
new_variable
());
26
return
result;
27
}
28
29
propt::resultt
propt::prop_solve
()
30
{
31
++
number_of_solver_calls
;
32
return
do_prop_solve
();
33
}
34
35
std::size_t
propt::get_number_of_solver_calls
()
const
36
{
37
return
number_of_solver_calls
;
38
}
propt::new_variables
virtual bvt new_variables(std::size_t width)
generates a bitvector of given width with new variables
Definition:
prop.cpp:20
bvt
std::vector< literalt > bvt
Definition:
literal.h:201
propt::set_equal
virtual void set_equal(literalt a, literalt b)
asserts a==b in the propositional formula
Definition:
prop.cpp:12
propt::new_variable
virtual literalt new_variable()=0
propt::do_prop_solve
virtual resultt do_prop_solve()=0
propt::number_of_solver_calls
std::size_t number_of_solver_calls
Definition:
prop.h:129
propt::prop_solve
resultt prop_solve()
Definition:
prop.cpp:29
prop.h
propt::resultt
resultt
Definition:
prop.h:97
propt::get_number_of_solver_calls
std::size_t get_number_of_solver_calls() const
Definition:
prop.cpp:35
literalt
Definition:
literal.h:25
propt::lcnf
void lcnf(literalt l0, literalt l1)
Definition:
prop.h:56
src
solvers
prop
prop.cpp
Generated by
1.8.17