Opened 8 years ago

Closed 8 years ago

#16191 closed task (fixed)

FiniteStateMachine: implement final_word_out

Reported by: cheuberg Owned by:
Priority: major Milestone: sage-6.3
Component: finite state machines Keywords: finite_state_machine
Cc: skropf, dkrenn Merged in:
Authors: Sara Kropf Reviewers: Clemens Heuberger, Daniel Krenn
Report Upstream: N/A Work issues:
Branch: d1f3e21 (Commits, GitHub, GitLab) Commit: d1f3e216a8e8e1913c803ec27baadc789f7b2300
Dependencies: #16206, #16207, #16253, #16145#16254 Stopgaps:

Status badges

Description (last modified by skropf)

Implement FSMState.final_word_out in order to accomodate subsequential transducers in this package. A transducer is said to be subsequential if it is deterministic, every state is final and it has a final output word for each final state, i.e., when reading an input and reaching some final state along some path, then the final output word of this state is appended to the output labels collected along the path.

This will facilitate various transducers, e.g., when we currently have to read a sufficiently large number of zeros in order to flush some more output.

final_word_out is introduced in #16253. Now final_word_out is implemented everywhere (or there is a NotImplementedError, see #16548).

Change History (10)

comment:1 Changed 8 years ago by dkrenn

  • Dependencies set to #16206

comment:2 Changed 8 years ago by cheuberg

  • Dependencies changed from #16206 to #16206, #16207

comment:3 Changed 8 years ago by skropf

  • Dependencies changed from #16206, #16207 to #16206, #16207, #16253, #16254
  • Description modified (diff)

comment:4 Changed 8 years ago by skropf

  • Dependencies changed from #16206, #16207, #16253, #16254 to #16206, #16207, #16253, #16145#16254

comment:5 Changed 8 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:6 Changed 8 years ago by cheuberg

  • Component changed from combinatorics to finite state machines

comment:7 Changed 8 years ago by skropf

  • Branch set to u/skropf/fsm/final-word-out-problems
  • Commit set to c3f2b335d22977e7ba2460cd9721553ca5274fbc
  • Description modified (diff)
  • Status changed from new to needs_review

comment:8 Changed 8 years ago by cheuberg

  • Authors set to Sara Kropf
  • Branch changed from u/skropf/fsm/final-word-out-problems to u/cheuberg/fsm/final-word-out-problems
  • Commit changed from c3f2b335d22977e7ba2460cd9721553ca5274fbc to d1f3e216a8e8e1913c803ec27baadc789f7b2300
  • Reviewers set to Clemens Heuberger

I reviewed the patch. Builds, doctests pass. I added one commit with rather minor changes (punctuation, indentation, .. TODO:: tag) and moved the new example from the private method _composition_explorative_ to the public method composition.

Please cross-review these changes and feel free to set the status to positive_review.


Last 10 new commits:

13e000cFSMState.copy also copies final_word_out
bcf3308Transducer.asymptotic_moments only accepts transducers with all states final and transducers.GrayCode is now such a transducer.
8d29348Correct TeX errors (raw string vs. string) in docstring (Gray Code)
ae8ec6bModified a few docstrings to reflect use of final output word
4927542removed determine_alphabets=True from docstrings because it is the default anyway
ba07d56Use iterators instead of lists
0be171eAdded examples for FiniteStateMachine.equivalence_classes
95414f5NotImplementedError in _composition_explorative_ if there are final word outs
c3f2b33corrected spacing
d1f3e21trac #16191: Reviewer Patch: Move one example; spacing; typo; punctuation

comment:9 Changed 8 years ago by dkrenn

  • Reviewers changed from Clemens Heuberger to Clemens Heuberger, Daniel Krenn
  • Status changed from needs_review to positive_review

Reviewed your changes (and looked at changes of skropf as well). Fine for me.

comment:10 Changed 8 years ago by vbraun

  • Branch changed from u/cheuberg/fsm/final-word-out-problems to d1f3e216a8e8e1913c803ec27baadc789f7b2300
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.