Software life cycle. Software life cycle. Stages and stages. Iterative model of life cycle of PS

Software lifecycle standards

  • GOST 34.601-90
  • ISO / IEC 12207: 1995 (Russian analogue - GOST R ISO / IEC 12207-99)

Software development methodologies

  • Rational Unified Process (RUP).
  • Microsoft Solutions Framework (MSF). Includes 4 phases: analysis, design, development, stabilization, involves the use of object-oriented modeling.
  • Extreme programming ( Extreme Programming, XP). The methodology is based on teamwork, effective communication between the customer and the contractor during the entire project for the development of IS. Development is carried out using consistently refined prototypes.

Standard GOST 34.601-90

The GOST 34.601-90 standard provides for the following stages and stages of creating an automated system:

  1. Formation of requirements for the speaker
    1. Site survey and justification of the need to create a nuclear power plant
    2. Formation of user requirements for the speaker
    3. Registration of a report on the work progress and an application for the development of the AU
  2. Development of the speaker concept
    1. Object study
    2. Carrying out the necessary research work
    3. Development of options for the speaker concept and selection of a version of the speaker concept that meets the requirements of users
    4. Registration of a report on the work done
  3. Technical task
    1. Development and approval of technical specifications for the creation of an AU
  4. Preliminary design
    1. Development of preliminary design solutions for the system and its parts
  5. Technical project
    1. Development of design solutions for the system and its parts
    2. Development of documentation for the NPP and its parts
    3. Development and execution of documentation for the supply of components
    4. Development of design assignments in related parts of the project
  6. Working documentation
    1. Development of working documentation for the NPP and its parts
    2. Development and adaptation of programs
  7. Commissioning
    1. Preparation of the automation object
    2. Staff training
    3. Complete set of speakers with supplied products (software and hardware, software and hardware systems, information products)
    4. Construction and installation works
    5. Commissioning works
    6. Preliminary tests
    7. Trial operation
    8. Acceptance tests
  8. AC escort.
    1. Performance of work in accordance with the warranty
    2. Post-warranty service

Draft, technical projects and working documentation are a consistent construction of more and more accurate design solutions. It is allowed to exclude the "Draft design" stage and individual stages of work at all stages, combine the "Technical design" and "Working documentation" stages into the "Technical design project", simultaneously perform various stages and works, and include additional ones.

This standard is not quite suitable for development at the present time: many processes are not sufficiently reflected, and some provisions are outdated.

ISO / IEC 12207 / standard and its application

ISO / IEC 12207: 1995 "Information Technology - Software Life Cycle Processes" is the main normative document that regulates the composition of software life cycle processes. It defines a life cycle structure containing the processes, activities and tasks that must be performed during software creation.

Each process is divided into a set of actions, each action into a set of tasks. Each process, action or task is initiated and executed by another process as needed, and there are no predefined execution sequences. In this case, the connections on the input data are preserved.

Software life cycle processes

  • Basic:
    • Purchase (actions and tasks of the customer purchasing software)
    • Delivery (activities and tasks of the supplier who supplies the customer with a software product or service)
    • Development (actions and tasks performed by the developer: software creation, design and operational documentation, preparation of test and training materials, etc.)
    • Operation (actions and tasks of the operator - the organization operating the system)
    • Escort (actions and tasks performed by the escorting organization, that is, the escort service). Maintenance - making changes to the software in order to fix errors, improve performance or adapt to changed working conditions or requirements.
  • Subsidiary
    • Documentation (formalized description of information created during the life cycle of software)
    • Configuration management (application of administrative and technical procedures throughout the life cycle of software to determine the state of software components, manage its modifications).
    • Quality assurance (ensuring that the IS and its lifecycle processes comply with the specified requirements and approved plans)
    • Verification (determination that software products, which are the results of some action, fully satisfy the requirements or conditions caused by the previous actions)
    • Certification (determination of the completeness of compliance of the specified requirements and the created system with their specific functional purpose)
    • Joint assessment (assessment of the state of work on the project: control of planning and management of resources, personnel, equipment, tools)
    • Audit (determination of compliance with requirements, plans and conditions of the contract)
    • Problem solving (analyzing and solving problems, regardless of their origin or source, which are discovered during development, operation, maintenance or other processes)
  • Organizational
    • Control (actions and tasks that can be performed by any party that controls their own processes)
    • Creation of infrastructure (selection and maintenance of technology, standards and tools, selection and installation of hardware and software used for the development, operation or maintenance of software)
    • Improvement (assessment, measurement, control and improvement of life cycle processes)
    • Training (initial training and subsequent continuous professional development of personnel)

Each process involves a series of actions. For example, the acquisition process covers the following steps:

  1. Initiating an acquisition
  2. Preparation of application proposals
  3. Preparation and amendment of the contract
  4. Supplier supervision
  5. Acceptance and completion of works

Each action includes a series of tasks. For example, the preparation of bid proposals should include:

  1. Formation of system requirements
  2. Formation of a list of software products
  3. Setting conditions and agreements
  4. Description of technical limitations (environment of the system functioning, etc.)

Stages of the software life cycle, the relationship between processes and stages

Software life cycle model - a structure that defines the sequence of execution and the relationship of processes, actions and tasks throughout the life cycle. The life cycle model depends on the specifics, scale and complexity of the project and the specifics of the conditions in which the system is created and operates.

GOST R ISO / IEC 12207-99 does not offer a specific life cycle model. Its provisions are common to any life cycle models, methods and technologies for creating IP. It describes the structure of life cycle processes without specifying how to implement or execute the activities and tasks included in these processes.

The life cycle software model includes:

  1. Stages;
  2. Work results at each stage;
  3. Key events are points of completion and decision making.

Stage - a part of the software development process, limited by a certain time frame and ending with the release of a specific product (models, software components, documentation), determined by the requirements set for this stage.

At each stage, several processes defined in the GOST R ISO / IEC 12207-99 standard can be performed, and vice versa, the same process can be performed at different stages. The relationship between processes and stages is also determined by the software life cycle model used.

Software life cycle models

The life cycle model is understood as a structure that determines the sequence of execution and the relationship of processes, actions and tasks performed throughout the life cycle. The life cycle model depends on the specifics of the information system and the specifics of the conditions in which the latter is created and functions.

