Minimization of Time & Cost Factors with Optimized Program-States Using Exception-Handling Constructs in Java (During Analysis and Testing of Programs)

Pawan Nagar
2012 IOSR Journal of Engineering  
It has been observed that 80% of development time and a lots of memory space is spend over handling the abnormal conditions and exceptions in any programming Environment. It also affects the cost factor of program development also. The support for precise exceptions in optimizing Java program states, combined with frequent checks for runtime exceptions, leads to severe limitations on the compiler's ability to perform program optimizations that involve reordering of instructions. This paper
more » ... nts a basic framework that allows the application programmers to recognise the constraints of application programs in instruction scheduling. We first present a formulated way for analysing the problem caused in coded program and its related Exception-handling constructs, and a methodology, to identify the subset of program state that needs to be preserved if an exception is thrown. This allows many spurious dependence constraints between potentially excepting instructions (PEIs) and writes into variables to be eliminated. Our planned methodology is particularly suitable for dynamically dispatched methods in object-oriented languages, where static analysis may be quite conservative. We then present the first software-only solution that allows dependence constraints among PEIs to be completely ignored while applying program optimizations, with no need to execute any additional instructions if an exception is not thrown. With a preliminary implementation, by this we observe that for many benchmark programs, a large percentage of methods can be optimized (while honouring the precise exception requirement) without any constraints imposed by frequent runtime exceptions. Finally, we show that relaxing these reordering constraints can lead to substantial improvements (up to a factor of 7 out of 10 for small codes) in the performance of programs
doi:10.9790/3021-0204609615 fatcat:ak6socxwpjcw7jp7ssrrthw35u