mirror of
https://github.com/marcosh/crem.git
synced 2024-10-26 20:09:49 +03:00
24 lines
1.1 KiB
YAML
24 lines
1.1 KiB
YAML
name: Add Parallel and Alternative constructors
|
|
date: 2023-01-17
|
|
context: >
|
|
Mealy machine, at least in theory, admit an instance for `Strong` and
|
|
`Choice` type classes, to allow parallel and alternative composition.
|
|
|
|
In our current implementation, we could implement `Strong` and `Choice` just
|
|
by forwarding the composition to the `BaseMachine` layer.
|
|
|
|
Still everytime that we are combining two state machine, either sequentially,
|
|
in parallel or in alternative, the set of states is always the cartesian
|
|
product of the sets of states. It follows that we would not be able to
|
|
understand which constructor we used just by looking at the topology.
|
|
decision: >
|
|
We decide to add specific constructors for parallel and alternative
|
|
composition.
|
|
consequences: >
|
|
We will be able to keep track of how a state machine is built.
|
|
|
|
Moreover we will be able to draw not only the set of spaces with allowed
|
|
transitions, but also a
|
|
[wiring diagram](https://math.mit.edu/~dspivak/informatics/talks/WD-IntroductoryTalk.pdf)
|
|
representing the flow of information through the machine.
|