ex1

作者: 儒侠道 | 来源:发表于2017-11-03 13:36 被阅读0次

嵌入式ex1


姓名 学号 班级 电话 邮箱
欧阳毅 15352268 15M2 13247686905 438020310@qq.com

1、What are the most important extensions of the StateChart model in comparison to an ordinary Finite state machine (FSM)?

状态图可以建模层次结构和并发性。有条件的保护转换,使转换和动作相关联。动作可以像生成新事件一样用变量计算。

2、Disadvantages of StateCharts

尽管状态图比普通的FSMs更好,但是它们在大系统中生成,而且往往难以理解,重新用的潜力是有限的。与转换相关的操作提供了一个强大的扩展,但是另一方面,广泛使用的操作将系统状态信息的一部分从状态转移到变量,这个隐藏的状态使系统分析变得更加困难。

3、Given the StateChart in Figure 1. Draw the state space of the StateChart as a tree, which shows the hierarchy

figure1.png

Figure 1: StateChartof states and denotes the state types (basic state, sequential states, and parallel states).

画出的状态图

IMG_20171103_115717.jpg

4. Formal computation of state space

How would you formally compute the set of states? Compute the set of states for the hierarchical automata which is defined by the StateChart from Fig.1 IMG_20171103_120341.jpg

5. Analysis

The automaton defined by the StateChart from Fig. 1 passes through a number of states, when external events are applied. Show the sequence of state that are passed through, starting from the initial state, for the following sequence of events:
a,b,e,b,d,b. Use a table notation.

IMG_20171103_121054.jpg

6. Conversion of StateChart to a finite state machine (FSM)

Draw a finite state machine which is equivalent to the StateChart from Fig. 1. Minimize the number of states.

IMG_20171103_121628.jpg

7. StateChart model of a vending machine

The StateChart model of a simplified vending machine is shown in Figure 2.

  • Describe the trace of transitions occurring when the user inserts a coin and orders a tea.
  • The control of the vending machine has a bug that allows the user to cheat. Describe the trace of transitions that illustrate the bug.
  • Draw the corresponding StateChart that fixes the bug.
  • 订红茶
IMG_20171103_131816.jpg
  • bug
IMG_20171103_132403.jpg
  • 修复之后:


    1.png
2.png

相关文章

  • ex1

    嵌入式ex1 1、What are the most important extensions of the St...

  • ex1

    //说明文件夹来源 //导入类Scanner // public class所定义的类为共用类,可以被所有用户调...

  • Chapter 3 Strings, Vectors and A

    1 Ex1: For int ia[3][4], please print every value of the ...

  • 第二章-例题

    EX1 求12345 include int main(){int a=1;for(int ...

  • [习题1]编译($ make ex1) 运行($ ./ex1)

    使用教材 《“笨办法” 学C语言(Learn C The Hard Way)》https://www.jiansh...

  • contour函数

    (Andrew Ng《机器学习》中ex1,线性回归)ontour(X,Y,Z)、contour(X,Y,Z,n) ...

  • logspace函数

    (Andrew Ng《机器学习》中ex1,线性回归)用法:logspace(a,b,n),其中a、b、n分别表示开...

  • PHP-引用变量

    1.&引用变量 2.zval变量容器 3.注意点 EX ex1: ex2:

  • 02.古典密码学

    1.换位加密 关键点:明文顺序对换 Ex1: 比如要加密明文: see the light,假如我们...

  • 指针与引用案例分析

    典型案例 Ex1 分析: main()函数的str与GetMemory()函数的p的生存周期不同,通过传值的方式(...

网友评论

      本文标题:ex1

      本文链接:https://www.haomeiwen.com/subject/ddmzpxtx.html