sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.43k stars 479 forks source link

FiniteStateMachine: final_word_out: more implementations #16254

Closed c50b3d32-6cb1-4b90-a060-6a332e54ef6a closed 10 years ago

c50b3d32-6cb1-4b90-a060-6a332e54ef6a commented 10 years ago

See also #16191.

final_word_out is used in subsequential transducers. 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.

In the following functions, final_word_out is now implemented:

Depends on #16206 Depends on #16207 Depends on #16253 Depends on #16145

CC: @dkrenn @cheuberg

Component: combinatorics

Author: Sara Kropf, Clemens Heuberger

Branch/Commit: 322991f

Reviewer: Clemens Heuberger, Daniel Krenn

Issue created by migration from https://trac.sagemath.org/ticket/16254

c50b3d32-6cb1-4b90-a060-6a332e54ef6a commented 10 years ago

Commit: c261805

c50b3d32-6cb1-4b90-a060-6a332e54ef6a commented 10 years ago

Branch: u/skropf/fsm/final_output_implemented

c50b3d32-6cb1-4b90-a060-6a332e54ef6a commented 10 years ago

Changed dependencies from #16206, #16207, #16253 to #16206, #16207, #16253, #16145

cheuberg commented 10 years ago

Reviewer: Clemens Heuberger

cheuberg commented 10 years ago

Changed author from Sara Kropf to Sara Kropf, Clemens Heuberger

cheuberg commented 10 years ago
comment:3

I reviewed this earlier and added a few commits. Most of them minor, but I rewrote parts of Transducer.cartesian_product and changed the default for final_function in FiniteStateMachine.product_FiniteStateMachine.

dkrenn commented 10 years ago

Changed branch from u/skropf/fsm/final_output_implemented to u/dkrenn/fsm/final_output_implemented

dkrenn commented 10 years ago
comment:5

made some minor changes; please cross-review. Apart from those, this is a positive review for me, so mark it whenever you like.


New commits:

322991fa couple of minor changes during review
dkrenn commented 10 years ago

Changed reviewer from Clemens Heuberger to Clemens Heuberger, Daniel Krenn

dkrenn commented 10 years ago

Changed commit from c261805 to 322991f

c50b3d32-6cb1-4b90-a060-6a332e54ef6a commented 10 years ago
comment:6

All changes are fine for me. Thus, I mark it as positive_review, as suggested.

vbraun commented 10 years ago

Changed branch from u/dkrenn/fsm/final_output_implemented to 322991f