The memory size is a significant aspect in the development of embedded systems. Programmers try to reduce the size of the generated compilation of codes through the use of compiler optimization techniques. This method is known as procedural abstraction.
Procedural abstraction is mainly used for optimizing code size. In the process, the repetitive instances of similar code fragments are grouped into new subroutines. During the early methods of programming, procedural abstraction is used on the primitive levels of the machine code in optimizing linkers and binary rewriting tools. A procedure is used to compile codes. It then provides an interface for the code through a formal parameter list and a mechanism for transferring parameters.
There are two types of procedural abstraction. Abstraction by parametrization skips the identification of the provided actual parameters used in the calling procedure. On the other hand, the specification technique provides abstraction from details of implementation of a procedure. Since a procedure has its unique piece of code with well-defined entry and exit points, a specification can be created for the specified code. A code specification defines the functions of the procedure without giving the details of how the procedure is implemented.
Top down. Top down programming is highly recommended in software development. The top down approach implements structural hierarchy on the programs design. The top down approach can be summarized into two stages: (1) defining the solution from the highest function level and (2) narrowing it down into smaller routines. Eventually, the components would be specific enough to be coded for the compilation of the program. Top down programming facilitates easier coding and documentation. It is the exact opposite of the bottom up programming technique, which is a very common approach in object-oriented programming languages such as Java.
The top down approach allows the programmer to give emphasis on the planning and provides a complete comprehension of the system. This method does not allow any coding to begin unless the appropriate level of detail has been met in the design of a certain part of the system. However, the top down technique attaches stubs in place of the module and waits until the significant design completes; a process which may cause delay in testing of the critical functional units of the system.