Opened 9 years ago

Closed 9 years ago

#16132 closed enhancement (fixed)

adapting output of FiniteStateMachine.process and __call__ to Automaton and Transducer

Reported by: dkrenn Owned by:
Priority: major Milestone: sage-6.2
Component: combinatorics Keywords: finite state machine, process, output
Cc: cheuberg, skropf Merged in:
Authors: Daniel Krenn Reviewers: Clemens Heuberger
Report Upstream: N/A Work issues:
Branch: afc15e5 (Commits, GitHub, GitLab) Commit: afc15e590d313a04c2a2aedb67203994865908ee
Dependencies: #16128, #16061, #15990 Stopgaps:

Status badges

Description (last modified by cheuberg)

Currently, there is only .process and .__call__ in the abstract base class FiniteStateMachine. The outputs do not depend on the actual type (automaton/transducer). The aim of this ticket is to change this and produce an appropriate output for each type of finite state machine. When using .__call__ in an automaton this is whether an input was accepted (and not more); a transducer gives the only the produces output.

(Since there is a change in the output, we give a deprecation warning.)

Change History (16)

comment:1 Changed 9 years ago by dkrenn

Authors: Daniel Krenn
Branch: u/dkrenn/fsm/process_output_new
Commit: 70294bf300ddc75671aba8f517fd464aacaecbb4
Status: newneeds_review

Last 10 new commits:

83b0341corrected one whitespace error
7633cacTransducer.cartesian_product: small correction in docstring
ab93aedMerge branch 'fsm/cartesian-product-intersection' into fsm/process_output_new
75aa9e1corrected doctests (after change of output)
d18312eMerge branch 'fsm/state_color' into fsm/process_output_new
2d43fddFiniteStateMachine: add failing doctests: non-hashable colors
547968aFiniteStateMachine.product_FiniteStateMachine, composition: fix unhashable colors
d51be51Automaton.determinisation(): docstring on hashable colors
c5dd860Merge branch 'fsm/state_color' into fsm/process_output_new
70294bftrac ticket number added

comment:2 Changed 9 years ago by dkrenn

Dependencies: #15963, #16061

comment:3 Changed 9 years ago by cheuberg

Description: modified (diff)

comment:4 Changed 9 years ago by cheuberg

Branch: u/dkrenn/fsm/process_output_newu/cheuberg/ticket/16132
Created: Apr 11, 2014, 1:37:17 PMApr 11, 2014, 1:37:17 PM
Modified: Apr 12, 2014, 4:06:28 AMApr 12, 2014, 4:06:28 AM

comment:5 Changed 9 years ago by cheuberg

Commit: 70294bf300ddc75671aba8f517fd464aacaecbb4ed93dd3be386540d686ffea0c831ebd71f7ea871
Dependencies: #15963, #16061#16128, #16061

comment:6 Changed 9 years ago by cheuberg

Reviewers: Clemens Heuberger

Reviewed this patch, made minor modifications.

Replaced dependency on #15963 by #16128: #16128 is a revision of #15963 (see explanation in #16128 for background) and this patch is actually based on #16128.

comment:7 Changed 9 years ago by dkrenn

Branch: u/cheuberg/ticket/16132u/dkrenn/ticket/16132
Commit: ed93dd3be386540d686ffea0c831ebd71f7ea8713820c49851711ebffb12e230b27e9faad2d79b6d

Cross-reviewed your changes; corrected one whitespaceerror. Feel free to set its status to positive_review.


Last 10 new commits:

ab93aedMerge branch 'fsm/cartesian-product-intersection' into fsm/process_output_new
75aa9e1corrected doctests (after change of output)
d18312eMerge branch 'fsm/state_color' into fsm/process_output_new
2d43fddFiniteStateMachine: add failing doctests: non-hashable colors
547968aFiniteStateMachine.product_FiniteStateMachine, composition: fix unhashable colors
d51be51Automaton.determinisation(): docstring on hashable colors
c5dd860Merge branch 'fsm/state_color' into fsm/process_output_new
70294bftrac ticket number added
ed93dd3Minor changes during review.
3820c49corrected whitespaceerror

comment:8 Changed 9 years ago by cheuberg

Status: needs_reviewpositive_review

comment:9 Changed 9 years ago by dkrenn

Dependencies: #16128, #16061#16128, #16061, #15990
Status: positive_reviewneeds_review

Does not merge on beta8.

comment:10 Changed 9 years ago by dkrenn

Status: needs_reviewneeds_work

comment:11 Changed 9 years ago by dkrenn

Branch: u/dkrenn/ticket/16132u/dkrenn/fsm_process_output_new-on-beta8
Commit: 3820c49851711ebffb12e230b27e9faad2d79b6da14dd81a113644263163eb69ba3b090f646e35a9
Status: needs_workneeds_review

Is now working on beta8. Please review changes.


Last 10 new commits:

75aa9e1corrected doctests (after change of output)
d18312eMerge branch 'fsm/state_color' into fsm/process_output_new
2d43fddFiniteStateMachine: add failing doctests: non-hashable colors
547968aFiniteStateMachine.product_FiniteStateMachine, composition: fix unhashable colors
d51be51Automaton.determinisation(): docstring on hashable colors
c5dd860Merge branch 'fsm/state_color' into fsm/process_output_new
70294bftrac ticket number added
ed93dd3Minor changes during review.
3820c49corrected whitespaceerror
a14dd81Merge remote-tracking branch 'origin/u/dkrenn/ticket/16132' into fsm/process_output_new-on-beta8

comment:12 Changed 9 years ago by cheuberg

Branch: u/dkrenn/fsm_process_output_new-on-beta8u/cheuberg/fsm_process_output_new-on-beta8

comment:13 Changed 9 years ago by cheuberg

Commit: a14dd81a113644263163eb69ba3b090f646e35a9afc15e590d313a04c2a2aedb67203994865908ee

Reviewed the above merge with develop, merge is fine, doctests pass.

Replaced two raise E, V by raise E(V) in the spirit of #15990 which had been merged previously.

comment:14 in reply to:  13 Changed 9 years ago by dkrenn

Replying to cheuberg:

Replaced two raise E, V by raise E(V) in the spirit of #15990 which had been merged previously.

Cross-reviewed: ok.

comment:15 Changed 9 years ago by cheuberg

Status: needs_reviewpositive_review

comment:16 Changed 9 years ago by vbraun

Branch: u/cheuberg/fsm_process_output_new-on-beta8afc15e590d313a04c2a2aedb67203994865908ee
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.