#15078: new module: finite state machines, automata, transducers
-------------------------------------------------+-------------------------
Reporter: dkrenn | Owner:
Type: enhancement | Status:
Priority: major | needs_review
Component: combinatorics | Milestone: sage-5.13
Keywords: finite state machines, | Resolution:
automaton, transducer | Merged in:
Authors: Clemens Heuberger, Daniel | Reviewers:
Krenn, Sara Kropf | Work issues:
Report Upstream: N/A | Commit:
Branch: | Stopgaps:
Dependencies: |
-------------------------------------------------+-------------------------
Comment (by slabbe):
Hi there, I just tested the most recent patch. All test pass.
Documentation builds fine again. Correction were made after my previous
comments : documentation of the input `FiniteStateMachine` is now great,
new classes for `Automaton` and `Transducer` were done.
Related to the creation of the three classes, I think still another thing
must be done : document the differences between them. The user of these
classes will know that the three classes exist (because the documentation
of one class refers to the other one). The user understand the inputs are
the same, but then will ask why should he use one class instead of the
other one?
{{{
OUTPUT:
A finite state machine.
The object creation of "Automaton" and "Transducer" is the same as
the one described here (i.e. just replace the word
"FiniteStateMachine" by "Automaton" or "Transducer").
}}}
I am suggesting some fixes below that should help to answer this global
question.
1. There should be a new `_repr_` method for Automaton and Transducer (I
am sorry I forgot to mention this repr method in my previous comment):
{{{
sage: FiniteStateMachine()
Finite state machine with 0 states
sage: Automaton()
Automaton with 0 states
sage: Transducer()
Transducer with 0 states
}}}
instead of
{{{
sage: FiniteStateMachine()
finite state machine with 0 states
sage: Automaton()
finite state machine with 0 states
sage: Transducer()
finite state machine with 0 states
}}}
2. The documentation of `FiniteStateMachine` should include a two line
paragraph (maybe before the INPUT block) saying why the user wants to use
this class and why the user should prefer to use another class like
Automaton or Transducer. For instance : "For determinisation and
minimisation, use Automaton class".
3. Documentation of Automaton (and Transducer):
{{{
class Automaton(FiniteStateMachine):
"""
This creates an automaton, which is a special type of a finite
state machine.
See class :class:`FiniteStateMachine` for more information.
TESTS::
sage: Automaton()
finite state machine with 0 states
"""
}}}
Why is it special? Mention methods that are defined for Automaton and not
for `FiniteStateMachine`. Same comments for Transducer.
The first example of the documentation of `FiniteStateMachine` uses
`word_out` which is not the best first example for the user using
`Automaton`. So, I suggest to add an `EXAMPLES::` section in the doc of
Automaton class containing the creation of at least one non empty
Automaton.
{{{
class Automaton(FiniteStateMachine):
r"""
...
The inputs are the same as for :class:`FiniteStateMachine`.
See class :class:`FiniteStateMachine` for more information.
EXAMPLES:
...
TESTS::
sage: Automaton()
finite state machine with 0 states
}}}
4. A typo (finial) :
{{{
* "initial_states" and "final_states" -- the initial and finial
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/15078#comment:25>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.