#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):
I had a question concerning the choices you made for the classes. Why did
you choose to have only one class {{{FiniteStateMachine}}} with the mode
argument?
{{{
#!python
def Automaton(*args, **kwargs):
return FiniteStateMachine(mode='automaton', *args, **kwargs)
def Transducer(*args, **kwargs):
return FiniteStateMachine(mode='transducer', *args, **kwargs)
}}}
The role of this mode argument is usually done transparently by the
classes.
Was it better than having three classes {{{class
FiniteStateMachine(SageObject)}}}, {{{class
Automaton(FiniteStateMachine)}}} and {{{class
Transducer(FiniteStateMachine)}}} ? Another option closer to what you have
done could be two classes : {{{class Transducer(SageObject)}}} and
{{{class Automaton(Transducer)}}} ? All this depends on the way the
methods are implemented and how much they depends on the class instance.
What would be best do you think?
There is a Sage Afternoon today in Paris. I hope to have time to take a
look more deeply at the most recent version of the patch.
--
Ticket URL: <http://trac.sagemath.org/ticket/15078#comment:19>
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.