CpSc 872

Exam 2

 

 

Name______________________________________________

 

Answer any FOUR of the five questions. Place a large X on the question you are omitting. If you answer all five, the one on which you score the best will NOT be counted. All questions are counted the same: 25 points each. Answer all parts of each question. Note that a part may require more than one response.

 

You can not have a laptop in the exam. You may have the textbook, class notes, handouts, copies of submitted homework. You have from 3:00pm until 4:15pm for the exam.

 

 

  1. State machines as specifications for design

a.     Explain how to use the state design pattern to build a state machine.

b.     Behavior and error state machines can be defined in an AADL model.  What limits does this place on the types of systems that can be modeled?

c.      Define a state machine for the error model for the OBD dongle.

 

a.      First use the strategy pattern to define the state machine (which deifnes what states are needed) Then apply the state pattern to define the abstract state module and extend it for each of the states.

b.     The systems should be discrete, event driven

c.      At least two states: nominal and failed with transitions of fail from nominal to failed and reset from failed to nominal

2.     architecture

a.     A service-oriented architecture enhances flexibility. What qualities does it degrade?  Under what conditions?

b.     Give a generic description of the types of elements in an error flow across multiple modules in an AADL architecture model.

c.      We have used multiple types of scenarios. Describe the DIFFERENCES between a quality attribute scenario and a use case scenario.

 

a.      Performance is degraded when the services are allowed to change dynamically

b.     An error source, out and then in error propagations; then an error sink.

c.      The difference is the type of requirement that is used: functional vs non-functional

  1. Types of systems

a.      In a complex adaptive system (CAS) the system defies one design operator - decomposition.  What is the problem with decomposing a CAS?

b.     Designing for testability involves making the software controllable and observable. Use AADL constructs to describe how to do this for a module.

c.      The layered architecture style for a system is an example of separation of concerns. Explain how. What constraints does this style place on modules in the architecture?

a.      When decomposing some behaviors will disappear

b.     Have in ports for each variable and out ports for each variable

c.      Each layer has a specific responsibility and is only allowed to communicate in one direction.

  1. Modularity operators – separation of concerns

a.      An interface defines the interaction between two modules. Describe how design by contract constrains the interaction.

b.     Starting with a problem statement, explain the specification and design information that must be created to develop a solution for the problem and for each piece of information explain why it is created in the flow that it is.

c.      Fully specify one design pattern you used in your OBD2Cloud system. Explain how you used it and exactly where in the system.

 

  1. Design by contract defines the requirements before a method can be invoked and gives the promise of service once it is invoked. In an interface the output of one module must satisfy the input of another module.
  2. We begin by creating a context and domain model that describes the problem, then a set of requirements that describe the proposed solution is created by eliciting information from the domain experts, then an architecture is designed that shows a skeleton of the proposed solution and finally detailed design patterns are chosen to elaborate the design.
  3. Answers will vary

 


 

  1. Design patterns

a.     Describe one use of the observer design pattern in the OBD2Cloud system?

b.     Describe how we decide which design pattern to use at a specific point in a design.

c.      The pipe and filter architecture is a useful way of conceptualize the OBD2Cloud system. Describe the pipe and filter view of the OBD2Cloud product. Specifically what are the pipes and what are the filters?

 

a.      The phone can observe the stream that comes from the OBD dongle and select values to be forwarded to the cloud.

b.     By determining which quality attributes need to be enhanced and then comparing the patterns to see which will enhance the system most for the highest priority quality attribute.

c.      The pipes are the carriers of data flows. The USB or Bluetooth connection from dongle to phone and the connection from phone to cloud are pipes. The bus reader in the dongle and the software on the phone that selects what to further on to the cloud are filters. The cloud may filter/modify the stream or it may simply store.