Title: Knowledge-based Management of Legacy Codes for Automated Design" Author: John Keane (Thesis) - HPCD-TR-49 Abstract Systems for automated design optimization of complex real-world objects can, in principle, be constructed by combining domain-independent numerical routines with existing domain-specific analysis and simulation programs. Such ``legacy'' analysis codes are frequently unsuitable for use in automated design. They may crash for large classes of input, be locally non-smooth, or be highly sensitive to control parameters. To be useful, analysis programs must first be modified to reduce or eliminate only the undesired behaviors, without altering the desired computation. To do this by direct modification of the programs is labor-intensive, and necessitates costly re-validation. This dissertation describes research into how legacy analysis codes can be usefully employed in design automation systems. We show that recovery from failure is possible when the failure occurs in the context of a search-based process such as optimization. We discuss the importance of failure context in determining the correct failure recovery action. We then describe an approach to failure recovery that is both context-sensitive and guarantees the integrity of the original computation to which it is applied. We have implemented a high-level language and run-time environment (together called LCM) that allow context-sensitive failure-handling strategies to be incorporated into existing Fortran and C analysis programs while preserving their computational integrity. Our approach relies on globally managing the execution of these programs at the level of discretely callable functions so that the computation is only affected when problems are detected. Problem handling procedures are constructed from a knowledge base of generic problem management strategies. We show that our approach is effective in improving analysis program robustness and design optimization performance in several real-world design domains.