1#ifndef MERGE_AND_SHRINK_LABEL_REDUCTION_H
2#define MERGE_AND_SHRINK_LABEL_REDUCTION_H
9namespace equivalence_relation {
10class EquivalenceRelation;
15class RandomNumberGenerator;
18namespace merge_and_shrink {
19class FactoredTransitionSystem;
34enum class LabelReductionMethod {
35 TWO_TRANSITION_SYSTEMS,
36 ALL_TRANSITION_SYSTEMS,
37 ALL_TRANSITION_SYSTEMS_WITH_FIXPOINT
46enum class LabelReductionSystemOrder { REGULAR, REVERSE, RANDOM };
50 std::vector<int> transition_system_order;
51 bool lr_before_shrinking;
52 bool lr_before_merging;
53 LabelReductionMethod lr_method;
54 LabelReductionSystemOrder lr_system_order;
55 std::shared_ptr<utils::RandomNumberGenerator> rng;
57 bool initialized()
const;
60 void compute_label_mapping(
61 const equivalence_relation::EquivalenceRelation& relation,
62 const FactoredTransitionSystem& fts,
63 std::vector<std::pair<
int, std::vector<int>>>& label_mapping,
64 utils::LogProxy& log)
const;
65 equivalence_relation::EquivalenceRelation
66 compute_combinable_equivalence_relation(
68 const FactoredTransitionSystem& fts)
const;
72 bool before_shrinking,
74 LabelReductionMethod method,
75 LabelReductionSystemOrder system_order,
77 void initialize(
const TaskProxy& task_proxy);
79 const std::pair<int, int>& next_merge,
80 FactoredTransitionSystem& fts,
81 utils::LogProxy& log)
const;
82 void dump_options(utils::LogProxy& log)
const;
83 bool reduce_before_shrinking()
const {
return lr_before_shrinking; }
84 bool reduce_before_merging()
const {
return lr_before_merging; }