@@ -1079,7 +1079,7 @@ Nfa mata::nfa::reduce(const Nfa &aut, StateRenaming *state_renaming, ReductionAl
1079
1079
1080
1080
switch (reduction_algorithm) {
1081
1081
case ReductionAlgorithm::SIMULATION:
1082
- result = algorithms::reduce_simulation (aut, reduced_state_map);
1082
+ result = algorithms::reduce_simulation (aut, reduced_state_map, direction );
1083
1083
break ;
1084
1084
case ReductionAlgorithm::RESIDUAL_AFTER:
1085
1085
result = algorithms::reduce_residual (aut, reduced_state_map, " after" , direction);
@@ -1528,10 +1528,13 @@ std::optional<mata::Word> mata::nfa::get_word_from_lang_difference(const Nfa & n
1528
1528
}).get_word ();
1529
1529
}
1530
1530
1531
- Nfa mata::nfa::algorithms::reduce_simulation (const Nfa& aut, StateRenaming &state_renaming) {
1531
+ Nfa mata::nfa::algorithms::reduce_simulation (const Nfa& aut, StateRenaming &state_renaming, ReductionDirection direction ) {
1532
1532
Nfa result;
1533
- const auto sim_relation = algorithms::compute_relation (
1534
- aut, ParameterMap{{ " relation" , " simulation" }, { " direction" , " forward" }});
1533
+ if (direction != ReductionDirection::FORWARD) {
1534
+ throw std::runtime_error (std::to_string (__func__) +
1535
+ " can only reduce simulation by forward direction (for now)" );
1536
+ }
1537
+ const auto sim_relation = algorithms::compute_relation (aut, ParameterMap{{ " relation" , " simulation" }, { " direction" , " forward" }});
1535
1538
1536
1539
auto sim_relation_symmetric = sim_relation;
1537
1540
sim_relation_symmetric.restrict_to_symmetric ();
0 commit comments