HAL
simplification_local.cpp
Go to the documentation of this file.
1
#include "
hal_core/netlist/boolean_function/simplification.h
"
2
#include "
hal_core/netlist/boolean_function/symbolic_execution.h
"
3
4
namespace
hal
5
{
6
Result<BooleanFunction>
Simplification::local_simplification
(
const
BooleanFunction
&
function
)
7
{
8
auto
current =
function
.clone(), before =
BooleanFunction
();
9
10
do
11
{
12
before = current.clone();
13
auto
simplified =
SMT::SymbolicExecution
().
evaluate
(current);
14
if
(simplified.is_error())
15
{
16
return
ERR_APPEND
(simplified.get_error(),
"could not apply local simplification: symbolic execution failed"
);
17
}
18
current = simplified.get();
19
}
while
(before != current);
20
21
return
OK
(current);
22
}
23
}
// namespace hal
hal::BooleanFunction
Definition:
boolean_function.h:55
hal::Result
Definition:
result.h:64
hal::SMT::SymbolicExecution
Definition:
symbolic_execution.h:43
hal::SMT::SymbolicExecution::evaluate
Result< BooleanFunction > evaluate(const BooleanFunction &function) const
Definition:
symbolic_execution.cpp:418
OK
#define OK(...)
Definition:
result.h:49
ERR_APPEND
#define ERR_APPEND(prev_error, message)
Definition:
result.h:57
hal::Simplification::local_simplification
Result< BooleanFunction > local_simplification(const BooleanFunction &function)
Definition:
simplification_local.cpp:6
hal
Definition:
parser_liberty.cpp:10
simplification.h
symbolic_execution.h
src
netlist
boolean_function
simplification_local.cpp
Generated on Fri Feb 14 2025 14:22:43 for HAL by
1.9.1