To date, the following main life cycle models are most widely used:

  • Problem model;
  • cascade model (or systemic) (70-85 years);
  • spiral model (present).

Problem model

When developing a system "bottom-up" from individual tasks to the entire system (task model), a single approach to development is inevitably lost, problems arise in the informational docking of individual components. As a rule, as the number of tasks increases, difficulties increase, you have to constantly change existing programs and data structures. The rate of development of the system slows down, which slows down the development of the organization itself. However, in some cases, such technology may be appropriate:

  • Extreme urgency (you need to somehow solve the problems; then you have to do everything again);
  • Experiment and customer adaptation (algorithms are not clear, solutions are groped by trial and error).

General conclusion: it is impossible to create a sufficiently large effective information system in this way.

Cascade model

Cascade model life cycle was proposed in 1970 by Winston Royce. It provides for the sequential execution of all stages of the project in a strictly fixed order. The transition to the next stage means the complete completion of the work at the previous stage (Fig. 1). Requirements identified at the stage of requirements formation are strictly documented in the form of a technical assignment and are fixed for the entire duration of the project development Each stage ends with the release of a complete set of documentation, sufficient for development to be continued by another development team.

The benefits of using the waterfall approach are as follows:

  • at each stage, a complete set of project documentation is formed that meets the criteria for completeness and consistency;
  • the stages of work performed in a logical sequence allow you to plan the timing of completion of all work and the corresponding costs.

Project stages according to the waterfall model:

  1. Formation of requirements;
  2. Design;
  3. Implementation;
  4. Testing;
  5. Implementation;
  6. Operation and maintenance.

Figure: 1. Waterfall development scheme

The waterfall approach has proven itself well when building information systems for which, at the very beginning of development, all the requirements can be formulated accurately and completely in order to provide developers with the freedom to implement them as best as possible from a technical point of view. Complex settlement systems, real-time systems and other similar tasks fall into this category. However, in the process of using this approach, a number of its shortcomings were discovered, caused primarily by the fact that the real process of creating systems never fully fit into such a rigid scheme. In the process of creation, there was a constant need to return to previous stages and clarify or revise previously made decisions. As a result, the actual process of creating software took the following form (Fig. 2):

Figure: 2. The real process of software development in a waterfall scheme

The main disadvantage of the cascade approach is the significant delay in obtaining results. The results are coordinated with users only at the points planned after the completion of each stage of work, the requirements for information systems are "frozen" in the form of a technical task for the entire time of its creation. Thus, users can make their comments only after the work on the system is fully completed. In the case of an inaccurate statement of requirements or their changes over a long period of software development, users receive a system that does not meet their needs. Models (both functional and informational) of an automated object may become outdated simultaneously with their approval. The essence of the systematic approach to the development of IS lies in its decomposition (division) into automated functions: the system is divided into functional subsystems, which in turn are divided into subfunctions, subdivided into tasks and so on. The partitioning process continues down to specific procedures. At the same time, the automated system maintains a holistic view in which all the constituent components are interconnected. Thus, this model has the main advantage of systematic development, and the main disadvantages are slow and expensive.

Spiral model

To overcome the listed problems, it was proposed spiral model life cycle (Figure 3), which was developed in the mid-1980s by Barry Boehm. It is based on the initial stages of the life cycle: analysis and design. At these stages, the feasibility of technical solutions is verified by prototyping.

Prototype - an active software component that implements individual functions and external interfaces. Each iteration corresponds to the creation of a fragment or version of the software, on it the goals and characteristics of the project are specified, the quality of the results obtained is assessed and the work of the next iteration is planned.

Each iteration represents a complete development cycle leading to the release of an internal or external version of a product (or a subset of the final product), which is improved from iteration to iteration to become a complete system.

Each turn of the spiral corresponds to the creation of a fragment or version of the software, on it the goals and characteristics of the project are specified, its quality is determined and the work of the next turn of the spiral is planned. Thus, the details of the project are deepened and consistently concretized, and as a result, a reasonable option is selected, which is brought to implementation.

Development by iterations reflects the objectively existing spiral cycle of system creation. Incomplete completion of work at each stage allows you to move on to the next stage without waiting for the complete completion of work at the current one. With an iterative development method, the missing work can be completed in the next iteration. The main task is to show the system users a workable product as soon as possible, thereby activating the process of specifying and supplementing the requirements.

The main problem of the spiral cycle is determining when to move to the next stage. To solve it, it is necessary to introduce time limits for each stage of the life cycle. The transition proceeds as planned, even if not all of the planned work is completed. The plan is drawn up based on statistical data obtained in previous projects and the personal experience of the developers.

Fig 3. Spiral model of life cycle IS

One of the possible approaches to software development within the framework of the spiral life cycle model is the recently widespread methodology of rapid application development (RAD). This term usually refers to a software development process that contains 3 elements:

  • a small team of programmers (from 2 to 10 people);
  • short but well-developed production schedule (from 2 to 6 months);
  • a repetitive cycle in which developers, as the application begins to take shape, request and implement in the product the requirements obtained through interaction with the customer.

The RAD software life cycle consists of four phases:

  • requirements definition and analysis phase;
  • design phase;
  • implementation phase;
  • implementation phase.

At each iteration, the following are evaluated:

  • the risk of exceeding the terms and cost of the project;
  • the need to perform another iteration;
  • the degree of completeness and accuracy of understanding the requirements for the system;
  • the feasibility of terminating the project.

Advantages of the iterative approach:

  • Iterative development greatly simplifies project changes when customer requirements change.
  • When using the spiral model, the individual elements of the information system are gradually integrated into a single whole. With an iterative approach, the integration is virtually continuous. Since integration starts with fewer elements, there are much fewer problems during its implementation (according to some estimates, when using a waterfall development model, integration takes up to 40% of all costs at the end of the project).
  • Iterative development provides greater flexibility in project management by allowing tactical changes to be made to the product being developed.
  • An iterative approach simplifies component reuse (implements a component programming approach). This is due to the fact that it is much easier to identify (identify) the common parts of the project when they are already partially developed than to try to isolate them at the very beginning of the project. Analysis of the project after several initial iterations reveals common reusable components that will be improved in subsequent iterations.
  • The spiral model allows for a more reliable and stable system. This is because as the system evolves, errors and weaknesses are discovered and corrected at each iteration. At the same time, critical performance parameters can be adjusted, which in the case of a waterfall model is available only before the implementation of the system.
  • An iterative approach provides an opportunity to improve the development process - the analysis at the end of each iteration allows you to assess what needs to be changed in the development organization and improve it in the next iteration.

