Opened 9 years ago

Closed 9 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 9 years ago by dkrenn

Dependencies: #16206

comment:2 Changed 9 years ago by cheuberg

Dependencies: #16206#16206, #16207

comment:3 Changed 9 years ago by skropf

Dependencies: #16206, #16207#16206, #16207, #16253, #16254
Description: modified (diff)

comment:4 Changed 9 years ago by skropf

Dependencies: #16206, #16207, #16253, #16254#16206, #16207, #16253, #16145#16254

comment:5 Changed 9 years ago by vbraun_spam

Milestone: sage-6.2sage-6.3

comment:6 Changed 9 years ago by cheuberg

Component: combinatoricsfinite state machines

comment:7 Changed 9 years ago by skropf

Branch: u/skropf/fsm/final-word-out-problems
Commit: c3f2b335d22977e7ba2460cd9721553ca5274fbc
Description: modified (diff)
Status: newneeds_review

comment:8 Changed 9 years ago by cheuberg

Authors: Sara Kropf
Branch: u/skropf/fsm/final-word-out-problemsu/cheuberg/fsm/final-word-out-problems
Commit: c3f2b335d22977e7ba2460cd9721553ca5274fbcd1f3e216a8e8e1913c803ec27baadc789f7b2300
Reviewers: 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 9 years ago by dkrenn

Reviewers: Clemens HeubergerClemens Heuberger, Daniel Krenn
Status: needs_reviewpositive_review

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

comment:10 Changed 9 years ago by vbraun

Branch: u/cheuberg/fsm/final-word-out-problemsd1f3e216a8e8e1913c803ec27baadc789f7b2300
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.