HAL  v4.5.0-83-g30c8f0afc
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
simplification_local.cpp
Go to the documentation of this file.
3 
4 namespace hal
5 {
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
Result< BooleanFunction > evaluate(const BooleanFunction &function) const
#define OK(...)
Definition: result.h:56
#define ERR_APPEND(prev_error, message)
Definition: result.h:64
Result< BooleanFunction > local_simplification(const BooleanFunction &function)
Definition: defines.h:45