Opened 6 years ago

Closed 5 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) Commit: afc15e590d313a04c2a2aedb67203994865908ee
Dependencies: #16128, #16061, #15990 Stopgaps:

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

  • Authors set to Daniel Krenn
  • Branch set to u/dkrenn/fsm/process_output_new
  • Commit set to 70294bf300ddc75671aba8f517fd464aacaecbb4
  • Status changed from new to needs_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 6 years ago by dkrenn

  • Dependencies set to #15963, #16061

comment:3 Changed 6 years ago by cheuberg

  • Description modified (diff)

comment:4 Changed 6 years ago by cheuberg

  • Branch changed from u/dkrenn/fsm/process_output_new to u/cheuberg/ticket/16132
  • Created changed from 04/11/14 13:37:17 to 04/11/14 13:37:17
  • Modified changed from 04/12/14 04:06:28 to 04/12/14 04:06:28

comment:5 Changed 6 years ago by cheuberg

  • Commit changed from 70294bf300ddc75671aba8f517fd464aacaecbb4 to ed93dd3be386540d686ffea0c831ebd71f7ea871
  • Dependencies changed from #15963, #16061 to #16128, #16061

comment:6 Changed 6 years ago by cheuberg

  • Reviewers set to 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 6 years ago by dkrenn

  • Branch changed from u/cheuberg/ticket/16132 to u/dkrenn/ticket/16132
  • Commit changed from ed93dd3be386540d686ffea0c831ebd71f7ea871 to 3820c49851711ebffb12e230b27e9faad2d79b6d

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 5 years ago by cheuberg

  • Status changed from needs_review to positive_review

comment:9 Changed 5 years ago by dkrenn

  • Dependencies changed from #16128, #16061 to #16128, #16061, #15990
  • Status changed from positive_review to needs_review

Does not merge on beta8.

comment:10 Changed 5 years ago by dkrenn

  • Status changed from needs_review to needs_work

comment:11 Changed 5 years ago by dkrenn

  • Branch changed from u/dkrenn/ticket/16132 to u/dkrenn/fsm_process_output_new-on-beta8
  • Commit changed from 3820c49851711ebffb12e230b27e9faad2d79b6d to a14dd81a113644263163eb69ba3b090f646e35a9
  • Status changed from needs_work to needs_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 5 years ago by cheuberg

  • Branch changed from u/dkrenn/fsm_process_output_new-on-beta8 to u/cheuberg/fsm_process_output_new-on-beta8

comment:13 follow-up: Changed 5 years ago by cheuberg

  • Commit changed from a14dd81a113644263163eb69ba3b090f646e35a9 to afc15e590d313a04c2a2aedb67203994865908ee

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 5 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 5 years ago by cheuberg

  • Status changed from needs_review to positive_review

comment:16 Changed 5 years ago by vbraun

  • Branch changed from u/cheuberg/fsm_process_output_new-on-beta8 to afc15e590d313a04c2a2aedb67203994865908ee
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.