A few days ago, I learned the notion of FSM in a major class. This means kind of expression tool to show system or any-state, when we want to explain the complicated situation or CS algorithm. This is a contents below in my textbook for easily understanding.
THE ONLY IN DISCRETE DYNAMICS,
1.The Notion of State
: the state of a system is its condition at a particular point in time.
we can define the state to be an encoding of everything about the past that has an effect on the system’s reaction to current or future inputs. The state is a summary of the past.
2.Then, What is a Finite-State Machines??..'제한된 상태들의 변화를 순차적으로 나타내는 장치'
:
A state machine is a model of a system with discrete dynamics that at each reaction
maps valuations of the inputs to valuations of the outputs, where the map may depend on
its current state.
Therefore, A finite-state machine (FSM) is a state machine where the set States of possible states is finite.
States = {State1; State2; State3}
3.Transitions
A transition is represented as a curved arrow, as shown in Figure 3.3.
The guard determines whether the transition may be taken on a reaction. The action specifies what outputs are produced on each reaction. In other words, the guard is condition for progressing next step(state) and the action means the an assignment of values (or absent) to the output ports.
EXAMPLE>
The transition is a symbol of arrow to move to next state, and the 'enabled' means can be a next state, when the conditions (such as P1,P2) is satisfied. (present(P) means there is a event at that time.) And also, the present has the meaning of true, the absent is false.
**Pure signal is input which has both a absent and present (event) such as UP,DOWN.
above example, The transition from state 0 to 1 has a guard written as up^:down. This is a predicate that evaluates to true when up is present and down is absent.
------------------------------------------------------
UP : the event like a "come in 1 vehicle" (present), DOWN : the event like a "come out 1 vehicle" (present)
if the absent occur, it means there isn't event.
These are standard logical operators where present is taken as a synonym for true and absent as a synonym for false. The symbol : represents logical negation. The operator ^ is logical conjunction (logical AND), and _ is logical disjunction (logical OR).
On a transition, the action (which is the portion after the slash) specifies the resulting valuation on the output ports when a transition is taken. If q1 and q2 are pure outputs and q3 has type N, then the following are examples of valid actions:
Any output port that is not mentioned in a transition that is taken is implicitly absent. (1Line)
When assigning a value to an output port, we use the notation name :=value to distinguish the assignment from a predicate, which would be written name = value. As in Figure 3.4, if there is only one output, then the assignment need not mention the port name.
::A default transition that need not be shown explicitly because it returns to the same state and produces no output.
The reaction is not shown explicitly in the diagram. Sometimes it is useful to emphasize such reactions, in which case they can be shown explicitly. A convenient way to do this is using a default transition, shown in Figure 3.6. In that figure, the default transition is denoted with dashed lines and is labeled with “true / ”.
'Nobody tells you about.. > RTOS' 카테고리의 다른 글
[Overview] OSEK (0) | 2013.06.04 |
---|