Software life cycle. Stages and stages

The life cycle of an IS is a series of events that occur with the system in the process of its creation and use.

Stage - a part of the software development process, limited by a certain time frame and ending with the release of a specific product (models, software components, documentation), determined by the requirements set for this stage.

The life cycle is traditionally modeled as a number of successive stages (or stages, phases). Currently, there is no generally accepted division of the life cycle of a software system into stages. Sometimes a stage is singled out as a separate item, sometimes it is included as an integral part of a larger stage. The actions taken at one stage or another may vary. There is no uniformity in the names of these stages.

Traditionally, the following main stages of the life cycle of software are distinguished:

Requirements analysis,

Design,

Coding (programming),

Testing and Debugging,

Operation and maintenance.

Software life cycle. Cascade model

cascade model (70-80 years) ≈ assumes the transition to the next stage after the complete completion of the work on the previous stage,

The main achievement of the waterfall model is the completion of the stages. This makes it possible to plan costs and timelines. In addition, project documentation is formed that is complete and consistent.

The waterfall model is applicable to small software projects with clearly defined and unchangeable requirements. The real process can reveal failures at any stage, which leads to a rollback to one of the previous stages. The model of such software production is cascade-return

Software life cycle. Step-by-step model with intermediate control

step-by-step model with intermediate control (80-85) ≈ an iterative model of software development with feedback loops between the stages. The advantage of this model is that inter-step adjustments are less labor-intensive than the waterfall model; however, the lifetime of each stage extends over the entire development period,

The main stages of solving problems

The purpose of programming is to describe data processing processes (hereinafter referred to as simply processes).

Data (data) is a representation of facts and ideas in a formalized form, suitable for transfer and processing in a certain process, and information (information) is the meaning that is given to data when they are presented.

Data processing is the execution of a systematic sequence of actions on data. The data are presented and stored on data carriers.

The collection of data carriers used in any kind of data processing is called the data medium.

The set of data contained at any moment in the information environment is the state of the information environment.

A process can be defined as a sequence of successive states of a certain information environment.

To describe a process means to determine the sequence of states of the information environment. In order for the required process to be generated automatically on any computer according to a given description, this description must be formalized.

Software quality criteria

A commercial product (product, service) must meet customer requirements.

Quality is an objective characteristic of a product (product, service), showing the degree of customer satisfaction

Quality characteristics:

› Operability - the system works and implements the required functions.

› Reliability - the system works without failures and failures.

› Recoverability.

› Efficiency - the system implements its functions in the best possible way.

› Economic efficiency - the minimum cost of the final product with the maximum profit.

Quality characteristics:

› Taking into account the human factor - ease of use, speed of learning to work with PP, ease of maintenance, making changes.

› Portability (portability) - portability of code to another platform or system.

› Functional completeness - perhaps the most complete implementation of external functions.

› Calculation accuracy

Algorithm properties.

Effectiveness means the possibility of obtaining a result after performing a finite number of operations.

Certainty consists in the coincidence of the results obtained regardless of the user and the applied technical means.

Mass character lies in the possibility of applying the algorithm to a whole class of problems of the same type, differing in specific values \u200b\u200bof the initial data.

Discreteness - the possibility of dividing the process of calculations prescribed by the algorithm into separate stages, the ability to select sections of the program with a certain structure.

Methods for describing algorithms

There are the following ways to describe (represent) algorithms:

1. verbal description;

2. description of the algorithm using mathematical formulas;

3. a graphical description of the algorithm in the form of a block diagram;

4. description of the algorithm using pseudocode;

5.combined way of displaying the algorithm using verbal, graphic and other methods .

6. using Petri nets.

Verbal description algorithm is a description of the structure of the algorithm in natural language. For example, household appliances are usually accompanied by an instruction manual, i.e. a verbal description of the algorithm according to which this device is to be used.

Graphic Description algorithm in the form of a flowchartIs a description of the structure of the algorithm using geometric shapes with communication lines.

A flowchart is a graphical representation of a problem-solving method that uses special characters to represent operations.

The symbols that make up the block diagram of the algorithm are determined by GOST 19.701-90. This GOST corresponds to the international standard for the design of algorithms, therefore, the block diagrams of algorithms drawn up in accordance with GOST 19.701-90 are understood unambiguously in different countries.

Pseudocode - description of the structure of the algorithm in a natural, but partially formalized language. The pseudocode uses some formal constructs and common mathematical notation. There are no strict syntax rules for writing pseudocode.

Let's look at the simplest example. Let it be necessary to describe the algorithm for displaying the largest value of two numbers on the monitor screen.


Figure 1 - An example of the description of the algorithm in the form of a block diagram

Description of the same algorithm in pseudocode:

2. Entering numbers: Z, X

3. If Z\u003e X then Conclusion Z

4. Otherwise, output X

Each of the listed methods of displaying algorithms has both advantages and disadvantages. For example, the verbal method is notable for its verbosity and lack of clarity, but it makes it possible to better describe individual operations. The graphical method is more visual, but it is often necessary to describe some operations in verbal form. Therefore, when developing complex algorithms, it is better to use a combined method.

Types of algorithms

linear;

branching;

cyclical.

· Linear algorithm - a set of commands (instructions) executed sequentially one after another.

· Forking algorithm - an algorithm containing at least one condition, as a result of checking which the computer provides a transition to one of two possible steps.

· Cyclic algorithm - an algorithm that provides multiple repetition of the same action (the same operations) on new initial data. Most of the methods of calculations, enumeration of options, are reduced to cyclic algorithms. Program cycle - a sequence of commands (series, loop body), which can be executed multiple times (for new initial data) until a certain condition is satisfied.

C. Data types.

A data type is a description of the range of values \u200b\u200bthat a variable of the specified type can take. Each data type is characterized by:
1.the number of occupied bytes (size)
2. the range of values \u200b\u200bthat a variable of this type can take.

All data types can be divided into the following types:
1. simple (scalar) and complex (vector) types;
2. basic (system) and user defined (defined by the user).
In the C language, the base type system is formed by four data types:
1.character,
2.integer,
3.real single precision,
4. double precision real.

