Open Adda0 opened 1 year ago
There is a mismatch of names such as concatenate()
(verb) and intersection()
(noun). We should unify them.
Further suggestions are:
intersection_eps()
to intersection_with_eps()
.concatenate
to concatenate_with_eps()
.uni
to something that at least slightly resembles union operation. Even unite()
would be better.I'm also strongly voting for renaming uni
function. Like what...the...fuck????
Definitely, I will add it to the list of names to change.
We agreed that methods should compute operations in-place, if possible, functions should return a new instance, making the computation of the operation out-of-place, and both should use verbs for their names. Furthermore, the method and its corresponding function should be named the same.
Should we add lang_union()
(or something similar) as a single function to encapsulate calling operations union_nondet()
and union_product()
from #412, as discussed in https://github.com/VeriFIT/mata/pull/412#discussion_r1665758503?
There are a few functions, such as
Nfa::determinize()
which operate on automata passed as a parameter and return a new automaton. There are also method, usually calledNfa::Nfa::get_..._automaton()
orNfa::Nfa::get_..._words
, etc., e.g.,Nfa::Nfa::get_one_letter_automaton()
, which operate on the underlying automaton object and return a new automaton. Finally, there are methods which operate on the underlying automaton object and perform the operation in place (for example,Nfa::Nfa::trim()
).We should agree on whether we want to try to unify these variants, or when each variant can be used.