Functional decomposition

Structural approach.

The essence of the structural approach to the development of IS lies in its decomposition (partitioning) 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 up to specific procedures. At the same time, the automated system retains a holistic view in which all components are interconnected.

When developing a system “bottom-up” from individual tasks to the entire system, integrity is lost, problems arise in the informational docking of individual components.

All the most common structural approach methodologies are based on a number of general principles. The following two basic principles are used:

· the principle of “divide and conquer” – the principle of solving complex problems by breaking them into many smaller independent tasks that are easy to understand and solve;

· the principle of hierarchical ordering – the principle of organizing the constituent parts of the problem into hierarchical tree structures with the addition of new details at each level.

The selection of two basic principles does not mean that the remaining principles are secondary, since ignoring any of them can lead to unpredictable consequences (including the failure of the entire project). The main of these principles are the following:

the principle of abstraction – is to highlight the essential aspects of the system and distract from the non-essential;

· the principle of formalization – is the need for a rigorous methodological approach to solving the problem;

the principle of consistency – is the validity and consistency of the elements;

The principle of data structuring is that data must be structured and hierarchically organized.

Functional decomposition

First, a computational algorithm is segmented (a precisely defined indication of actions on data, which allows using a discrete digital computer to convert a certain data array (input data) into another data array (output data) in a finite number of operations), and then the scheme is adjusted to this scheme data decomposition.

The functional decomposition method can be useful in a situation where there are no data structures that could obviously be parallelized. Decomposition efficiency is ensured by the following recommendations:

· the number of subtasks after decomposition should exceed the number of processors approximately by an order of magnitude;

Avoid unnecessary calculations and data transfers;

subtasks should be approximately the same size;

Ideally, segmentation should be such that with an increase in the volume of the task, the number of subtasks also increases (while maintaining the size of one subtask constant).

The size of the subtask is determined by the granularity of the algorithm. The measure of granularity is the number of operations in a block. There are three degrees of granularity:

1. Fine- grained parallelism – at the command level (less than 20 commands per block, the number of parallel subtasks – from a few to several thousand, the average scale of parallelism is about 5 commands per block).

2. Medium-block parallelism – at the level of procedures. Block size up to 2000 commands. Detecting such parallelism is more difficult to implement because interprocedural dependencies must be taken into account. Communication requirements are less than in the case of instruction-level parallelism.

3. Large-block parallelism – at the level of programs (tasks). Corresponds to the execution of independent programs on a parallel computer . Large block parallelism requires operating system support.

The most important condition for decomposition is the independence of subtasks. There are the following types of independence:

· Data independence – data processed by one part of the program is not modified by another part of it.

· Independence in control – the order of execution of parts of the program can be determined only during the execution of the program (the presence of dependency in control predetermines the sequence of execution).

· Independence on resources – provided by a sufficient amount of computer resources.

· Output independence – occurs if two subtasks do not write to the same variable, and input-output independence, if the input / output statements of two or more subtasks do not access the same file (or variable).

Complete independence is usually not achieved. (plak-plak)

Bottom-up design is a design in which the execution of low-level procedures precedes the execution of design procedures related to higher hierarchical levels (ie, bottom-up).

Top-down design is top-down design, and is characterized by the opposite sequence of procedures.

A typical sequence of top-down ES design procedures includes:

system and technical design is an analysis of tactical and technical requirements for the design of a set of certain fundamentals of the principles of functioning, the development of block diagrams.

circuit design is the development of functional and circuit diagrams.

design engineering is the choice of form, layout and placement of constructs, routing of interconnections and development of design documentation.

technological design is the development of routes and technological base, the choice of equipment.

Top-Down Design

A typical sequence of bottom-up design procedures includes:

Device-technological design is the choice of basic technology, the calculation of profile diffusion, the choice of the topology of components.

Circuit design is a synthesis of a circuit diagram, optimization of element parameters.

Functional-logical design is the synthesis of logical circuits, the implementation of memory, the synthesis of control and verification tests.

Structural and technological design is the placement of elements, routing of interconnections, checking the compliance of topological and electrical circuits, drawing a layered topology.

At the same time, both in descending and ascending design, the sequence of design stages is characterized by an iterative character, in which the approximation to the final results is carried out by repeatedly performing the same procedure with the adjustment of the initial data.

Structuring.

The structuring is based on the following simple rules:

1. The program must be compiled in small steps, the step size is determined by the number of decisions applied by the programmer at this step.

2. A complex task is broken down into simple, easily perceived parts, each of which has only one input and one output.

3. The logic of the program should be based on the minimum number of simple basic control structures.

The foundation of structured programming is the structuring theorem. This theorem establishes that no matter how difficult the task is, the flowchart of the program can be represented using a very limited number of elementary control structures. These elementary structures can be interconnected to form more complex structures, while they can be quite complex block diagrams with one input and one output.

To avoid arbitrary transfers of control in the program, where possible, it is better not to use the GOTO, RETURN statements. A characteristic feature of a structured program is not so much the absence of these operators, but the presence of a rigid structure of its organization. If the text of the program takes up several tens of pages, then the perception of such a program will be difficult, therefore it is recommended to structure the text of the program (for example, the program consists of 80 pages of source text, it is necessary to replace this source text with text that reflects the most important, in a functional sense, phrases in the form of segments). If you paint the entire software complex in large segments, then the description of the entire complex can take only one page, which is visual and convenient.

Any program can be made up of only three types of structures: follow, branch and cycle (these are the basic structures).

  • Following is a construction, which is the sequential execution of two or more statements (simple or compound).
  • Branching specifies the execution of either one or the other statement, depending on the fulfillment of some condition.
  • A loop defines the repeated execution of a statement.

Be First to Comment

Leave a Reply

Your email address will not be published.