The structure of a C program.

1. Operators of the C ++ language

Operators control the process of program execution. The set of C ++ operators contains all the control constructs of structured programming.
The compound statement is delimited by curly braces. All other operators end with a semicolon.
Empty operator -;
An empty operator is a semicolon-only operator. It can appear anywhere in a program where the syntax requires a statement. Execution of an empty statement does not change the state of the program.
Compound operator - (...)
The action of a compound statement consists in sequential execution of the statements contained in it, except for those cases when any statement explicitly transfers control to another place in the program.
Exception Handling Operator

try (<операторы> }
catch (<объявление исключения>) { <операторы> }
catch (<объявление исключения>) { <операторы> }
...
catch (<объявление исключения>) { <операторы> }

Conditional operator

if (<выражение>) <оператор 1>

Switch operator

switch (<выражение>)
(case<константное выражение 1>: <операторы 1>
case<константное выражение 2>: <операторы 2>
...
case<константное выражение N>: <операторы N>
}
The switch operator is designed to select one of several alternative ways of program execution. Evaluation of the switch operator begins with the evaluation of the expression, after which control is transferred to the operator marked with a constant expression equal to the evaluated value of the expression. The exit from the switch operator is performed by the break operator. If the value of the expression is not equal to any constant expression, then control is transferred to the operator marked with the default keyword, if any.
Loop operator with precondition

while (<выражение>) <оператор>

Loop operator with postcondition

do<оператор> while<выражение>;
In the C ++ language, this operator differs from the classical implementation of a loop with a postcondition in that when the expression is true, the loop continues, and not the loop exits.
Step Cycle Operator

for ([<начальное выражение>];
[<условное выражение>];
[<выражение приращения>])
<оператор>
The body of the for statement is executed until the conditional expression becomes false (equal to 0). An initial expression and an increment expression are commonly used to initialize and modify loop parameters and other values. The initial expression is evaluated once before the first test of the conditional expression, and the increment expression is evaluated after each statement execution. Any of the three loop header expressions, or even all three, can be omitted (remember to leave semicolons). If the conditional expression is omitted, then it is considered true, and the loop becomes infinite.
The stepwise loop operator in the C ++ language is a flexible and convenient construction, therefore the loop operator with the while precondition is used extremely rarely in the C ++ language, since in most cases it is more convenient to use the for statement.
Break operator

break;
The break statement interrupts the execution of the while, do, for, and switch statements. It can only be contained in the body of these statements. Control is transferred to the program operator following the interrupted one. If a break statement is written inside nested while, do, for, switch statements, then it terminates only the immediately enclosing statement.
Continuation operator

continue;
The continuation statement transfers control to the next iteration in the while, do, for loop statements. It can only be contained in the body of these statements. In the do and while statements, the next iteration begins by evaluating a conditional expression. In the for statement, the next iteration begins by evaluating the increment expression, and then evaluates the conditional expression.
Return operator

return [<выражение>];
The return statement ends execution of the function that contains it and returns control to the calling function. Control is passed to the point of the calling function

If (boolean expression)

operator;

If (boolean expression)

operator_1;

operator_2;

<логическое выражение> ? <выражение_1> : <выражение_2>;

If the value of the logical expression is true, then expression_1 is evaluated, otherwise expression_2 is evaluated.

switch (integer expression)

case value_1:

statement_sequence_1;

case value_2:

statement_sequence_2;

case value_n:

statement_sequence_n;

default:

statement_sequence_n + 1;

Branch default can not be described. It is executed if none of the higher-level expressions is satisfied.

Loop operator.

Turbo C has the following constructs that allow you to program loops: while, do while and for ... Their structure can be described as follows:

Loop with condition check at the top:

Selection operator

If the actions that need to be performed in the program depend on the value of some variable, you can use the select statement. At the same time, in C ++, only numeric variables can be used as variables in the select statement. In general, the record of the selection operator looks like this:

switch (variable)
{
case value1:
actions1
break;

case value2:
actions2
break;
...

default:
default actions
}

The break keyword must be added to the end of each branch. It stops the execution of the selection operation. If you do not write it, after performing actions from one branch of the selection, the execution of actions from the following branches will continue. However, sometimes this property of choice is useful, for example, if you need to perform the same actions for different values \u200b\u200bof a variable.

switch (variable)
{
case value1:
case value2:
actions1
break;

case value3:
actions2
break;
...
}

Example using selection:

int n, x;
...
switch (n)
{
case 0:
break; // if n is 0, then we do not perform any action

case 1:
case 2:
case 3:
x \u003d 3 * n; // if n is 1, 2 or 3, then we perform some actions
break;

case 4:
x \u003d n; // if n is 4, then do other actions
break;

default:
x \u003d 0; // for all other values \u200b\u200bof n, perform the default actions
}

C. Loop: Loop with parameter

General form of entry

