Presentation is loading. Please wait.

Presentation is loading. Please wait.

October 5, 2010COMS W41561 COMS W4156: Advanced Software Engineering Prof. Gail Kaiser

Similar presentations


Presentation on theme: "October 5, 2010COMS W41561 COMS W4156: Advanced Software Engineering Prof. Gail Kaiser"— Presentation transcript:

1 October 5, 2010COMS W41561 COMS W4156: Advanced Software Engineering Prof. Gail Kaiser Kaiser+4156@cs.columbia.edu http://bank.cs.columbia.edu/classes/cs4156/

2 October 5, 2010COMS W41562 Topics covered in this lecture Software requirements System models (introduction to the Unified Modeling Language – UML will be covered in more depth later in the course)

3 October 5, 2010COMS W41563 Software Requirements

4 October 5, 2010COMS W41564 What is a requirement? What is the (future) software system supposed to “do”? Each requirement is a service or feature that the customer needs from a system and/or a constraint under which it must be developed and operated. May range from a high-level abstract statement to a detailed mathematical specification. Requirements serve a dual function –May be the basis for a bid for a contract - therefore must be open to interpretation; –May be the basis for the contract itself - therefore must be defined in detail.

5 October 5, 2010COMS W41565 User requirements Should describe functional and non-functional requirements in such a way that they are understandable by (future) system users who may have little technical knowledge. User requirements are defined using natural language, tables and diagrams as these can be understood by all users. Usage scenarios, user stories, use cases, …

6 October 5, 2010COMS W41566 System requirements More detailed specifications of system functions, services and constraints than user requirements. They are intended to be a basis for developers to design the system. They may be incorporated into the system contract.

7 October 5, 2010COMS W41567 Functional requirements Statements of services and features the system should provide, how the system should react to particular inputs and how the system should behave in particular situations. Functional user requirements may be high- level statements of what the system should do but functional system requirements must describe the system services in detail.

8 October 5, 2010COMS W41568 Example The Auction House application includes two types of subsystems: –AuctionHouse: sells Items to Customers. –Customers: submit bids to the AuctionHouse for a given Item. There shall be only one Auction House, but an arbitrary number of Customers. The Auction House and its Customers shall not be able to "share" files or databases. The Auction House application shall support: –Initialization of the AuctionHouse with a certain inventory. –Informing the Customers which Items are currently available for purchase. –Accepting bids on Items from multiple Customers simultaneously connected to the AuctionHouse. –Informing a Customer when their bid "wins" an Item, and correspondingly reducing inventory.

9 October 5, 2010COMS W41569 Examples of functional requirements The Auction House application shall support: –Initialization of the AuctionHouse with a certain inventory. –Informing the Customers which Items are currently available for purchase. –Accepting bids on Items from multiple Customers simultaneously connected to the AuctionHouse. –Informing a Customer when their bid "wins" an Item, and correspondingly reducing inventory.

10 October 5, 2010COMS W415610 Requirements imprecision Problems arise when requirements are not precisely stated. Ambiguous requirements may be interpreted in different ways by developers and users. Consider the phrase “accepting bids” –User intention – Customers can see other customers’ bids and decide to bid higher (or not); –Developer interpretation – Customer can not see other customers’ bids (sealed bids).

11 October 5, 2010COMS W415611 Non-functional requirements Define system properties and constraints, e.g., reliability, response time, storage requirements, device capability, etc. Process requirements may also be specified, mandating a particular IDE (Integrated Development Environment), programming language or development method. Non-functional requirements may be more critical than functional requirements. If these are not met, the system is useless.

12 October 5, 2010COMS W415612 Non-functional classifications Product requirements –Requirements that specify that the delivered product must behave in a particular way, e.g., resource utilization, mean time to recovery, etc. Organizational requirements –Requirements that are a consequence of organizational policies and procedures, e.g., process standards used, platform restrictions, etc. External requirements –Requirements that arise from factors that are external to the system and its development process, e.g., interoperability requirements, legislative requirements, etc.

13 October 5, 2010COMS W415613 Examples of non-functional requirements Product requirement: There shall be only one Auction House, but an arbitrary number of Customers. The Auction House and its Customers shall not be able to "share" files or databases. Organizational requirement: Develop (using any programming language supported by CORBA). Deploy and run your AH application on the supplied ORB. External requirement: It is acceptable for this specific assignment to obtain "help" from other people, who may be other students in the class but need not be. However, the submitted documents must be written individually in your own words and every student must submit separately with no "copying".

14 October 5, 2010COMS W415614 Goals vs. requirements Non-functional requirements may be very difficult to state precisely and imprecise requirements may be difficult to verify. Goal –A general intention of the user such as ease of use. Verifiable non-functional requirement –A statement based on some measure that can be objectively tested. Goals are helpful to developers as they convey the intentions of the system users.

15 October 5, 2010COMS W415615 Examples A system goal: There shall be only one Auction House, but an arbitrary number of Customers. A verifiable non-functional requirement: There shall be only one Auction House and 0 to 64 simultaneously connected Customers.

