SOFTWARE CODING
The goal of coding or programming phase is to translate the design of the system produced during the design phase, in to code in a programming language which can be executed by the computer, and which performs the computation specified by the design.
During this step, the programmer eliminates all the syntax and format errors from the program and all logical errors are detected and resolved. Quality is an important goal during coding. The quality of source code can be improved by the use of structured coding techniques, good coding style and readable, consistent code format.
The design must be translated in to a machine-readable form. The code generation step performs this task. If design is performed in a detailed manner, code generation can be accomplished mechanistically. It usually involves transformation from one representation to another called an intermediate form. A code model must be chosen as an intermediate form. Code generation is closely tied to the instruction scheduling policies used.
The common type of reengineering is code restructuring. Some legacy systems have relatively solid program architecture, but individual modules were coded in a way that makes them difficult to understand, test, and maintain. In such cases, the code within the suspect modulus can be restructured. To accomplish this activity, the source code is analyzed using a restructuring tool. Violations of structured programming constructs are noted and code is then restructured. The resultant restructured code is reviewed and tested to ensure that no anomalies have been introduced.
Optimization of Code
Compilation is a software technique, which transforms the source program to generate better object code, which can reduce the running time and memory requirement. Program optimization often demands an effort from both the programmer and the compiler. Code scheduling methods ensure that control dependence, data dependence, and resource limitations are properly handled during concurrent execution. The goal is to produce a code schedule that minimizes the execution times or the memory demand, in addition to the enforcing correctness of execution. Static scheduling at compile time requires intelligent compilation support, whereas dynamic scheduling is assisted by static scheduling in improving performance and reducing hardware costs. On the other hand, static scheduling is assisted by hardware interlocking in enforcing correctness of execution.
No comments:
Post a Comment