for (parameter initialization; check termination condition; parameter correction) (

block of operations;

for is a parametric loop (loop with a fixed number of repetitions). To organize such a cycle, three operations must be performed:

§ parameter initialization - assignment of an initial value to a cycle parameter;

§ checking the end condition - comparison of the parameter value with some boundary value;

§ parameter correction - changing the value of the parameter with each passage of the loop body.

These three operations are written in parentheses and separated by semicolons (;). Typically, the loop parameter is an integer variable.
The parameter is initialized only once — when the for loop starts executing. The end condition is checked before each possible execution of the loop body. When the expression becomes false (equal to zero), the loop ends. The parameter is adjusted at the end of each execution of the loop body. The parameter can either increase or decrease.

Example

#include
int main () (

for (num \u003d 1; num< 5; num++)

printf ("num \u003d% d \\ n", num);

C. Loop with precondition

General form of entry

while (expression) (

block of operations;
}

If the expression is true (not equal to zero), then the block of operations enclosed in curly braces is executed, then the expression is checked again. The sequence of actions, consisting of checking and executing a block of operations, is repeated until the expression becomes false (equal to zero). In this case, the loop is exited, and the operation after the loop operator is executed.

Example

int k \u003d 5;
int i \u003d 1;
int sum \u003d 0;
while (i<=k) {

When building a while loop, it is necessary to include constructions in it that change the value of the tested expression so that in the end it becomes false (equal to zero). Otherwise, the loop will be executed endlessly (infinite loop), for example

block of operations;
}

while is a loop with a precondition, so it is quite possible that the body of the loop will not be executed even once if the checked condition turns out to be false at the time of the first check.

C. Loop with postcondition

Loop with postcondition do ... while

General form of entry

block of operations;

) while (expression);

Loop with postcondition

The do ... while loop is a loop with a postcondition, where the truth of the expression is checked after all the operations included in the block enclosed by curly braces have been executed. The body of the loop is executed until the expression becomes false, that is, the body of the loop with the postcondition is executed though once.

It is better to use a do ... while loop in cases where at least one iteration must be performed, or when the initialization of objects participating in the condition check occurs inside the loop body.

Example... Enter a number from 0 to 10

#include
#include
int main () (

system ("chcp 1251");

printf ("Please enter a number between 0 and 10:");

scanf ("% d", & num);

) while ((num< 0) || (num > 10));

printf ("You entered the number% d", num);

getchar (); getchar ();

Defining functions

Let's consider the definition of a function using the example function sum.

In C and C ++, functions do not need to be defined until they are used, but they must be previously declared. But even after all this, in the end, this function must be defined. The function prototype and definition are then linked and the function can be used.

If the function was previously declared, it must be defined with the same return value and data types, otherwise a new, overloaded function will be created. Note that the names of the function parameters do not have to be the same.

The concept of "life cycle" implies something that is being born, developing and dying. Like a living organism, software products are created, operated and developed over time.

Life cycle software includes all stages of its development: from the emergence of a need for it to the complete cessation of its use due to obsolescence or the loss of the need to solve the corresponding problems.

There are several phases of the existence of a software product during its life cycle. There are still no generally accepted names for these phases and their number. But there is no particular disagreement on this issue either. Therefore, there are several options for dividing the software life cycle into stages. The question of whether a given particular partition is better than others is not a major one. The main thing is to properly organize software development taking them into account.

According to the duration of the life cycle, software products can be divided into two classes: small and long life span. These classes of programs correspond to a flexible (soft) approach to their creation and use and a rigid industrial approach to the regulated design and operation of software products. In scientific organizations and universities, for example, the development of programs of the first class prevails, and in design and industrial organizations - the second.

Short-lived software products are created mainly for solving scientific and engineering problems, for obtaining specific results of calculations. Such programs are usually relatively small. They are developed by one specialist or a small group. The main idea of \u200b\u200bthe program is discussed by one programmer and end user. Some details are put on paper and the project is completed in a few days or weeks. They are not intended to be replicated and transferred for later use by other groups. As such, such programs are part of research and development and cannot be regarded as alienable software products.

Their life cycle consists of a long interval of system analysis and formalization of the problem, a significant stage in the design of programs and a relatively short time of operation and obtaining results. Requirements for functional and design characteristics, as a rule, are not formalized, there are no formalized tests of programs. Their quality indicators are controlled only by developers in accordance with their informal ideas.

Short-lived software products

Maintenance and modification of such programs is optional, and their life cycle ends after receiving the results of calculations. The main costs in the life cycle of such programs fall on the stages of system analysis and design, which last from a month to 1 ... 2 years, as a result

the life cycle of a software product rarely exceeds 3 years.

Software products with long service life are created for regular information processing and management. The structure of such programs is complex. Their sizes can vary within wide limits (1 ... 1000 thousand commands), however, they all have the properties of cognizability and the possibility of modification in the process of long-term maintenance and use by various specialists. Software products of this class can be replicated, they are accompanied by documentation as industrial products and are software products alienated from the developer.

Software products with long service life

Large teams of specialists are engaged in their design and operation, which requires formalization of the software system, as well as formalized testing and determination of the achieved quality indicators of the final product. Their life cycle is 10 ... 20 years. Up to 70 ... 90% of this time is spent on operation and maintenance. Due to mass replication and long-term maintenance, the total costs in the process of operating and maintaining such software products significantly exceed the costs of system analysis and design.

All subsequent presentation focuses on the development of large (complex) software tools for control and information processing.

Generalized model life cycle a software product might look like this:

I. System analysis:

a) research;

b) feasibility analysis:

Operational;

Economic;

Commercial.

II. Software design:

a) design:

Functional decomposition of the system, its architecture;

External software design;

Database design;

Software architecture;

b) programming:

Internal software design;

External design of software modules;

Internal design of software modules;

Coding;

Debugging programs;

Programming;

c) software debugging.

III. Evaluation (testing) of software.

IV. Software use:

a) operation;

b) accompaniment.

I... System analysis.At the beginning of software development, a system analysis (preliminary design) is carried out, during which the need for it, its purpose and main functional characteristics are determined. Costs and possible efficiency of the future software product are estimated.

At this stage, a list of requirements is drawn up, that is, a clear definition of what the user expects from the finished product. Here, goals and objectives are set, for the sake of which the project itself is being developed. The systems analysis phase can be divided into two directions: research and feasibility studies.

Research begins from the moment the development manager realizes the need for software.

The job consists of planning and coordinating the activities required to prepare a formal handwritten list of requirements for the software product being developed.

Research ends when the requirements are formed in such a way that they become visible and, if necessary, can be modified and approved by the responsible manager.

Feasibility study there is a technical part of the research and begins when the intention of the leadership is strengthened enough that a project manager is appointed to organize the design and allocation of resources (labor).

The work consists in the study of the proposed software product in order to obtain a practical assessment of the feasibility of the project, in particular, the following are determined:

- operational feasibility , will the product be comfortable enough for practical use?

- economic feasibility , is the cost of the product being developed acceptable? What is this cost? Will the product be a cost effective tool in the hands of the user?

- commercial feasibility, will the product be attractive, in demand, easy to install, adaptable to service, easy to learn?

These and other issues need to be addressed mainly when considering the above requirements.

The feasibility study ends when all requirements have been collected and approved.

Before proceeding with further work on the project, you need to make sure that all the necessary information is received. This information must be accurate, understandable and workable. It should represent a full set of requirements that satisfy the user for the developed software product, drawn up in the form of a specification.

Failure to comply with this requirement can significantly slow down the implementation of the project in the future due to repeated repeated calls to the user for clarification of incorrectly interpreted details, unspecified conditions and, as a result, it will require reworking its already developed parts.

Often during the period of system analysis, a decision is made to stop further software development.

