- •1 Introduction (Введение)
- •2 Generalized block diagram of a finite state machine (Обобщенная структурная схема конечного автомата).
- •Push – вталкивать данные в стек;
- •Graphs (Графы)
- •Figure 3: Directed labeled graph for the edge detector Ориентированный помеченный граф для краевого детектора)
- •4 Finite State Machines (Конечные Автоматы)
- •5 Unified Modeling Language (Унифицированный язык моделирования)
- •Uml state machines (конечные автоматы унифицированного языка моделирования).
- •Fsm logic (логическая схема работы конечного автомата).
- •State diagrams versus flowcharts (диаграммы состояний в сравнении с блок-схемами программ)
- •Uml state diagram (диаграмма состояний уям)
- •Defining a State diagram (построение диаграммы состояний)
- •Elements of a State diagram (Элементы диаграммы состояний)
- •Asm Chart (диаграмма алгоритмического конечного автомата)
- •Detailed asm Chart (подробная диаграмма asm).
- •Register transfer level (Условное изображение на уровне rtl).
- •Rtl in the circuit design cycle (описание на уровне rtl для разработки имс).
- •Automata-based programming (программирование с помощью модели конечных автоматов).
- •Example (пример)
- •Traditional (imperative) program (обычная императивная программа).
- •Расшифровка операторов программы на языке с:
- •Automata-based style program (программа на основе модели конечного автомата)
- •A separate function for the automaton step (отдельная функция для этапа конечного автомата)
- •Explicit state transition table (таблица переходов состояний в явном виде)
- •Using object-oriented capabilities (использование объектно-ориентированных возможностей)
- •Other extensions
- •Moore machine
- •Formal definition
- •Mealy machine
- •Formal definition
- •Mathematical model
- •Advantages and disadvantages (преимущества и недостатки).
- •Formal definition (формальное определение).
- •Example (пример)
- •Example (пример)
- •Transformations from/to state diagram (переход от/к диаграмме состояний).
- •Directed graph of a finite state machine (направленный граф конечного автомата).
- •Harel statechart (диаграммы Harel).
- •С. State transition table (таблица смены состояний).
- •Δ and λ aren’t shown in Fig.1. Δ и λ не показаны на схеме для визуального упрощения.
- •The methods to define automata (Способы задания автоматов)
- •Transition and output tables (Таблицы переходов и выходов)
- •Transition and output tables for Mealy automaton (тпв автомата Мили)
- •Transition and output tables for Moore automaton (тпв автомата Мура)
Formal definition
A Mealy machine is a 6-tuple, (S, S0, Σ, Λ, T, G), consisting of the following:
a finite set of states (S)
a start state (also called initial state) S0 which is an element of (S)
a finite set called the input alphabet (Σ)
a finite set called the output alphabet (Λ)
a transition function (T : S × Σ → S) mapping a state and the input alphabet to the next state
an output function (G : S × Σ → Λ) mapping each state and the input alphabet to the output alphabet.
Example 1.
Электронные часы разнообразных функциональных возможностей являются одним из наиболее широко применяемых в быту электронных приборов, управление которыми построено на основе конечно-автоматной модели. Они обычно показывают: время, дату; у них имеется функции такие как "установка времени и даты", "Секундомер", "Будильник"и т.п. Упрощенная структурная схема электронных часов показана на рис.1.5
Fig.13. Электронные часы.
Регистры отображают либо время, либо дату, либо секундомер в зависимости от "Управления". Устройство управления построено на основе модели конечного автомата. Конечный автомат реагирует на нажатия кнопки "а" на корпусе переходом в состояние "Установка минут", в котором событие нажатия кнопки "b" вызовет увеличение числа. Устройство управления построено на основе модели конечного автомата, граф которого показан на рис.1.6 .
Fig.13. The state diagram of an electronic watch.
Моноид — полугруппа с нейтральным элементом. Таким образом, моноидом называется множество M, на котором задана бинарная ассоциативная операция, обычно именуемая умножением, и в котором существует такой элемент e, что e x x x e для любого …
Диаграмма состояний электронных часов.
A classic form of a state diagram for a finite state machine is a directed graph with the following elements:
States Q: a finite set of vertices normally represented by circles and labeled with unique designator symbols or words written inside them;
Input symbols Σ: a finite collection of input symbols or designators;
Output symbols Z: a finite collection of output symbols or designators;
The output function ω represents the mapping of input symbols into output symbols, denoted mathematically as ω : Σ × Q→ Z.
Edges δ: represent the "transitions" between two states as caused by the input (identified by their symbols drawn on the "edges"). An 'edge' is usually drawn as an arrow directed from the present-state toward the next-state. This mapping describes the state transitions that is to occur on input of a particular symbol. This is written mathematically as δ : Σ × Q → Z
Start state q0: (not shown in the examples below). The start state is usually represented by an arrow with no origin pointing to the state. In older texts, the start state is not shown and must be inferred from the text.
Accepting state(s) F: If used, for example for accepting automata, is the accepting state. It is usually drawn as a double circle. Sometimes the accept state(s) function as