#15963: finite_state_machine: New attribute FSMState.color to prohibit merging 
in
simplification
-------------------------------------+-------------------------------------
       Reporter:  cheuberg           |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  minor              |    Milestone:  sage-6.2
      Component:  combinatorics      |   Resolution:
       Keywords:                     |    Merged in:
  finite_state_machine               |    Reviewers:  Daniel Krenn
        Authors:  Clemens Heuberger  |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  d51be51b8299930abc0e6b72700eca79cd978cfc
  u/cheuberg/fsm/state_color         |     Stopgaps:
   Dependencies:  #15841, #15847,    |
  #15848, #15849, #15850             |
-------------------------------------+-------------------------------------

Comment (by cheuberg):

 The following behaviour is undesired (docstrings says that
 colors are tuples of the colors of the constituent states,
 but this is not the case and leads to problems in
 Automaton.determinisation):
 {{{
 sage: A = Automaton([[0, 0, 0]], initial_states=[0])
 sage: B = A.product_FiniteStateMachine(A,
 ....:                                  lambda t1, t2: (0, None))
 sage: B.states()[0].color
 [None, None]
 sage: B.determinisation()
 Traceback (most recent call last):
 ...
 TypeError: unhashable type: 'list'
 sage: A = Automaton([[0, 0, 0]], initial_states=[0])
 sage: B = A.composition(A, algorithm='explorative')
 sage: B.states()[0].color
 [None, None]
 sage: B.determinisation()
 Traceback (most recent call last):
 ...
 TypeError: unhashable type: 'list'
 }}}
 I pushed commits correcting this and adding two more docstrings to
 emphasize that colors have to be hashable in order to be able to use
 Automaton.determinisation.

--
Ticket URL: <http://trac.sagemath.org/ticket/15963#comment:4>
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/d/optout.

Reply via email to