II... Software design. Design is the main and decisive phase of the software life cycle, during which a software product is created and 90% takes its final form.

This phase of life covers the various activities of the project and can be divided into three main phases: design, programming, and debugging of a software product.

Construction software usually starts as early as the feasibility study phase, once some preliminary goals and requirements are fixed on paper.

By the time the requirements are approved, work in the design phase will be in full swing.

In this segment of the life of the software, they carry out:

Functional decomposition of the problem being solved, on the basis of which the system architecture of this problem is determined;

External design of software, expressed in the form of external interaction with the user;

Database design, if necessary;

Software architecture design - defining objects, modules and their interface.

Programming begins already in the design phase, as soon as the basic specifications for individual components of the software product become available, but not before the approval of the requirements agreement. Overlapping the programming and design phases leads to savings in overall development time, as well as to ensure that design decisions are validated, and in some cases affects the solution of key issues.

At this stage, the work associated with assembling the software product is performed. It consists in a detailed internal design of a software product, in the development of the internal logic of each module of the system, which is then expressed in the text of a specific program.

The programming phase ends when the developers have finished documenting, debugging, and assembling the individual pieces of the software product into one whole.

Debugging software is carried out after all its components are debugged separately and assembled into a single software product.

III... Evaluation (testing) of software.In this phase, the software product is subjected to rigorous system testing by a group of non-developers.

This is done to ensure that the finished software product meets all requirements and specifications, can be used in a user environment, free of any defects, and contains the necessary documentation that accurately and completely describes the software product.

The evaluation phase begins as soon as all components (modules) are assembled and tested, i.e. after full debugging of the finished software product. It ends after receiving confirmation that the software product has passed all tests and is ready for use.

It takes as long as programming.

IV. Use of software.If systems analysis is the signal for battle, design is attack and return with victory, then using a software product is a daily defense, vital, but usually not honorable for developers.

Such a comparison is appropriate in view of the fact that during the use of a software product, errors that have crept in in the process of its design are corrected.

The use phase of a software item begins when the item is transferred to the distribution system.

This is the time during which the product is in action and used effectively.

At this time, personnel training, implementation, configuration, maintenance and, possibly, expansion of the software product - the so-called ongoing design - are carried out.

The use phase ends when the product is taken out of use and the above activities are terminated. Note, however, that the software product can be used for a long time by someone else and after the use phase as defined here is over. Because this someone can fruitfully use the software product at home even without the developer's help.

The use of a software product is determined by its operation and maintenance.

Operation of the software product consists in its execution, functioning on a computer for information processing and in obtaining results that are the purpose of its creation, as well as in ensuring the reliability and reliability of the data provided.

Software maintenance consists in maintenance, development of functional capabilities and improvement of operational characteristics of the software product, in replication and transfer of the software product to various types of computing facilities.

Maintenance plays the role of necessary feedback from the operational phase.

During the operation of the software, it is possible to detect errors in programs, and it becomes necessary to modify them and expand their functions.

These modifications are usually carried out simultaneously with the operation of the current version of the software product. After checking the prepared corrections on one of the copies of the programs, the next version of the software product replaces the previously used ones or some of them. In this case, the process of operating a software product can be almost continuous, since the replacement of a version of a software product is short-term. These circumstances lead to the fact that the process of operating a version of a software product usually proceeds in parallel and independently of the maintenance stage.

Overlap between phases of software product lifecycle

Overlaps between the different phases of the software product life cycle are possible and generally desirable. However, there should be no overlap between non-adjacent processes.

Feedback between phases is possible. For example, during one of the external design steps, errors in the formulation of goals may be found, then you need to immediately return and correct them.

The considered model of the software product life cycle, with some changes, can serve as a model for small projects as well.

For example, when a single program is being designed, the system architecture is often dispensed with and

database design; the processes of original and detailed external design often merge together, etc.

Software life cycle

The software life cycle is a period of time that begins from the moment a decision is made on the need to create a software product and ends at the moment of its complete withdrawal from service. (IEEE Std 610.12 standard)

The need to determine the stages of the software life cycle (LC) is due to the desire of developers to improve the quality of software through optimal development management and the use of a variety of quality control mechanisms at every stage, from the setting of the problem to the author's support of the software. The most general representation of the software life cycle is a model in the form of basic stages - processes, which include:

System analysis and justification of software requirements;

Preliminary (sketch) and detailed (technical) software design;

Development of software components, their integration and software debugging as a whole;

Testing, trial operation and software replication;

Regular software operation, maintenance support and analysis of results;

Software maintenance, its modification and improvement, creation of new versions.

This model is generally accepted and corresponds to both domestic regulatory documents in the field of software development, and foreign ones. From the point of view of ensuring technological safety, it is advisable to consider in more detail the peculiarities of the presentation of the stages of life cycle in foreign models, since it is foreign software that is the most likely carrier of software defects of a sabotage type.

Software lifecycle standards

GOST 34.601-90

ISO / IEC 12207: 1995 (Russian analogue - GOST R ISO / IEC 12207-99)

The graphic presentation of life cycle models allows you to visually highlight their features and some properties of processes.

Initially, a cascading life cycle model was created, in which major stages began one after another using the results of previous work. It provides for the sequential execution of all stages of the project in a strictly fixed order. The transition to the next stage means the complete completion of the work at the previous stage. Requirements identified at the stage of requirements formation are strictly documented in the form of technical specifications and are fixed for the entire duration of the project development. Each stage ends with the release of a complete set of documentation, sufficient for development to be continued by another development team. The inaccuracy of any requirement or its incorrect interpretation, as a result, leads to the fact that it is necessary to "roll back" to the early phase of the project and the required revision not only knocks the project team off the schedule, but often leads to a qualitative increase in costs and, possibly, to the termination of the project in the form in which it was originally conceived. The main misconception of the authors of the waterfall model is the assumption that the project goes through the entire process once, the designed architecture is good and easy to use, the implementation design is reasonable, and implementation errors are easily eliminated as testing progresses. This model assumes that all errors will be concentrated in the implementation, and therefore they are eliminated evenly during component and system testing. Thus, the waterfall model for large projects is not very realistic and can be effectively used only for creating small systems.