16 October 5, 2010COMS W415616 Requirements interaction Conflicts between different non-functional requirements are common in complex systems. Spacecraft system example: –To minimize weight, the number of separate chips in the system should be minimized. –To minimize power consumption, lower power chips should be used. –However, using low power chips may mean that more chips have to be used. Which is the most important requirement?

17 October 5, 2010COMS W415617 Requirements completeness and consistency In principle, requirements should be both complete and consistent. Complete: Should include descriptions of all facilities required. Consistent: Should be no conflicts or contradictions in the descriptions of the system facilities. In practice, it may be impossible to produce a complete and consistent requirements document.

18 October 5, 2010COMS W415618 Domain requirements Derived from the application domain and describe system characteristics and features that reflect the domain. Domain requirements may be new functional requirements, constraints on existing requirements or define specific computations. If domain requirements are not satisfied, the system may be unworkable.

19 October 5, 2010COMS W415619 Auction House domain requirements Bids are represented in terms of some currency (e.g., dollars). Competing bids for the same individual item must occur within some reasonable time- frame (e.g., minutes).

20 October 5, 2010COMS W415620 Domain requirements problems Understandability –Requirements are expressed in the language of the application domain; –This jargon may not be understood by the software engineers developing the system (e.g., English vs. Dutch auction). Implicitness –Domain specialists understand the area so well that they may not think of making the domain requirements explicit.

21 October 5, 2010COMS W415621 Problems with natural language Lack of clarity –Precision is difficult without making the document hard to read. Requirements confusion –Functional and non-functional requirements tend to be mixed together. Requirements amalgamation –Several different requirements may be expressed together.

22 October 5, 2010COMS W415622 Example requirement problems There shall be only one Auction House, but an arbitrary number of Customers. The Auction House and its Customers shall not be able to "share" files or databases, and shall communicate solely via the ORB. This requirements statement includes both conceptual and detailed information –Describes (obliquely) the client-server concept. –Restricts implementation to CORBA – which might not be the best platform.

23 October 5, 2010COMS W415623 Guidelines for writing requirements Invent a standard format and use it for all requirements.standard format Use language in a consistent way. Use shall for mandatory requirements, should for desirable requirements. Use text highlighting to identify key parts of the requirement. Avoid the use of computer jargon.

24 October 5, 2010COMS W415624 Requirements vs. design In principle, requirements should state what the system should do and the design should describe how it does this. In practice, requirements and design are inseparable –A system architecture may be designed to structure the requirements; –The system may inter-operate with other systems that generate design requirements; –The use of a specific design may be a domain requirement.

25 October 5, 2010COMS W415625 System Models

26 October 5, 2010COMS W415626 Use cases Use cases are a scenario-based modeling technique that identify the actors in an interaction and describe the interaction itself. A set of use cases should describe all possible interactions with the system. Sequence diagrams may be used to add detail to use cases by showing the sequence of event processing in the system.

27 LIBSYS Example A library system that provides a single interface to a number of databases of articles in different libraries. Users can search for, download and print these articles for personal study. October 5, 2010COMS W415627

28 October 5, 2010COMS W415628 LIBSYS use cases

29 October 5, 2010COMS W415629 Article printing use case

30 October 5, 2010COMS W415630 Print article sequence

31 October 5, 2010COMS W415631 System modeling System modeling helps the analyst to understand the functionality of the system, and models are also used to communicate with customers. Different models present the system from different perspectives –External perspective showing the system’s context or environment; –Behavioral perspective showing the behavior of the system; –Structural perspective showing the system or data architecture.

32 October 5, 2010COMS W415632 Model types Data processing model showing how the data is processed at different stages. Composition model showing how entities are composed of other entities. Architectural model showing principal sub- systems. Classification model showing how entities have common characteristics. Stimulus/response model showing the system’s reaction to events.

33 October 5, 2010COMS W415633 Context models Context models are used to illustrate the operational context of a system - they show what lies outside the system boundaries. Social and organizational concerns may affect the decision on where to position system boundaries. Architectural models show the system and its relationship with other systems.

34 October 5, 2010COMS W415634 The context of an ATM system

35 October 5, 2010COMS W415635 Process models Process models show the overall process and the processes that are supported by the system. Data flow models may be used to show the processes and the flow of information from one process to another.

36 October 5, 2010COMS W415636 Equipment procurement process

37 October 5, 2010COMS W415637 Behavioral models Behavioral models are used to describe the overall behavior of a system. Two types of behavioral model are: –Data processing models that show how data is processed as it moves through the system; –State machine models that show the system’s response to events. These models show different perspectives so both of them are needed to describe the system’s behavior.

38 October 5, 2010COMS W415638 Data-processing models Data flow diagrams (DFDs) may be used to model the system’s data processing. These show the processing steps as data flows through a system. DFDs are an intrinsic part of many analysis methods. Simple and intuitive notation that customers can understand. Show end-to-end processing of data.

39 October 5, 2010COMS W415639 Order processing DFD

