Automated Error-Detection and Repair for Compositional Software Specifications Dalal Alrajeh and Robert Craven Department of Computing, Imperial College London, UK {dalal.alrajeh,robert.craven}@imperial.ac.uk Abstract. The complexity of error diagnosis in requirements specifications, al- ready high, is increased when requirements refer to various system components, on whose interaction the system’s aims depend. Further, finding causes of error, and ways of overcoming them, cannot easily be achieved without a systematic methodology. This has led researchers to explore the combined use of verifi- cation and machine-learning to support automated software analysis and repair. However, existing approaches have been limited by using formalisms in which modularity and compositionality cannot be explicitly expressed. In this paper we overcome this limitation. We define a translation from a representative pro- cess algebra, Finite State Processes, into the action language C+. This enables forms of verification not supported by previous methods. We then use a logic- programming equivalent of C+, to which we apply inductive logic programming for learning repairs to system components while ensuring no new errors are intro- duced and interactions with other components are maintained. These two phases are iterated until a correct specification is reached, enabling rigorous and scalable support for automated analysis and repair of component-based specifications. 1 Introduction Research into formal specification, verification and error diagnosis has played a signif- icant role in improving software safety and reliability. Such methods rely on specifying the system in a formal language (e.g., temporal logic, process algebras) and using au- tomated verification techniques such as model checking and theorem proving to check that the specified system satisfies some given property. Though such methods are useful for detecting errors in software specifications (e.g., [14]), identifying the exact causes of error and resolving them is a very difficult task that is mostly performed manually— defeating the aim of automation, and increasing the likelihood of error. In recent years researchers in software engineering have responded to this by deploy- ing a combination of verification and machine learning techniques to improve software specifications. For example, in [1] the authors describe a method for incrementally re- fining a consistent specification, expressed in first-order temporal logic, with respect to some given property using an integration of model checking and Inductive Logic Programming (ILP). In [2], the authors give a method for revising temporal specifica- tions that may be incorrect or inconsistent using model checking and artificial neural networks. Such advances overcome some of the difficulties of generating alternative candidate repairs to detected errors, ensuring consistency of the computed solutions