@@ -1079,7 +1079,7 @@ Nfa mata::nfa::reduce(const Nfa &aut, StateRenaming *state_renaming, ReductionAl
10791079
10801080 switch (reduction_algorithm) {
10811081 case ReductionAlgorithm::SIMULATION:
1082- result = algorithms::reduce_simulation (aut, reduced_state_map);
1082+ result = algorithms::reduce_simulation (aut, reduced_state_map, direction );
10831083 break ;
10841084 case ReductionAlgorithm::RESIDUAL_AFTER:
10851085 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
15281528 }).get_word ();
15291529}
15301530
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 ) {
15321532 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" }});
15351538
15361539 auto sim_relation_symmetric = sim_relation;
15371540 sim_relation_symmetric.restrict_to_symmetric ();
0 commit comments