Opened 7 years ago

Closed 7 years ago

#16762 closed defect (fixed)

Extend FiniteStateMachine.product_FiniteStateMachine: keep isolated states

Reported by: cheuberg Owned by:
Priority: major Milestone: sage-6.4
Component: finite state machines Keywords: product_FiniteStateMachine, isolated state
Cc: skropf, dkrenn Merged in:
Authors: Clemens Heuberger Reviewers: Daniel Krenn, Sara Kropf
Report Upstream: N/A Work issues:
Branch: 5b75691 (Commits, GitHub, GitLab) Commit: 5b75691cfea85d2da9c47aa66b2c5f64e9ad31a7
Dependencies: #16758 Stopgaps:

Status badges


Isolated states are currently not created in FiniteStateMachine.product_FiniteStateMachine. This may lead to products without any states. This is not desirable: there might be final output words, hooks, etc.

Planned behaviour:

sage: F = Transducer(initial_states=[0])
sage: F.add_state(1)
sage: G = Transducer(initial_states=['A'])
sage: F.product_FiniteStateMachine(G, None).states()
[(0, 'A')]
sage: F.product_FiniteStateMachine(
....:     G, None, only_accessible_components=False).states()
[(0, 'A'), (1, 'A')]

Current behaviour is that the two last tests yield [].

Change History (5)

comment:1 Changed 7 years ago by cheuberg

  • Authors set to Clemens Heuberger
  • Branch set to u/cheuberg/fsm/product_isolated
  • Commit set to 5b75691cfea85d2da9c47aa66b2c5f64e9ad31a7
  • Dependencies set to #16758
  • Status changed from new to needs_review

Wrote a fix and implemented the above doctests. Merged #16758 to resolve conflict.

New commits:

76277a1trac #16762: failing doctests
d33f453trac #16762: keep isolated states
5704b11trac #16758: Add failing doctests
6dc0263trac #16758: Disallow composition with automaton
61f6acftrac #16758: Use class of outer machine in composition
5b75691Merge remote-tracking branch 'fsm/composition-types' (#16758) into fsm/product_isolated

comment:2 Changed 7 years ago by skropf

  • Reviewers set to Sara Kropf
  • Status changed from needs_review to positive_review

This looks fine for me.

comment:3 Changed 7 years ago by dkrenn

  • Reviewers changed from Sara Kropf to Daniel Krenn, Sara Kropf

Looks also good to me.

comment:4 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:5 Changed 7 years ago by vbraun

  • Branch changed from u/cheuberg/fsm/product_isolated to 5b75691cfea85d2da9c47aa66b2c5f64e9ad31a7
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.