Content |
Stages of solving of tasks on a computer
The main stages of solving of tasks on a computer:
- Problem definition
- Determination of methods of the solution
- Drawing up algorithms
- Writing of the computer programs
- Debugging of programs on a computer
- Obtaining results on a computer
Problem definition
Problem definition - exact and accurate determination of required results and original conditions in tasks.
Results are correct if they meet the requirements of assigned tasks.
Results are wrong if they contradict the delivered requirements.
Tasks can be private (specific) and generalized (mass).
Determination of methods of the solution
The method of the solution is the general method of the solution of some class of tasks.
Solution method - correct if it yields the correct results.
Solution method - wrong if it yields the wrong results.
Method - the sequence of actions leading to obtaining results.
Solution method - correct if it yields the correct results for any initial data of an assigned task.
Drawing up algorithms
Algorithmization is a drawing up algorithms for solving of tasks on a computer. For solving of tasks on a computer exact problem definition with accurate selection required and initial is initial.
The algorithm is productive if its accomplishment leads to obtaining results.
The algorithm is correct if it yields the correct results for any legal initial data.
The algorithm contains errors if for it yields the wrong results or does not yield results in general for some legal initial data.
Writing and debugging of programs on a computer
Programming - writing of the computer programs can is made by three methods:
- writing of the program proceeding from statements of the problem. (traditional method)
- coding of programs for detailed algorithms of solving of tasks on a computer
- joint algorithm elaboration and programs (structured design)
The program contains errors if its accomplishment on a computer leads to receiving failures, failures or obtaining not the correct results.
Errors in algorithms programs - one of the most serious problems in information science and professional programming.
Debugging of programs - search and error correction in programs on a computer. As the number of errors is unknown, also duration of debugging of programs on a computer is unknown.
The lack of errors in programs is checked by their testing for a computer. Testing can reveal errors, but cannot guarantee lack of errors in programs. (Dijkstra)
Testing of programs for a computer
Testing of programs is a verification process of programs on a computer by tests. Tests are sets of test initial data with the list correct to results.
Obtaining the wrong results, failures or failures speaks about existence of errors in programs. Testing can show existence of errors in programs on a computer
The test set is structurally complete if on this test set each alternative, each sequence and each cycle one or several times is executed.
Testing cannot guarantee lack of errors in programs. Only the exhaustive analysis of correctness of algorithms and programs can give guarantees of lack of errors.
The analysis and correctness proofs of algorithms and programs it is possible and it is necessary to carry out after structurally complete testing of programs for a computer.
Analysis of correctness of algorithms
Examples of the analysis of correctness of algorithms and programs in the BASIC and Pascal languages are given in books by Dijkstra and textbooks by information science of Kaiming.
All examples are given with problem definitions, algorithms, specifications, texts of programs on the BASIC and correctness proofs of programs.
- VAK, prof., dock. computer. sciences 12:07 p.m., on July 19 2009 (UTC)
Literature
- Kaiming V.A. Informatika. The textbook for students. M, INFRA-M, 1998-2009.
- Kaiming V.A. Informatika. The textbook for school students. M, Progress, 2009.
- Kaiming V.A. Informatika. A benefit to examinations. M, RIOR, 2008.
- Kaiming V. A. Bases of evidential programming. M, MIEM, 1987.
- Kaiming V. A. Methods of development of programs in languages of the high level. M, MIEM, 1985.
- Kaiming V. A., Piterkin V.M. Fundamentals of information science and VT. The textbook for students. M.,MIEM. 1985.
- VAK, prof., dock. computer. sciences 10:21 a.m., on July 19 2009 (UTC)
Internet sources
- INFORMATION SCIENCE at Schools and Universities
- Information science: The USE and examinations on a computer
- The Olympic Games on information science and programming