40 October 5, 2010COMS W415640 Data flow diagrams DFDs model the system from a functional perspective. Tracking and documenting the data associated with a process is helpful to develop an overall understanding of the system. Data flow diagrams may also be used in showing the data exchange between a system and other systems in its environment.

41 October 5, 2010COMS W415641 Insulin pump DFD

42 October 5, 2010COMS W415642 State machine models Model the behavior of the system in response to external and internal events. Show the system’s responses to stimuli, so are often used for modeling real-time systems. State machine models show system states as nodes and events as arrows between these nodes. When an event occurs, the system moves from one state to another.

43 October 5, 2010COMS W415643 Statecharts Allow the decomposition of a model into sub- models. A brief description of the actions is included following the ‘do’ in each state. Can be complemented by tables describing the states and the stimuli.

44 October 5, 2010COMS W415644 Microwave oven model

45 October 5, 2010COMS W415645 Microwave oven state description

46 October 5, 2010COMS W415646 Microwave oven stimuli

47 October 5, 2010COMS W415647 Microwave oven operation

48 October 5, 2010COMS W415648 Semantic data models Used to describe the logical structure of data processed by the system. An entity-relationship-attribute (ERA) model sets out the entities in the system, the relationships between these entities and the entity attributes Widely used in database design. Can readily be implemented using relational databases.

49 October 5, 2010COMS W415649 LIBSYS semantic model

50 October 5, 2010COMS W415650 Data dictionaries Data dictionaries are lists of all of the names used in the system models. Descriptions of the entities, relationships and attributes are also included. Advantages –Support name management and avoid duplication; –Store of organizational knowledge linking analysis, design and implementation; Many IDEs support data dictionaries.

51 October 5, 2010COMS W415651 Data dictionary entries

52 October 5, 2010COMS W415652 Object models Object models describe the system in terms of object classes and their associations. An object class is an abstraction over a set of objects with common attributes and the services (operations) provided by each object. (Not necessarily to be implemented directly as programming language classes.) Various object models may be produced –Inheritance models; –Aggregation models; –Interaction models.

53 October 5, 2010COMS W415653 Object models Natural ways of reflecting the real-world entities manipulated by the system Abstract entities are more difficult to model using this approach Object class identification is recognized as a difficult process requiring a deep understanding of the application domain Object classes reflecting domain entities are often reusable across systems

54 October 5, 2010COMS W415654 Inheritance models Organize the domain object classes into a hierarchy. Classes at the top of the hierarchy reflect the common features of all classes. Object classes inherit their attributes and services from one or more super-classes (base classes). These may then be specialized as necessary. It is sometimes difficult to avoid duplication in different branches of a class hierarchy design.

55 October 5, 2010COMS W415655 Object models and UML UML (Unified Modeling Language) is a representation devised by the developers of widely used object-oriented analysis and design methods.UML It has become an effective standard for object- oriented modeling. Notation –Object classes are rectangles with the name at the top, attributes in the middle section and operations in the bottom section; –Relationships between object classes (known as associations) are shown as lines linking objects; –Inheritance is referred to as generalization and is shown ‘upwards’ rather than ‘downwards’ in a hierarchy.

56 October 5, 2010COMS W415656 Example class hierarchy

57 October 5, 2010COMS W415657 Another example class hierarchy

58 October 5, 2010COMS W415658 Multiple inheritance Rather than inheriting the attributes and services from a single parent class, a modeling system that supports multiple inheritance allows object classes to inherit from several super-classes. (Multiple inheritance may or may not be supported by the implementation programming language.) This can lead to semantic conflicts where attributes/services with the same name in different super-classes have different semantics. Multiple inheritance makes class hierarchy reorganization more complex.

59 October 5, 2010COMS W415659 Example multiple inheritance

60 October 5, 2010COMS W415660 Object aggregation An aggregation model shows how classes that are collections are composed of other classes. Aggregation models are similar to the part-of relationship in semantic data models.

61 October 5, 2010COMS W415661 Example object aggregation

62 October 5, 2010COMS W415662 Object behavior modeling A behavioral model shows the interactions between objects to produce some particular system behavior that is specified as a use case. Sequence diagrams (or collaboration diagrams) in the UML are used to model interaction between objects.

63 October 5, 2010COMS W415663 Issue of electronic library items

64 Upcoming Assignments October 5, 2010COMS W415664

65 Upcoming Assignments First Iteration Plan due Tuesday 19 October. First Iteration Plan First Iteration Progress Report due Tuesday 26 October. First Iteration Progress Report First Iteration Demo Wednesday 3 November – Thursday 11 November. First Iteration Demo First Iteration Final Report due Friday 12 November. First Iteration Final Report October 5, 2010COMS W415665

66 COMS W4156: Advanced Software Engineering Prof. Gail Kaiser Kaiser+4156@cs.columbia.edu http://bank.cs.columbia.edu/classes/cs4156/ October 5, 2010COMS W415666


Download ppt "October 5, 2010COMS W41561 COMS W4156: Advanced Software Engineering Prof. Gail Kaiser"

Similar presentations


Ads by Google