Refactoring is a technique for restructuring code to improve its design. A tool for automatically applying refactoring transformations to Ada 95 programs is described. The tool is based on a language-neutral static-analysis toolset named CodeSurfer, and uses the ASIS interface to retrieve basic facts about a program. A higher-level object-oriented interface to the ASIS representation is described, which enables pattern-matching queries on the program's abstract semantic graph. The tool has been validated by using it to apply a set of transformations designed to bring a general-purpose code library into compliance with a safety-critical subset of Ada. Future plans for a set of tools based on these techniques are described.
/lp/association-for-computing-machinery/a-refactoring-tool-for-ada-95-qrJGKhg09C