Software Specification and Architecture 2IW80 Julien Schmaltz Recapitulation Session
Exam» April 12.04.2016 09:00 12:00» Location: check OASE» Part I. 40 multiple choice questions (4 options)» 1 point if correct answer» 0 point if incorrect answer» should not take more than 45 minutes» test knowledge - you know it or you don t (not much thinking)» Part II. Four exercises (20 each)» choose 3» if all 4, best 3 will be used for grading» each exercise should not take more than 45 minutes each» require some analysis, thinking, modelling, formalising effort» test competences, you can apply knowledge or you cannot 2
Old exams» The examination of last year will be available on the course web site soon» Note that this year edition is different» no deployment, timing, and package diagrams» different approach to requirements» the remainder of UML is the same» no Event-B» but LTL, TA, and UPPAAL» no variability and no product lines» the remainder of architecture is similar 3
Multiple choice question (0)» Consider the following requirement: The invoice system, shall display pending customer invoices in ascending order in which invoices are to be paid.» Which one of the solution below is a correct characterisation of this requirement according to the structured syntax [Subject][Action][Object][Constraint]» a.» b.» c.» d. The invoice system [Object], shall display [Constraint] pending customer invoices [Subject] in ascending order in which invoices are to be paid [Subject]. The invoice system [Subject], shall display [Action] pending customer invoices [Object] in ascending order in which invoices are to be paid [Constraint]. The invoice system [Subject], shall display [Action] pending customer invoices [Constraint] in ascending order in which invoices are to be paid [Object]. The invoice system [Subject], shall display [Constraint] pending customer invoices [Object] in ascending order in which invoices are to be paid [Action]. 4
Multiple choice question (0)» Consider the following requirement: The invoice system, shall display pending customer invoices in ascending order in which invoices are to be paid.» Which one of the solution below is a correct characterisation of this requirement according to the structured syntax [Subject][Action][Object][Constraint]» a.» b.» c.» d. The invoice system [Object], shall display [Constraint] pending customer invoices [Subject] in ascending order in which invoices are to be paid [Subject]. The invoice system [Subject], shall display [Action] pending customer invoices [Object] in ascending order in which invoices are to be paid [Constraint]. The invoice system [Subject], shall display [Action] pending customer invoices [Constraint] in ascending order in which invoices are to be paid [Object]. The invoice system [Subject], shall display [Constraint] pending customer invoices [Object] in ascending order in which invoices are to be paid [Action]. 5
Multiple choice question (1) A B Class diagram on the left states that a) A is a generalization of B b) A is a composition of B c) B is an implementation of A d) The class diagram is syntactically incorrect 26/03/15 6
Multiple choice question (1) A B Class diagram on the left states that a) A is a generalization of B b) A is a composition of B c) B is an implementation of A d) The class diagram is syntactically incorrect 26/03/15 7
Multiple choice question (2) Which of the following statements are not enforced by the sequence diagram? a) m1 is received before m2 is sent b) m2 is received before m3 is sent c) m1 is sent before m2 is sent d) m2 is sent before m3 is sent 26/03/15 8
Multiple choice question (2) Which of the following statements are not enforced by the sequence diagram? a) m1 is received before m2 is sent b) m2 is received before m3 is sent c) m1 is sent before m2 is sent d) m2 is sent before m3 is sent 26/03/15 9
Multiple choice question (3) The method occupy should be implemented in a) HireForm b) Person c) Position d) not enough information in the diagram 26/03/15 10
Multiple choice question (3) The method occupy should be implemented in a) HireForm b) Person c) Position d) not enough information in the diagram 26/03/15 11
Multiple choice question (4) D -End3 -End4 * * -End1 -End2 A B «include» C Actor E is associated with activities a) A b) B c) C d) B and C * * E 26/03/15 12
Multiple choice question (4) D -End3 -End4 * * -End1 -End2 A B «include» C Actor E is associated with activities a) A b) B c) C d) B and C * * E 26/03/15 13
Multiple choice question (5) Let Withdraw Cash, Balance Lookup and Debit Account be use cases corresponding to the diagram above. Which one of the following use case diagrams is correct? Debit Account <<extend>> Withdraw Cash Balance Lookup A B C D <<include>> Debit Account Withdraw Cash Balance Lookup <<extend>> <<include>> 26/03/15 14 http://www.ibm.com/developerworks/rational/library/content/rationaledge/feb04/3101_figure11.jpg Debit Account <<include>> Withdraw Cash <<extend>> Balance Lookup Debit Account <<include>> Withdraw Cash Balance Lookup <<extend>>
Multiple choice question (5) Let Withdraw Cash, Balance Lookup and Debit Account be use cases corresponding to the diagram above. Which one of the following use case diagrams is correct? Debit Account <<extend>> Withdraw Cash Balance Lookup A B C D <<include>> Debit Account Withdraw Cash Balance Lookup <<extend>> <<include>> 26/03/15 15 http://www.ibm.com/developerworks/rational/library/content/rationaledge/feb04/3101_figure11.jpg Debit Account <<include>> Withdraw Cash <<extend>> Balance Lookup Debit Account <<include>> Withdraw Cash Balance Lookup <<extend>>
UML state machines: example 26/03/15 16
Multiple choice question (6) Consider the state machine blow. Which state is reached after the event sequence: e1, e2, e2,e1? a) 1 b) 2 c) 3 d) 4 Example 09/02/15 due to Ivanov and Novikov 17
Multiple choice question (6) Consider the state machine blow. Which state is reached after the event sequence: e1, e2, e2,e1? a) 1 b) 2 c) 3 d) 4 Example 09/02/15 due to Ivanov and Novikov 18
UML activity diagram: summary Action Control flow Signals Interrupts Subactivity Collection Graphical representation Send invoice Description action with three inputs start / stop markers decision, merge fork / join incoming (accept), outgoing (send), time-based interruptible activity region, interrupting edge activity with input/output parameters, activity invocation expansion region 26/03/15 19
Multiple choice question (7) Dr. Smith is grading students exam papers. How would you model her grading process? Grade paper Grade paper Grade paper Grade paper a) b) c) d) 26/03/15 20
Multiple choice question (7) Dr. Smith is grading students exam papers. How would you model her grading process? Grade paper Grade paper Grade paper Grade paper a) b) c) d) 26/03/15 21
Multiple choice question (8) In the activity diagram below, which one of the executions (to completion) is not possible? A B a) A and B complete, then C completes twice. b) A completes then C completes. B starts but is killed. c) B completes then C completes. A starts but is killed. d) A and B complete, C completes once. C Example 09/02/15 due to Ivanov and Novikov 22
Multiple choice question (8) In the activity diagram below, which one of the executions (to completion) is not possible? A B a) A and B complete, then C completes twice. b) A completes then C completes. B starts but is killed. c) B completes then C completes. A starts but is killed. d) A and B complete, C completes once. C Example 09/02/15 due to Ivanov and Novikov 23
end users functionality Kruchten viewpoints programmers software management Logical View Development View Scenarios Process View system integrators performance, scalability Deployment View system engineers topology, communication 4+1 View Model [Kruchten 95] 8-Mar-16 Lukkien & Mak, {j.j.lukkien,r.h.mak}@tue.nl TU/e Computer Science, System Architecture and Networking 39
Multiple choice question (9) Which stakeholders are addressed by the logical view of Kruchten: a) End users b) Programmers c) System integrators d) System engineers Example 09/02/15 due to Ivanov and Novikov 25
Multiple choice question (9) Which stakeholders are addressed by the logical view of Kruchten: a) End users b) Programmers c) System integrators d) System engineers Example 09/02/15 due to Ivanov and Novikov 26
Architectural styles Data flow styles Batch sequential Pipes & Filters Layered styles Layering Virtual machine Interpreter Independent components Client-Server Peer to Peer SOA (service oriented arch) REST Event-based Publish & subscribe, broker Whiteboard Data-centered Blackboard, Databases (SQL, NoSql) Model-View-Controller Rule-based Other Mobile agents Tuple spaces ROA (resource oriented) Classification varies widely amongst various authors 8-Mar-16 Rudolf Mak TU/e Computer Science 2IMN10-AS 6
Motivation: different tasks on same state (data set ) current state is result of (serialized) operations of different tasks tasks are coupled only through the shared state; communicating partners do not know each other Vocabulary blackboard, knowledge sources, control component, data space ( knowledge-source derived from the envisaged domain of problem solving) Rules Blackboard (data space): contains all state is passive Control transfers control among KS s conflict resolution Knowledge source algorithms for state adjustment generation of new data don t know each other Blackboard style Structure: knowledge sources access blackboard under control of Control picture from Internet Typical behavior KS s register with Control Repeatedly, Control determines enabled KSs, selects and calls one to execute Metaphore several people solving a problem jointly, by writing on a blackboard 8-Mar-16 Johan J. Lukkien, j.j.lukkien@tue.nl TU/e Informatica, System Architecture and Networking 19
Multiple choice question (10) Read the following text and replace XXX with one of the answers: http://kevinnam.com/?page_id=175 Virtual communities, like any community of people, often have trouble regulating their participants. This project s approach includes the design and implementation of an agent-based system written in Java that helps facilitate and regulate online social spaces appropriately and also helps maintain a pleasurable environment for users. The system comprises of a number of agents that work collaboratively through a XXX architecture. Each agent looks for a specific problem, and new agents can be built and added to the system as required. This system as a whole is not designed to completely eliminate the need for human regulator, but rather to help reduce human intervention in regulating online communities. a) publish-subscribe b) client-server c) pipe-and-filter d) blackboard 26/03/15 29
Multiple choice question (10) Read the following text and replace XXX with one of the answers: http://kevinnam.com/?page_id=175 Virtual communities, like any community of people, often have trouble regulating their participants. This project s approach includes the design and implementation of an agent-based system written in Java that helps facilitate and regulate online social spaces appropriately and also helps maintain a pleasurable environment for users. The system comprises of a number of agents that work collaboratively through a XXX architecture. Each agent looks for a specific problem, and new agents can be built and added to the system as required. This system as a whole is not designed to completely eliminate the need for human regulator, but rather to help reduce human intervention in regulating online communities. a) publish-subscribe b) client-server c) pipe-and-filter d) blackboard 26/03/15 30
Viewpoints and views Viewpoint a way of looking at a system from the position of a certain stakeholder with a particular concern defines creation, depiction and analysis of a view language, used models, notation, methods, analysis techniques View: whatever you see in a system from a particular viewpoint collection of system models conforming to the viewpoint 26/03/15 31
Multiple choice question (11) Which of the following statements from the following list are not correct? a) using viewpoints the architects can separate out different kinds of information b) the need to maintain multiple views describing a software system as well as consistency between those views hinders maintenance of the architecture documentation c) pipe-and-filter architectural style can be considered as a structural viewpoint d) according to IEEE Std. 42010-2011 viewpoint can exist without stakeholders. 26/03/15 32
Multiple choice question (11) Which of the following statements from the following list are not correct? a) using viewpoints the architects can separate out different kinds of information b) the need to maintain multiple views describing a software system as well as consistency between those views hinders maintenance of the architecture documentation c) pipe-and-filter architectural style can be considered as a structural viewpoint d) according to IEEE Std. 42010-2011 viewpoint can exist without stakeholders. 26/03/15 33
Multiple choice question (12) Rozanski and Woods have identified a concurrency viewpoint: describes the concurrency structure of the system and maps functional elements to concurrency units to clearly identify the parts of the system that can execute concurrently and how this is coordinated and controlled. This entails the creation of models that show the process and thread structures that the system will use and the interprocess communication mechanisms used to coordinate their operation. Which one of the Kruchten s 4+1 views addresses this concern a) Process view b) Logical view c) Scenarios d) None of the above 26/03/15 34
Multiple choice question (12) Rozanski and Woods have identified a concurrency viewpoint: describes the concurrency structure of the system and maps functional elements to concurrency units to clearly identify the parts of the system that can execute concurrently and how this is coordinated and controlled. This entails the creation of models that show the process and thread structures that the system will use and the interprocess communication mechanisms used to coordinate their operation. Which one of the Kruchten s 4+1 views addresses this concern a) Process view b) Logical view c) Scenarios d) None of the above 26/03/15 35
Multiple choice question (13)» The formula a U (b U c) is equivalent to (a U b) U c» a) This statement is not true.» b) This statement is true» c) This statement is true only when b does not contain an until» d) This statement is false only when b does not contain an until 36
Multiple choice question (13)» The formula a U (b U c) is equivalent to (a U b) U c» a) This statement is not true.» b) This statement is true» c) This statement is true only when b does not contain an until» d) This statement is false only when b does not contain an until 37
Multiple choice question (14)» Consider a traffic light. When the light is green, the traffic must proceed in sequence with first be yellow before becoming red. Which of the following LTL formulas best formalise this statement?» a) green implies green U (yellow U red)» b) green implies X (green U (yellow U red))» c) green U (yellow U red)» d) green implies X green U (yellow /\ yellow U red) 38
Multiple choice question (14)» Consider a traffic light. When the light is green, the traffic must proceed in sequence with first be yellow before becoming red. Which of the following LTL formulas best formalise this statement?» a) green implies green U (yellow U red)» b) green implies X (green U (yellow U red))» c) green U (yellow U red)» d) green implies X green U (yellow /\ yellow U red) 39
Multiple choice question (15)» Consider a sender and a receiver component connected by a handshake protocol with request and acknowledgment. The sender first emits a request. It then waits for the receiver to produce the acknowledgment. Which one of the following LTL properties formalise the statement all requests are eventually acknowledged?» a) G (req U ack)» b) G (req implies F ack)» c) G (req U ack)» d) req U (F ack) 40
Multiple choice question (15)» Consider a sender and a receiver component connected by a handshake protocol with request and acknowledgment. The sender first emits a request. It then waits for the receiver to produce the acknowledgment. Which one of the following LTL properties formalise the statement all requests are eventually acknowledged?» a) G (req U ack)» b) G (req implies F ack)» c) G (req U ack)» d) req U (F ack) 41
Multiple choice questions (16) Which one of the following LTL properties is satisfied by the LTS below? a. G a b. FG a c. F b d. GF a {a} {b} {b} 42
Multiple choice questions (16) Which one of the following LTL properties is satisfied by the LTS below? a. G a b. FG a c. F b d. GF a {a} {b} {b} 43
Multiple choice question (17)» Which statement about Timed Automata is true?» a) Time convergent sequences are flaws in model.» b) Time convergent sequences come from zeno paths.» c) Time convergent sequences cannot be avoided.» d) Time convergent sequences are only present in models with timelocks 44
Multiple choice question (17)» Which statement about Timed Automata is true?» a) Time convergent sequences are flaws in model.» b) Time convergent sequences come from zeno paths.» c) Time convergent sequences cannot be avoided.» d) Time convergent sequences are only present in models with timelocks 45
Multiple choice question (18)» Which statement about Timed Automata is true?» a) A Timed Automaton has a timelock in state s if and only if there is no time divergent sequences starting from s.» b) A Timed Automaton has a timelock in state s if and only if there is no time convergent sequences starting from s» c) A Timed Automaton has a timelock in state s if and only if there is no zeno path starting from state s.» d) A Timed Automaton has a timelock in state s if and only if there are no infinite sequences starting from state s. 46
Multiple choice question (18)» Which statement about Timed Automata is true?» a) A Timed Automaton has a timelock in state s if and only if there is no time divergent sequences starting from s.» b) A Timed Automaton has a timelock in state s if and only if there is no time convergent sequences starting from s» c) A Timed Automaton has a timelock in state s if and only if there is no zeno path starting from state s.» d) A Timed Automaton has a timelock in state s if and only if there are no infinite sequences starting from state s. 47
Exam» April 12.04.2016 09:00 12:00» Location: check OASE» Part I. 40 multiple choice questions (4 options)» 1 point if correct answer» 0 point if incorrect answer» Part II. Four modelling exercises (20 each)» choose 3» choose 4, best 3 will be used for grading Questions like the ones we have seen today Exercises like the ones you have seen during the instruction sessions 48
Conclusions Success on the final exam! Julien, Anton, Kees, Sergei, Loek, Robin 26/03/15 49