|
| enumerator_algorithm (const Rewriter &R_, const data::data_specification &dataspec_, const DataRewriter &datar_, enumerator_identifier_generator &id_generator_, bool accept_solutions_with_variables, std::size_t max_count=(std::numeric_limits< std::size_t >::max)()) |
|
| enumerator_algorithm (const enumerator_algorithm< Rewriter, DataRewriter > &)=delete |
|
| ~enumerator_algorithm () |
|
void | reset_id_generator () |
|
template<typename EnumeratorListElement , typename MutableSubstitution , typename ReportSolution , typename Reject = always_false<typename EnumeratorListElement::expression_type>, typename Accept = always_false<typename EnumeratorListElement::expression_type>> |
bool | enumerate_front (enumerator_queue< EnumeratorListElement > &P, MutableSubstitution &sigma, ReportSolution report_solution, Reject reject=Reject(), Accept accept=Accept()) const |
| Enumerates the front element of the todo list P. The enumeration is interrupted when report_solution returns true for the reported solution.
|
|
template<typename EnumeratorListElement , typename MutableSubstitution , typename ReportSolution , typename Reject = always_false<typename EnumeratorListElement::expression_type>, typename Accept = always_false<typename EnumeratorListElement::expression_type>> |
std::size_t | enumerate_all (enumerator_queue< EnumeratorListElement > &P, MutableSubstitution &sigma, ReportSolution report_solution, Reject reject=Reject(), Accept accept=Accept()) const |
| Enumerates until P is empty. Solutions are reported using the callback function report_solution. The enumeration is interrupted when report_solution returns true for the reported solution.
|
|
template<typename EnumeratorListElement , typename MutableSubstitution , typename ReportSolution , typename Reject = always_false<typename EnumeratorListElement::expression_type>, typename Accept = always_false<typename EnumeratorListElement::expression_type>> |
std::size_t | enumerate (const EnumeratorListElement &p, MutableSubstitution &sigma, ReportSolution report_solution, Reject reject=Reject(), Accept accept=Accept()) const |
| Enumerates the element p. Solutions are reported using the callback function report_solution. The enumeration is interrupted when report_solution returns true for the reported solution.
|
|
template<typename EnumeratorListElement , typename MutableSubstitution , typename ReportSolution , typename Reject = always_false<typename EnumeratorListElement::expression_type>, typename Accept = always_false<typename EnumeratorListElement::expression_type>> |
std::size_t | enumerate (const variable_list &vars, const typename EnumeratorListElement::expression_type &cond, MutableSubstitution &sigma, ReportSolution report_solution, Reject reject=Reject(), Accept accept=Accept()) const |
| Enumerates the variables v for condition c. Solutions are reported using the callback function report_solution. The enumeration is interrupted when report_solution returns true for the reported solution.
|
|
std::size_t | max_count () const |
|
template<typename Rewriter = data::rewriter, typename DataRewriter = data::rewriter>
class mcrl2::data::enumerator_algorithm< Rewriter, DataRewriter >
An enumerator algorithm that generates solutions of a condition.
Definition at line 600 of file enumerator.h.
template<typename Rewriter = data::rewriter, typename DataRewriter = data::rewriter>
template<typename EnumeratorListElement , typename MutableSubstitution , typename ReportSolution , typename Reject = always_false<typename EnumeratorListElement::expression_type>, typename Accept = always_false<typename EnumeratorListElement::expression_type>>
std::size_t mcrl2::data::enumerator_algorithm< Rewriter, DataRewriter >::enumerate |
( |
const EnumeratorListElement & |
p, |
|
|
MutableSubstitution & |
sigma, |
|
|
ReportSolution |
report_solution, |
|
|
Reject |
reject = Reject() , |
|
|
Accept |
accept = Accept() |
|
) |
| const |
|
inline |
Enumerates the element p. Solutions are reported using the callback function report_solution. The enumeration is interrupted when report_solution returns true for the reported solution.
- Parameters
-
p | An enumerator element, i.e. an expression with a list of variables. |
sigma | A substitution. |
reject | Elements p for which reject(p) is true are discarded. |
accept | Elements p for which accept(p) is true are reported as a solution, even if the list of variables of the enumerator element is non-empty. |
report_solution | A callback function that is called whenever a solution is found. It takes an enumerator element as argument. If report_solution returns true, the enumeration is interrupted. N.B. If the enumeration is resumed after an interruption, the element p that was interrupted will be enumerated again. |
- Returns
- The number of elements that have been processed
Definition at line 977 of file enumerator.h.
template<typename Rewriter = data::rewriter, typename DataRewriter = data::rewriter>
template<typename EnumeratorListElement , typename MutableSubstitution , typename ReportSolution , typename Reject = always_false<typename EnumeratorListElement::expression_type>, typename Accept = always_false<typename EnumeratorListElement::expression_type>>
std::size_t mcrl2::data::enumerator_algorithm< Rewriter, DataRewriter >::enumerate |
( |
const variable_list & |
vars, |
|
|
const typename EnumeratorListElement::expression_type & |
cond, |
|
|
MutableSubstitution & |
sigma, |
|
|
ReportSolution |
report_solution, |
|
|
Reject |
reject = Reject() , |
|
|
Accept |
accept = Accept() |
|
) |
| const |
|
inline |
Enumerates the variables v for condition c. Solutions are reported using the callback function report_solution. The enumeration is interrupted when report_solution returns true for the reported solution.
- Parameters
-
p | An enumerator element, i.e. an expression with a list of variables. |
sigma | A substitution. |
reject | Elements p for which reject(p) is true are discarded. |
accept | Elements p for which accept(p) is true are reported as a solution, even if the list of variables of the enumerator element is non-empty. |
report_solution | A callback function that is called whenever a solution is found. It takes an enumerator element as argument. If report_solution returns true, the enumeration is interrupted. N.B. If the enumeration is resumed after an interruption, the element p that was interrupted will be enumerated again. |
- Returns
- The number of elements that have been processed
Definition at line 1006 of file enumerator.h.
template<typename Rewriter = data::rewriter, typename DataRewriter = data::rewriter>
template<typename EnumeratorListElement , typename MutableSubstitution , typename ReportSolution , typename Reject = always_false<typename EnumeratorListElement::expression_type>, typename Accept = always_false<typename EnumeratorListElement::expression_type>>
std::size_t mcrl2::data::enumerator_algorithm< Rewriter, DataRewriter >::enumerate_all |
( |
enumerator_queue< EnumeratorListElement > & |
P, |
|
|
MutableSubstitution & |
sigma, |
|
|
ReportSolution |
report_solution, |
|
|
Reject |
reject = Reject() , |
|
|
Accept |
accept = Accept() |
|
) |
| const |
|
inline |
Enumerates until P is empty. Solutions are reported using the callback function report_solution. The enumeration is interrupted when report_solution returns true for the reported solution.
- Parameters
-
P | The todo list of the algorithm. |
sigma | A substitution. |
reject | Elements p for which reject(p) is true are discarded. |
accept | Elements p for which accept(p) is true are reported as a solution, even if the list of variables of the enumerator element is non-empty. |
report_solution | A callback function that is called whenever a solution is found. It takes an enumerator element as argument. If report_solution returns true, the enumeration is interrupted. N.B. If the enumeration is resumed after an interruption, the element p that was interrupted will be enumerated again. |
- Returns
- The number of elements that have been processed
Definition at line 936 of file enumerator.h.
template<typename Rewriter = data::rewriter, typename DataRewriter = data::rewriter>
template<typename EnumeratorListElement , typename MutableSubstitution , typename ReportSolution , typename Reject = always_false<typename EnumeratorListElement::expression_type>, typename Accept = always_false<typename EnumeratorListElement::expression_type>>
bool mcrl2::data::enumerator_algorithm< Rewriter, DataRewriter >::enumerate_front |
( |
enumerator_queue< EnumeratorListElement > & |
P, |
|
|
MutableSubstitution & |
sigma, |
|
|
ReportSolution |
report_solution, |
|
|
Reject |
reject = Reject() , |
|
|
Accept |
accept = Accept() |
|
) |
| const |
|
inline |
Enumerates the front element of the todo list P. The enumeration is interrupted when report_solution returns true for the reported solution.
- Parameters
-
P | The todo list of the algorithm. |
sigma | A mutable substitution that is applied by the rewriter. |
reject | Elements p for which reject(p) is true are discarded. |
accept | Elements p for which accept(p) is true are reported as a solution, even if the list of variables of the enumerator element is non-empty. |
report_solution | A callback function that is called whenever a solution is found. It takes an enumerator element as argument. If report_solution returns true, the enumeration is interrupted. N.B. If the enumeration is resumed after an interruption, the element p that was interrupted will be enumerated again. |
- Precondition
- !P.empty()
- Returns
- If the return value is true, enumeration will be interrupted
Definition at line 707 of file enumerator.h.