The most specific is the spiral life cycle model. In this model, attention is focused on the iterative process of the initial design stages. At these stages, concepts, requirements specifications, preliminary and detailed design are sequentially created. At each stage, the content of the work is specified and the appearance of the software being created is concentrated, the quality of the results obtained is assessed and the work of the next iteration is planned. At each iteration, the following are evaluated:

The risk of exceeding the terms and cost of the project;

The need to perform one more iteration;

The degree of completeness and accuracy of understanding the requirements for the system;

Feasibility of terminating the project.

Life cycle software standardization is carried out in three directions. The first direction is organized and promoted by the International Organization for Standardization (ISO - International Standard Organization) and the International Electro-technical Commission (IEC - International Electro-technical Commission). At this level, the standardization of the most general technological processes that are important for international cooperation is carried out. The second direction is being actively developed in the USA by the Institute of Electrotechnical and Electronics Engineers (IEEE) jointly with the American National Standards Institute (ANSI). ISO / IEC and ANSI / IEEE standards are mostly advisory in nature. The third area is stimulated by the US Department of Defense (DOD). DOD standards are mandatory for firms commissioned by the US Department of Defense.

To design software for a complex system, especially a real-time system, it is advisable to use a system-wide model of life cycle, based on the combination of all known works within the framework of the considered basic processes. This model is intended for use in planning, scheduling, managing various software projects.

It is advisable to divide the set of stages of this model of life cycle into two parts, significantly differing in the features of the processes, technical and economic characteristics and factors influencing them.

In the first part of the life cycle, system analysis, design, development, testing and software testing is carried out. The range of works, their labor intensity, duration and other characteristics at these stages significantly depend on the object and the development environment. The study of such dependencies for different classes of software makes it possible to predict the composition and main characteristics of work schedules for new software versions.

The second part of the life cycle, reflecting support for the operation and maintenance of software, is relatively weakly related to the characteristics of the object and the development environment. The range of works at these stages is more stable, and their labor intensity and duration can vary significantly, and depend on the mass use of software. For any model of life cycle, ensuring the high quality of software systems is possible only when using a regulated technological process at each of these stages. Such a process is supported by development automation tools, which are advisable to choose from the available ones or to create, taking into account the development object and an adequate list of works.

The concept of software life cycle (software life cycle) is one of the basic concepts in software engineering. Life cycle is defined as the period of time that begins from the moment a decision is made on the need to create software and ends at the time of its complete withdrawal from service.

In accordance with the ISO / IEC 12207 standard, all life cycle processes are divided into three groups (Fig. 2.1).

Under life cycle model Software is understood as a structure that determines the sequence of execution and the relationship of processes, actions and tasks throughout the life cycle. It depends on the specifics, scale and complexity of the project and the specifics of the conditions in which the system is created and functions. The software life cycle usually includes the following stages:

1. Formation of software requirements.

2. Design.

3. Implementation.

4. Testing.

5. Commissioning.

6. Operation and maintenance.

7. Decommissioning.

Currently, the following basic models of software lifecycle are most widely used:

a) cascading and

b) spiral (evolutionary).

The first was used for programs of a small size, representing a single whole. Principal feature waterfall approach is that the transition to the next stage is carried out only after the work on the current one is completely completed, and there are no returns to the passed stages. Its diagram is shown in Fig. 2.2.

The advantages of using the waterfall model are as follows:

At each stage, a complete set of project documentation is formed;

The stages of work carried out allow you to plan the date of their completion and the corresponding costs.

This model is used for systems for which all requirements can be precisely formulated at the beginning of development. These include, for example, systems in which, mainly, problems of a computational type are solved. Real processes are usually iterative in nature: the results of the next stage often cause changes in design solutions developed at earlier stages. Thus, the more common model is with intermediate control, which is shown in Fig. 2.3.

The main disadvantage of the waterfall approach is a significant delay in obtaining results and, as a consequence, a rather high risk of creating a system that does not meet the changed needs of users.

These problems are resolved in spiral life cycle model (fig. 2.4). Its fundamental feature is that the application software is not created immediately, as in the case of the waterfall approach, but in parts using the method prototyping ... A prototype is understood as an active software component that implements individual functions and an external interface of the software being developed. Prototyping is done in several iterations - turns of the spiral.

The waterfall (evolutionary) model can be represented in the form of a diagram, which is shown in Figure 2.5.

One of the results of the application of the spiral life cycle model is the widely used method of the so-called rapid application development , or RAD (Rapid Application Development). According to this method, the software life cycle includes four stages:

1) analysis and planning of requirements;

2) design;

3) implementation;

4) implementation.

Analysis of the life cycle of programs allows you to clarify the content and highlight the following processes of designing complex systems.

1) Strategy;

2) Analysis;

3) Design;

4) Implementation;

5) Testing;

6) Implementation;

7) Operation and technical support.

Strategy

Defining a strategy involves examining the system. The main task of the survey is to assess the real scope of the project, its goals and objectives, as well as to obtain definitions of entities and functions at a high level. At this stage, highly qualified business analysts are involved, who have constant access to the firm's management. In addition, close interaction with the main users of the system and business experts is expected. The main task of such interaction is to obtain as complete information about the system as possible, to unambiguously understand the customer's requirements and to transmit the information received in a formalized form to system analysts. Typically, information about the system can be obtained from a series of conversations (or seminars) with management, experts and users.

The result of the strategy definition stage is a document in which the following is clearly formulated:

What exactly is due to the customer if he agrees to finance the project;

When will he be able to receive the finished product (work schedule);

How much will it cost him (schedule of financing stages of work for large projects).

The document should reflect not only costs, but also benefits, for example, the payback period of the project, the expected economic effect (if it can be estimated).

The considered stage of the software life cycle can be represented in the model only once, especially if the model has a cyclical structure. This does not mean that strategic planning in cyclical models is done once and for all. In such models, the stages of defining strategy and analysis are, as it were, combined, and their separation exists only at the very first stage, when the management of the enterprise makes a fundamental decision about starting the project. In general, the strategic stage is devoted to the development of a document at the level of enterprise management.

The analysis stage involves a detailed study of business processes (functions defined in the previous stage) and the information required for their implementation (entities, their attributes and relationships (relationships)). This stage provides the information model, and the next design stage is the data model.

