From 5127d5a9a99155d4395f2f43c46aa41902e6c05d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Chocholat=C3=BD?= Date: Thu, 28 Mar 2024 06:39:36 +0100 Subject: [PATCH 1/2] Improve naming --- include/mata/nfa/nfa.hh | 8 ++++---- src/nfa/operations.cc | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/mata/nfa/nfa.hh b/include/mata/nfa/nfa.hh index 26ade1d9..4e4a8294 100644 --- a/include/mata/nfa/nfa.hh +++ b/include/mata/nfa/nfa.hh @@ -313,11 +313,11 @@ public: bool is_acyclic() const; /** - * Fill @p alphabet with symbols from @p nfa. - * @param[in] nfa NFA with symbols to fill @p alphabet with. - * @param[out] alphabet Alphabet to be filled with symbols from @p nfa. + * Fill @p alphabet_to_fill with symbols from @p nfa. + * @param[in] nfa NFA with symbols to fill @p alphabet_to_fill with. + * @param[out] alphabet_to_fill Alphabet to be filled with symbols from @p nfa. */ - void fill_alphabet(mata::OnTheFlyAlphabet& alphabet) const; + void fill_alphabet(mata::OnTheFlyAlphabet& alphabet_to_fill) const; /// Is the language of the automaton universal? bool is_universal(const Alphabet& alphabet, Run* cex = nullptr, diff --git a/src/nfa/operations.cc b/src/nfa/operations.cc index f3aea2af..c311a936 100644 --- a/src/nfa/operations.cc +++ b/src/nfa/operations.cc @@ -743,11 +743,11 @@ std::ostream& std::operator<<(std::ostream& os, const Nfa& nfa) { return os; } -void mata::nfa::Nfa::fill_alphabet(OnTheFlyAlphabet& alphabet) const { +void mata::nfa::Nfa::fill_alphabet(OnTheFlyAlphabet& alphabet_to_fill) const { for (const StatePost& state_post: this->delta) { for (const SymbolPost& symbol_post: state_post) { - alphabet.update_next_symbol_value(symbol_post.symbol); - alphabet.try_add_new_symbol(std::to_string(symbol_post.symbol), symbol_post.symbol); + alphabet_to_fill.update_next_symbol_value(symbol_post.symbol); + alphabet_to_fill.try_add_new_symbol(std::to_string(symbol_post.symbol), symbol_post.symbol); } } } From 01b560e538d1b59422c8bb0e1ccb6612e9245d4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Chocholat=C3=BD?= Date: Thu, 28 Mar 2024 06:50:34 +0100 Subject: [PATCH 2/2] Allow moving Delta --- include/mata/nfa/delta.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/mata/nfa/delta.hh b/include/mata/nfa/delta.hh index 0811d49c..497959a5 100644 --- a/include/mata/nfa/delta.hh +++ b/include/mata/nfa/delta.hh @@ -270,9 +270,11 @@ public: Delta(): state_posts_{} {} Delta(const Delta& other) = default; + Delta(Delta&& other) = default; explicit Delta(size_t n): state_posts_{ n } {} Delta& operator=(const Delta& other) = default; + Delta& operator=(Delta&& other) = default; bool operator==(const Delta& other) const;