Modelli di sviluppo software Enrico Giunchiglia
The software development process A structured set of activities required to develop a software system, including Specification Design & Development Validation Enrico Giunchiglia Ingegneria del Software II 2
Generic software process models The waterfall model Separate and distinct phases of specification, development, validation Evolutionary development Specification, development and validation are interleaved Formal systems development A formal system model is formally transformed to an implementation Reuse-based development The system is assembled from existing components Enrico Giunchiglia Ingegneria del Software II 3
Waterfall model Requirements definition System and software design Implementation and unit testing Integration and system testing Operation and maintenance Enrico Giunchiglia Ingegneria del Software II 4
Waterfall model phases Requirements analysis and definition System and software design Implementation and unit testing Integration and system testing Operation and maintenance Enrico Giunchiglia Ingegneria del Software II 5
Waterfall model problems Problems: difficulty of accommodating requirements changes after the process is underway, because of inflexible partitioning of the project into distinct stages Applicability: Large systems, when the requirements are well-understood Enrico Giunchiglia Ingegneria del Software II 6
Evolutionary development Objective is to work with customers and to evolve a final system from an initial outline specification. Enrico Giunchiglia Ingegneria del Software II 7
Evolutionary development Concurrent activities Specification Initial version Outline description Development Intermediate versions Validation Final version Enrico Giunchiglia Ingegneria del Software II 8
Evolutionary development Problems Systems are often poorly structured Special skills (e.g. in languages for rapid prototyping) may be required Applicability For small or medium-size interactive systems For parts of large systems, difficult or long to specify (e.g. the user interface) For short-lifetime systems Enrico Giunchiglia Ingegneria del Software II 9
Formal systems development Based on the transformation of a mathematical specification through different representations to an executable program Transformations are correctness-preserving so it is straightforward to show that the program conforms to its specification (the program is correct wrt the specification by construction) Enrico Giunchiglia Ingegneria del Software II 10
Formal systems development Requirements Formal Formal Integration and definition specification transformation system testing Enrico Giunchiglia Ingegneria del Software II 11
Formal transformations Formal transformations T1 T2 T3 T4 Formal specification R1 R2 R3 Executable program P1 P2 P3 P4 Proofs of transformation correctness Enrico Giunchiglia Ingegneria del Software II 12
Formal systems development Problems Need for specialised skills and training to apply the technique Difficult to formally specify some aspects of the system such as the user interface Applicability Critical systems especially those where a safety or security case must be made before the system is put into operation Enrico Giunchiglia Ingegneria del Software II 13
Reuse-oriented development Based on systematic reuse where systems are integrated from existing components or COTS (Commercial-off-theshelf) systems Requirements specification Component analysis Requirements modification System design with reuse Development and integration System validation Enrico Giunchiglia Ingegneria del Software II 14
Reuse-oriented development Problems It may be difficult to adapt components In the long run, the resulting system may be poorly structured. Applicability Legacy systems Enrico Giunchiglia Ingegneria del Software II 15
Process iteration System requirements ALWAYS evolve in the course of a project so process iteration where earlier stages are reworked is always part of the process for large systems Iteration can be applied to any of the generic process models Two (related) approaches Incremental development Spiral development Enrico Giunchiglia Ingegneria del Software II 16
Incremental development Rather than deliver the system as a single delivery, the development and delivery is broken down into increments with each increment delivering part of the required functionality User requirements are prioritised and the highest priority requirements are included in early increments Once the development of an increment is started, the requirements are frozen though requirements for later increments can continue to evolve Enrico Giunchiglia Ingegneria del Software II 17
Incremental development Define outline requirements Assign requirements to increments Design system architecture Develop system increment Validate increment System incomplete Integrate increment Validate system Final system Enrico Giunchiglia Ingegneria del Software II 18
Incremental development advantages Customer value can be delivered with each increment so system functionality is available earlier Early increments act as a prototype to help elicit requirements for later increments Lower risk of overall project failure The highest priority system services tend to receive the most testing Enrico Giunchiglia Ingegneria del Software II 19
Spiral development Process is represented as a spiral rather than as a sequence of activities with backtracking Each loop in the spiral represents a phase in the process. No fixed phases such as specification or design - loops in the spiral are chosen depending on what is required Risks are explicitly assessed and resolved throughout the process Enrico Giunchiglia Ingegneria del Software II 20
Spiral model of the software process Determine objectives alternatives and constraints Plan next phase REVIEW Requirements plan Life-cycle plan Development plan Integration and test plan Risk analysis Risk analysis Risk analysis Prototype 2 Risk analysis Prototype 1 Concept of Operation S/W requirements Requirement validation Design V&V Service Acceptance test Evaluate alternatives identify, resolve risks Prototype 3 Opera- tional protoype Simulations, models, benchmarks Product design Integration test Code Unit test Detailed design Develop, verify next-level product Enrico Giunchiglia Ingegneria del Software II 21
Spiral model sectors Key elements: Risk assessment and reduction Planning Risks are assessed and activities put in place to reduce the key risks The project is reviewed and the next phase of the spiral is planned Enrico Giunchiglia Ingegneria del Software II 22
Enrico Giunchiglia Ingegneria del Software II 23