All information about the system, collected at the stage of determining the strategy, is formalized and refined at the stage of analysis. Particular attention is paid to the completeness of the information received, its analysis for consistency, as well as the search for unused or duplicated information. As a rule, the customer first forms requirements not for the system as a whole, but for its individual components. And in this particular case, cyclical models of the software life cycle have an advantage, since over time it is highly likely that a reanalysis will be required, since the customer often has an appetite with eating. At the same stage, the necessary components of the test plan are determined.

Analysts collect and record information in two interrelated forms:

a) functions - information about events and processes that occur in the business;

b) Entities - Information about items that are relevant to the organization and about which something is known.

At the same time, diagrams of components, data flows and life cycles are built, which describe the dynamics of the system. They will be discussed later.

Design

At the design stage, a data model is formed. Designers process analysis data. The end product of the design phase is a database schema (if one exists in the project) or a data warehouse schema (ER model) and a set of system module specifications (function model).

In a small project (for example, in a course project), the same people can act as analysts, designers, and developers. The schemes and models listed above help to find, for example, not described at all, vaguely described, contradictory described system components and other flaws, which helps to prevent potential errors.

All specifications must be very accurate. The system test plan is also being finalized at this stage of development. In many projects, the results of the design phase are documented in a single document - the so-called technical specification. At the same time, the UML language has gained widespread use, which allows you to simultaneously obtain both analysis documents that are less detailed (their consumers are production managers) and design documents (their consumers are managers of development and test groups). This language will be discussed later. Software built using UML makes it easier to generate code - at least a hierarchy of classes, as well as some parts of the code of the methods (procedures and functions) themselves.

The design tasks are:

Consideration of the analysis results and verification of their completeness;

Seminars with a customer;

Identification of critical areas of the project and assessment of its limitations;

Determination of the system architecture;

Making a decision on the use of third-party products, as well as on methods of integration and mechanisms for exchanging information with these products;

Data warehouse design: database model;

Process and code design: final selection of development tools, definition of program interfaces, mapping of system functions to its modules and definition of module specifications;

Determination of requirements for the testing process;

Determination of system security requirements.

Implementation

When implementing a project, it is especially important to coordinate the development team (s). All developers must obey strict source control guidelines. Having received a technical project, they begin to write module code. The main task of developers is to understand the specification: the designer wrote what to do, and the developer determines how to do it.

During the development phase, there is close interaction between designers, developers and testing teams. In the case of intensive development, the tester is literally inseparable from the developer, effectively becoming a member of the development team.

User interfaces are most often changed during the development phase. This is due to the periodic demonstration of the modules to the customer. It can also significantly modify data queries.

The development phase is associated with the testing phase, and both processes run in parallel. The bug tracking system synchronizes the actions of testers and developers.

Errors should be classified according to priority. For each class of errors, a clear structure of actions should be defined: “what to do”, “how urgent”, “who is responsible for the result”. Each issue should be tracked by a designer / developer / tester responsible for fixing it. The same applies to situations when the planned terms of development and submission of modules for testing are violated.

In addition, repositories of ready-made project modules and libraries that are used when assembling modules should be organized. This repository is constantly being updated. One person should oversee the update process. One repository is created for modules that have passed functional testing, the second is for modules that have passed link testing. The first is drafts, the second is something from which you can already assemble the distribution of the system and demonstrate it to the customer for control tests or for the delivery of any stages of work.

Testing

Test teams can be involved in collaboration early in the development of a project. Usually complex testing is separated into a separate development stage. Depending on the complexity of the project, testing and fixing bugs can take a third, half of the total project time, or even more.

The more complex the project, the greater the need to automate the bug tracking system, which provides the following functions:

Storing the error message (which component of the system the error belongs to, who found it, how to reproduce it, who is responsible for fixing it, when it should be fixed);

Notification system about the appearance of new errors, about changes in the status of errors known in the system (notifications by e-mail);

Reports on actual errors by system components;

Information about the error and its history;

Rules for accessing errors of certain categories;

Bug tracking system limited access interface for the end user.

Such systems take on many organizational problems, in particular the issues of automatic error notification.

The actual system tests are usually divided into several categories:

a) offline tests modules; they are used already at the stage of development of system components and allow you to track errors of individual components;

b) link tests system components; these tests are also used at the development stage, they allow you to track the correct interaction and exchange of information between system components;

c) system test; it is the main criterion for the acceptance of the system; Typically, this is a group of tests that includes both standalone tests and linkage tests and models; such a test should reproduce the operation of all components and functions of the system; its main purpose is internal acceptance of the system and assessment of its quality;

d) acceptance test; its main purpose is to hand over the system to the customer;

e) performance and load tests; this group of tests is included in the system, it is she who is the main one for assessing the reliability of the system.

Each group necessarily includes tests for modeling failures. They check the response of a component, a group of components, and the system as a whole to the following failures:

A separate component of the information system;

Groups of system components;

The main modules of the system;

Operating system;

Hard failure (power failure, hard drives).

These tests make it possible to assess the quality of the subsystem for restoring the correct state of the information system and serve as the main source of information for developing strategies to prevent the negative consequences of failures during industrial operation.

Another important aspect of the information systems testing program is the availability of test data generators. They are used to test the functionality, reliability and performance of the system. The problem of assessing the characteristics of the dependence of the performance of an information system on the growth of volumes of processed information cannot be solved without data generators.

Implementation

The trial operation overlaps the testing process. The system is rarely fully implemented. Typically, this is a gradual or iterative process (in the case of a cyclical life cycle).

Commissioning goes through at least three stages:

2) accumulation of information;

3) reaching the design capacity (that is, the actual transition to the operational stage).

information can cause a rather narrow range of errors: mainly, data mismatch during loading and bootloader's own errors. Data quality control methods are used to identify and eliminate them. Such errors must be corrected as soon as possible.

During the period accumulation of information the information system detects the largest number of errors associated with multi-user access. The second category of fixes is related to the fact that the user is not satisfied with the interface. At the same time, cyclical and feedback models of stages can reduce costs. This stage is also the most serious test - the customer acceptance tests.

System reaching design capacity in a good version, it is fine-tuning of minor errors and rare serious errors.

Operation and technical support

At this stage, the final document for developers is the technical acceptance act. The document defines the necessary personnel and required equipment to support the system's operability, as well as the conditions for disruption of product operation and the responsibilities of the parties. In addition, the terms of technical support are usually drawn up as a separate document.

 

It might be useful to read: