USING ABDUCTION TO EVOLVE INCONSISTENT REQUIREMENTS SPECIFICATIONS Bashar Nuseibeh Alessandra Russo Department of Computing, Imperial College of Science, Technology and Medicine 180, Queen's Gate, London SW7 2BZ, U.K. Email: (ban, ar31@doc.ic.ac.uk ABSTRACT Requirements specifications are often inconsistent. Inconsistencies may arise because multiple conflicting requirements are embodied in these specifications, or because the specifications themselves are in a transient stage of evolutionary development. In this paper we argue that such inconsistencies, rather than being undesirable, are actually useful drivers for changing the requirements specifications in which they arise. We present a formal technique to reason about inconsistency handling changes. Our technique is an adaptation of logical abduction - adapted to generate changes that address some specification inconsistencies, while leaving others. We represent our specifications in quasi-classical (QC) logic - an adaptation of classical logic that allows continued reasoning in the presence of inconsistency. The paper develops a sound algorithm for automating our abductive reasoning technique and presents illustrative examples drawn from a library system case study. INTRODUCTION A key problem in large software engineering projects is the management of frequently changing requirements. Requirements changes have a particularly significant impact on the consistency of specifications. Changes may introduce inconsistencies; and conversely, requirements changes may be necessary to handle existing inconsistencies. Therefore, the ability to handle inconsistent requirements is crucial to the successful development of requirements specifications. Researchers have developed a variety of techniques for analysing and managing the impact of changes on systems and their specifications (Bohner & Arnold 96). However, the starting point of much of this work is that a consistent artifact exists, which will be changed while preserving its consistency. The motivation is based on the intuitive assumption that inconsistencies are undesirable, given the difficulty of deriving useful information from inconsistent specifications. Consequently, the techniques developed are based on rigorous consistency checking and analysis, in an attempt to eradicate inconsistencies as soon as - or soon after - they are detected. However, in practice, inconsistency is inevitable in real large-scale specifications (Balzer 91; Cugola et al. 96; Schwanke & Kaiser 88). Living with inconsistency during evolutionary development is a fact of life. Therefore, inconsistency handling mechanisms are needed to support incremental evolution of specifications. By this we mean identifying changes that address some specification inconsistencies, while leaving others (Finkelstein et al. 94). In this paper, we provide a formal technique for handling inconsistencies that (a) allows such an incremental evolution of (inconsistent) requirement specifications and (b) can be implemented by exploiting existing tools for handling theory change (Kakas & Mancarella 90, Selmen & Levesque 90). Requirements specifications are, in our approach, partial specifications (possibly developed by different users) related to each other by means of pre-defined "consistency rules" (Nuseibeh et al. 94). Each partial specification may or may not include (logical) inconsistencies. The overall specification is, in our approach, defined to be "inconsistent" when at least one of the pre-defined rules is violated. This violation can be detected by checking if the specification satisfies the negation of the rule. Defining inconsistency in this way allows more flexibility to express a variety of constraints on specifications. It subsumes the notion of logical inconsistency, which is not always the most convenient way of representing the violation of constraints in real-life specifications. The inconsistency handling technique described in this paper is based on a specific type of formal reasoning, called abduction (Kakas et al. 98). If a particular consistency rule is violated, our proposed abductive reasoning technique identifies (evolutionary) changes to perform on the specification, such that a particular consistency rule is no longer violated. The partial specification, as well as the consistency rules, is assumed to be expressed in quasi-classical (QC) logic (Hunter & Nuseibeh 97; Hunter & Nuseibeh 98) - an adaptation of classical logic that allows reasoning in the presence of inconsistencies without trivialisation5. To provide a route towards implementing our technique, we have also developed an algorithm that translates specifications expressed in QC logic into logic programs. This enables us to deploy existing tools for abductive logic programming (Kakas & Mourlas 97). As shown in the paper, the results given by such tools can be translated back into the QC representation of the specifications, thus providing an automated way of generating changes to resolve inconsistencies. To summarise, this paper uses abduction to support incremental evolution of inconsistent requirements specifications. The novelty of the work is in adapting existing results on abduction for consistent specifications and applying them in the more realistic setting of inconsistent specifications (section 3). The notions of 5 Trivialisation is the inference of arbitrary information from an inconsistent specification. 118 inconsistency and abduction are formally described in section 2. The abductive technique developed (section 3) is tailored to make use of existing automated tools, and the paper provides a sound translation mechanism to logic programs in order to achieve this (section 4). A complete illustrative example (section 5) and a discussion of related work and open research issues (sections 6 and 7, respectively) conclude the paper. INCONSISTENCY AND ABDUCTION In this section, we provide an overview of our notions of inconsistency and abduction, which we use in the remainder of this paper as the basis of our approach. Inconsistency We base our notion of inconsistency on the violation of consistency rules. We treat such consistency rules as "properties" that should be satisfied by a given requirement specification. Within this context, specifications are considered to be inconsistent if they satisfy the negation of some of these rules (e.g., because of over- specification). More formally: Inconsistency. Given a specification S and a set SR = {R], R2, ... Rn} of consistency rules, S is inconsistent if there exists at least one rule Rj, for some 1 < i < n, such that S " -iRj, where " denotes any underlying formal reasoning mechanism. For any violated consistency rule Rj, we say that the specification S is ^-inconsistent. Inconsistency handling is the process of making changes that result in particular consistency rules no longer being violated; that is, S' z -iRi, where S' is the new (evolved) specification. Since the changes do not guarantee the new specification to be consistent (i.e. some other consistency rules might still continue to be violated), in this paper we represent our specifications in QC logic, which allows continued non-trivial reasoning in the presence of inconsistency. Abduction Abduction is one of the three fundamental modes of reasoning, the others being deduction and induction. The most popular formalisation of abduction in AI defines it as the search for a set of hypotheses (an "explanation") that, combined with a given theory, achieves some given goals (an "observation") without causing contradictions (Kakas et al. 98). This type of inference procedure has been shown to be suitable for addressing different kinds of problems in AI, such as diagnosis (Console et al. 96), planning (Esghsi 98), and database updates (Console et al. 94; Kakas & Mancarella 90; Inoue & Sakama 95). Recent work has also shown its application in knowledge-based software engineering (Menzies 96). Using abduction for theory change (e.g., database updates), the observation is a request for a particular change (update), and abduction is the process of identifying the changes to be made to a given theory so that the new theory satisfies the request (Kakas & Mancarella 90; Inoue & Sakama 95). A request can be, for example, a requirement for information to be a consequence of a given theory, or for it to be no longer inferred from a given theory. In the first case, abduction provides an explanation of the given information, whereas in the second case, it provides an anti-explanation (Inoue & Sakama 95). Formally: Abduction. Let L be a given logical language and let S be a theory written in L. An abductive framework is a pair (S, Ab) where Ab is a set of abducibles, also written in L. Let R be a request6. A pair (A+, A"), where both A* and A~ consist of ground instances of elements from Ab, is an explanation of R in the abductive framework 2, where -JMoCalllssue together with the following scenario: (VI) Accident (VII) Call (VIII) -iHasCrew (IX) NearestAmbulanceAvailable It is easy to see that the scenario and specification, when combined, are inconsistent, because we can generate the two contradictory pieces of information: DispatchAmbulance (using (I), (II), (VI), (VII) and (IX)) -iDispatchAmbulance (using (III), (IV), (VII) and (VIII)) However, using QC logic, we can still continue reasoning with the above specification and generate additional non-trivial information such as: -JMoCalllssue (using (IV), (V) and (VIII)) So, even though the specification and scenario are inconsistent, we can still generate other useful inferences. In classical logic, it is always the case that either a piece of information or its negation is true. This link between a piece of information and its negation is decoupled in QC logic. Any formula and its negation could equally be evaluated to be true within a QC model. This is due to the fact that satisfiability of clauses in a QC model is defined in terms of two separate notions of satisfiability, called strong satisfiability and weak satisfiability, depending on whether the clause is part of a given specification or is derivable from the specification, respectively. Weak satisfiability reflects the notion of truth of classical disjunction (i.e. a, v a2 is weakly satisfied if either cti is true or a2 is true). Strong satisfiability complements this definition with extra conditions. A clause CC] v a} is true then oc2 must be true, and (c) if -i -iNearestAmbulanceAvailable) HoldsS(-iNearestAmbulanceAvailable —»-rNoCalllssue) Every QC formula a that is inferred from a given QC specification S is translated into the ground atomic formula HoldsW(a). Since the inference of a negated consistency rule, -.R, in QC logic is equivalent to the inference of a (conjunction of) literal(s), the first-order translation of a negated rule is also equivalent to the inference of the (conjunction of) atomic formula(e) of the form HoldsW(oc), where c^ is the converse of a literal a appearing in - T(S),/Urge >OL Holds W(a) A proof of this theorem is outlined in the Appendix, and described in detail in (Russo & Nuseibeh 98). We have also developed a theorem prover for QC logic to facilitate reasoning over QC specifications. This is written in Prolog and takes advantage of the classical translation of QC specifications into first-order logic, using the correspondence theorem above. Generating a logic program. The basic idea of this procedure is to construct from the first-order translation of a given QC specification a logic program that includes (a) the translated specification (as facts) and (b) rules, which allow the simulation of QC inferences from the specifications. The logic program resolution mechanism thus captures the resolution mechanism of QC logic. The resulting logic program also includes some integrity constraints to preserve its own consistency. Suppose that the first-order translation of a given QC specification is the following set: SFOL= {HoldsS(a,), HoldsS(a2), ..., HoldsS(an)( 124 where cq are either literals or clauses appearing in the QC specification. Suppose also that the largest clause in the QC specification has m literals (i.e. size m), with m > 2. The generation of a logic program from SFOL is an m-step process. Each step constructs a partial logic program that extends the one generated in the immediately previous step. The construction of such a partial program is as follows: Step 1 A partial program, called PI, is constructed by considering just the set (HoldsS(ai), HoldsS(cc2),..., HoldsS(an)}. Step 2 A partial program P2 is constructed by considering each HoldsS(a) in P|, where a is a QC clause with size m, and adding to Pj a rule of the form HoldsS(P)<-HoldsS(-iOCj),HoldsS( BorrowingBook, BookCopy, BooklnLibrary, BookNeeded } with RQC = BorrowingBook —> -.BookAvailable as a consistency rule. This specification is inconsistent. The negation of the rule RQC. given by —.Rgc = BorrowingBook A BookAvailable, can be inferred from the specification, SQC. Resolving this inconsistency means eliminating one of the above two literals from the set of consequences of the specification. To eliminate the literal BookAvailable, abduction for QC logic identifies two possible sets of changes: {delete BookCopy} and (delete BooklnLibrary). Either of these two changes, if performed on the specification, would resolve the inconsistency. Next, we show how this abductive technique is performed by our implementation. First the QC specification, SQC, is translated into a first-order specification, SFOL: SFOL = ( HoldsS((BookCopy A BooklnLibrary) -» BookAvailable), HoldsS((BookCopy A BookNeeded A BookAvailable) -» BorrowingBook), HoldsS(BookCopy), HoldsS(BooklnLibrary), HoldsS(BookNeeded) ) The translation of the negated rule (i.e. T(->RQC)) is HoldsS(BorrowingBook) A HoldsS(BookAvailable). Applying the algorithm for generating a logic program from SfOL we get: PS = { HoldsS((BookCopy A BooklnLibrary) -»BookAvailable). _ HoldsS((BookCopy A BookNeeded A BookAvailable) —> BorrowingBook). HoldsS(BookCopy). HoldsS(BooklnLibrary). HoldsS(BookNeeded). _ HoldsS((BookNeeded A BookAvailable) —» BorrowingBook) <— HoldsS(BookCopy), HoldsS((BookCopy A BookNeeded A BookAvailable) -» BorrowingBook). HoldsS((BookCopy A BookAvailable) —> BorrowingBook) <— HoldsS(BookNeeded), HoldsS((BookCopy A BookNeeded A BookAvailable) -» BorrowingBook). HoldsS(BookInLibrary —» BookAvailable) <— — HoldsS(BookCopy), HoldsS((BookCopy A BooklnLibrary) -» BookAvailable). HoldsS(BookCopy -» BookAvailable) <- HoldsS(BooklnLibrary), HoldsS((BookCopy A BooklnLibrary) -> BookAvailable). HoldsS(BookAvailable —» BorrowingBook) <— HoldsS(BookNeeded), HoldsS((BookNeeded A BookAvailable) —> BorrowingBook). 126 HoldsS(BookAvailabIe -»BorrowingBook) <- HoldsS(BookCopy), HoldsS((BookCopy A BookAvailable) —> BorrowingBook). HoldsS(BookAvailable) <- HoIdsS(BooklnLibrary), HoldsS(BookInLibrary -»BookAvailable). HoldsS(BookAvailable) <- HoIdsS(BookCopy), HoldsS(BookCopy -> BookAvailable). Since HoldsS(BookAvailable) is derivable from the above program Ps, our abductive goal is to delete it. The abductive procedure considers the negated query HoldsS*(BookAvailable), and reasons backwards performing the associated consistency checking. The procedure generates two alternative sets of (smallest) anti- explanations: A, = { HoldsS*(BookAvailable), HoldsS*(BookCopy) } and A2= { HoldsS*(BookAvailable), HoldsS*(BookInLibrary) } These two sets generate, respectively, two alternative sets of changes: {delete HoldsS(BookCopy)} and {delete HoldsS(BooklnLibrary)} Performing the change in either of these two sets on the above program, would make HoldsS(BookAvailable) no longer provable from Ps. These two sets, mapped back into QC logic, give the two sets of changes {delete BookCopy} and {delete BooklnLibrary}, which were also identified by the abductive technique for QC logic. RELATED WORK A number of logic-based approaches for handling inconsistency have been proposed in the literature (e.g., (Ghose 99). None, however, appear to tolerate inconsistencies explicitly. Zowghi and Offen suggest belief revision for default theories as a formal approach for resolving inconsistencies arising during the evolution of requirements specifications (Zowghi & Offen 97). Change actions are implicitly given by the definition of a belief revision operator, which basically changes the status of information from defeasible to non-defeasible or vice-versa, to remove the derivation of inconsistencies. Similarly, Ryan defines ordering relations on default information (Ryan 93). Conflicting defaults are resolved not by changing the specification but by considering only scenarios or models of the inconsistent specification, which satisfy as much of the preferable information as possible (in order of preference). Anderson and Durney on the other hand, propose "relative utility" analysis for guiding the choice among possible alternative changes in order to resolve a detected inconsistency (Anderson & Durney 93). Changes that "enable" scenarios showing "desirable transitions" are preferred to changes that do not, and changes that "disable" scenarios showing "prohibited transitions" are also preferred to those that do not. Such heuristics can also be interpreted as preferring changes that do not cause additional inconsistencies to those that do. A closely related logic-based approach is proposed by van Lamsweerde et al. (van Lamsweerde and Letier 98; van Lamsweerde et al. 98). In their work they offer a goal-driven approach to requirement engineering in which "obstacles" denote parts of a specification that lead to a negated goal, van Lamsweerde's notion of goals is comparable to our notion of consistency rules, and his notion of obstacles corresponds to the abduced facts detected by our abductive technique. Both approaches guarantee that changes performed on abduced information or obstacles would resolve a detected inconsistency. The main difference, which is partly due to the differing logical representations used, is that whereas van Lamsweerde et al. adopt goal regression to identify possible obstacles, we use abduction. Since we also use QC logic as the underlying formal reasoning, it is not necessary to resolve all inconsistency in order to continue to do meaningful reasoning. Duffy et al. also propose a logic-based approach for reasoning about requirements specifications based on the construction of goal tree structures14 (Duffy et al. 95). However, their approach is less systematic, in that analysis of alternative changes is carried out by investigating which goals would be satisfied and which would not, after adding or removing facts to a specification. Recent work by Menzies has also demonstrated the applicability of abductive reasoning in knowledge-based software engineering, using an inference procedure for "knowledge-level modeling" that can support prediction, explanation, planning, etc. (Menzies 96). However, the 14 This approach is similar to logic-based model checking. However, model checkers (such as SPIN [Holzmann 97]) differ from our tools in that they assume (and require) a (logically) consistent specification as input before they can analyse it. 127 technique is tailored for specifications represented as and-or graphs, where vertices are atomic facts and edges are causal relationships between facts. CONCLUSIONS AND FUTURE WORK The abductive technique outlined in this paper is another tool in our growing toolbox for handling inconsistency in requirements specifications. While this work provides a novel contribution to problems of managing evolving specifications, a number of critical research issues still need to be explored. To make the work more accessible, we need to extend our approach to allow (a) arbitrary QC formulae to represent requirements specifications and (b) first-order reasoning. This could be achieved by introducing automatic rewrites of any QC specification into disjunctive normal form, which would express universal and existential quantifiers, on a finite domain, in terms of conjunction and disjunction of ground formulae. This extension would facilitate an easier and more direct representation of requirements specification into QC logic. The abductive technique described can also be extended in a variety of ways. Most pressing is the need to abduce not only literals, but also more complex formulae - changes to a specification are typically more than just atomic changes. Of course, choosing the right changes to perform, even given a simple choice of atomic changes, is a difficult task. The impact of each action must be evaluated, and actions with the most 'desirable' consequences chosen. We have started to explore ways of comparing the consequences of performing different actions on (inconsistent) specifications (Nuseibeh & Russo 98). However, like abducing the inconsistency handling changes described in this paper, the crucial issues of complexity and scale must also be addressed15. We are attempting to address these issues in three ways. First, using the translation technique of QC specifications into first-order logic, we are investigating the possibility of using existing theorem provers for classical logic in order to allow automated reasoning on large inconsistent specifications. Second, and building on the work of Menzies (Menzies et al. 98), we are conducting controlled experiments to investigate the limits to (abductive) reasoning about inconsistent specifications (Menzies et al. 99). These limits include attributes such as the size of the specifications and their structure. Third, we are continuing case study work (Russo et al. 98) to determine how to (re)structure requirements specifications using "ViewPoints" (Nuseibeh et al. 94) in ways that make them more amenable to the kind of reasoning we have described. The case studies are also providing valuable domain-specific knowledge and heuristics that are essential for pruning the abductive reasoning search space and focusing development actions. Nevertheless, and despite the difficult issues of scalability above, we believe that using abductive reasoning as outlined in this paper provides useful guidance to the management of inconsistency in evolving specifications. The paper has laid the foundations for our approach and demonstrated it on a small, but illustrative, example. Further work is still needed to explore the application contexts in which the approach is most suited, and we are currently conducting case studies with our industrial collaborators to validate the approach. ACKNOWLEDGEMENTS We would like to thank Steve Easterbrook, Tony Kakas, Jeff Kramer, Tim Menzies and Axel van Lamsweerde for their comments on earlier drafts of this paper, and Mark Tan for his work on the tool support. We would also like to acknowledge the financial support of the UK EPSRC for the projects MISE (GR/L 55964) and VOICI (GR/M 38582). REFERENCES Anderson J.S. and Durney B., "Using Scenario in Deficiency-driven Requirements Engineering", IEEE Proceedings of International Symposium on Requirements Engineering (RE '93), 134-141, San Diego, January 1993. Balzer R., 'Tolerating Inconsistency", IEEE Proceedings of 13th International Conference on Software Engineering (ICSE-13), Austin, Texas, 1991. Bohner S.A. and Arnold R.S., Software Change Impact Analysis, IEEE CS Press, 1996. Console L., Sapino M.L. and Theseider Dupre D., 'The role of abduction in database view updates", Journal of Intelligent Systems, 1994. Console L., Portinale L. and Theseider Dupre D., "Using Compiled Knowledge to Guide and Focus Abductive Diagnosis", IEEE Transaction on Knowledge and Data Engineering, 8(5): 690-706, 1996. Cugola G., Di Nitto E., Fuggetta A. and Ghezzi C, "A framework for formalising inconsistencies and deviations in human-centred systems", ACM Transaction on Software Engineering and Methodology, 5(3): 191- 15 It is well known that abductive reasoning is NP-hard [Selman & Levesque 90]. However, by exploiting modularity of specifications and limiting the use of abduction to particular specification structures and domains, we believe that we can still perform some useful reasoning about inconsistent specifications. 128 230, 1996. Duffy D., MacNish C, McDermid J. and Morris P., "A Framework for Requirements Analysis Using Automated Reasoning", Proceedings of 7th International Conference on CaiSE'95, LNCS 932, Springer- Verlag, 68-81,1995. Esghsi K., "A Tractable Class of Abductive Problems", Proceedings of 5th International Conference on Logic Programming, 1998. Esghsi K., "Abductive Planning with the Event Calculus", Proceedings of the International Joint Conference on Artificial Intelligence (UCAI '95), 1:3-8, 1998. Finkelstein A. and Dowell J., "A comedy of Errors: the London Ambulance Service case study", IEEE Proceedings of 8th International Workshop on Software Specification and Design (IWSSD-8), 2-4, Schloss Velen, Germany, 22-23rd March 1996. Finkelstein A., Gabbay D., Hunter A., Kramer J. and Nuseibeh B., "Inconsistency Handling in Multi- Perspective Specifications", IEEE Transaction on Software Engineering, 20(8): 569-578, 1994. Ghose A. K., "Managing requirements evolution: Formal support for functional and non-functional requirements", Proceedings of the 1999 International Workshop on Principles of Software Evolution, Fukuoka, Japan, 118-124, 1999. Holzmann J., "The Model Checker SPIN", IEEE Transaction on Software Engineering, 23(5): 279-295, 1997. Hunter A. and Nuseibeh B., "Managing Inconsistent Specifications: Reasoning, Analysis and Action", ACM Transaction on Software Engineering and Methodology, October 1998. Inoue K. and Sakam C., "Abductive Framework for Non-monotonic Theory Change". Proceedings of the International Joint Conference on Artificial Intelligence (UCAI '95), 1:204-210, 1995. Kakas A.C., Kowalski R.A. and Toni F., 'The Role of Abduction in Logic Programming", Handbook of Logic in Artificial Intelligence and Logic Programming, 5:235-324, D.M. Gabbay, C.J. Hogger and J.A. Robinson eds., Oxford University Press, 1998. Kakas A.C. and Mancarella P., "Database Updates Through Abduction", Proceedings of 16th International Conference on Very Large Database (VLDB '90), Brisbane, Australia, 1990. Kakas A.C. and Mourlas C., "ACLP: Flexible Solutions to Complex Problems", Proceedings of the International Conference on Logic Programming and Non-Monotonic Reasoning, 1997. Kowalski R.A., Logic for problem solving, Elsevier, New York, 1979. Menzies T., "Applications of Abduction: Knowledge Level Modeling.", International Journal of Human Computer Studies, 1996. Menzies T., Ghose A. and Waugh S., "Abduction: Experiments and Implications", Knowledge Acquisition, 1998. Menzies T., Easterbrook S., Nuseibeh B. and Waugh T., "An empirical investigation of reasoning with multiple viewpoints', IEEE Proceedings of 4h International Symposium on Requirements Engineering (RE '99), Limerick, Ireland, June 1999. Nuseibeh B., Kramer J. and Finkelstein A., "A Framework for Expressing the Relationships Between Multiple Views in Requirements Specification", IEEE Transaction on Software Engineering, 20(10): 760-773, 1994. Nuseibeh B. and Russo , "On the consequences of acting in the presence of inconsistency", IEEE Proceedings of 6th International Workshop on Software Specification & Design (IWSSD-9), Japan, 1998. Russo A., Nuseibeh B. and Kramer J., "Restructuring requirements Specifications for Managing Inconsistency and Change: A Case Study", IEEE Proceedings of 3rd International Conference on Requirements Engineering (ICRE '98), Colorado Springs, USA, April 1998. Russo A. and Nuseibeh B., "An abductive technique for QC logic", Technical Report, Department of Computing, Imperial College, 1998. Ryan M., "Default in Specification", IEEE Proceedings of International Symposium on Requirements Engineering (RE'93), 266-272, San Diego, California, January 1993. Selman B. and Levesque H.J., Abductive and Default Reasoning: a computational core, AAAI '90, 343-348, 1990. Schwanke R.W. and Kaiser G.E.., "Living with Inconsistency in Large Systems", Proceedings of the International Workshop on Software Version and Configuration Control, Grassau, Germany, 1988. van Lamsweerde A. and Letier E., "Integrating Obstacles in Goal-Driven Requirements Engineering", IEEE Proceedings of 20th International Conference of Software Engineering (ICSE-20), 53-62, 1998. van Lamsweerde A., Darimont R. and Letier E., "Managing Conflicts in Goal-Driven Requirements Engineering", IEEE Transaction on Software Engineering, Nov. 1998. Zowghi D. and Offen R., "A Logical Framework for Modelling and Reasoning about the Evolution of Requirements", IEEE Proceedings of 3rd International Symposium on Requirements Engineering (RE '97), Annapolis, January 1997. 129 Appendix This appendix outlines proofs of Theorems 1 and 2 of the paper, together with some basic definitions. For a full account of the proofs, the reader is referred to (Russo & Nuseibeh 98). Definition 1. (Focus): Let at v... vet,, be a QC clause and let otj for some 1 < i < n be one of the literals in this clause. FocusCctiV..^^, HoldsW(oc). (Ax2) HoldsS(a,v...van) <-> [ ( HoldsS(a,)v...v HoldsS(an)) A ( HoldsS(-iai) —> HoldsS(Focus(aiv...van, aO)) A...A ( HoldsS(-,aJ -» HoldsS(Focus(a, v...v a,,, a,,))) ] (Ax3) HoldsW(a,v...van) <-> (HoldsW(a,)v...v HoldsWtocJ) Definition 3. (Translation of a violated rule): Let S be a QC specification. Let R be a QC violated rule. T(-iR) is a ground atomic first-order formula given by HoldsW(oc) if R is the single literal a, or HoldsW(aci) for some 1 < i < n, if R is the clause (XiV...v a,,. Note that, because of (Axl) in the above definition, HoldsW(ac) and HoldsW(0(Cj) can equally be replaced by HoldsS(Oc) and HoldsS(ocj). Proof of Theorem 1. The two derivability relations s QCand >ot.are sound and complete with respect to their semantic entailment relations. Therefore we prove the following equivalent statement, SI=Qca <=> T(S), AXQC \=fOL HoldsW(a). If half. Proof by contradiction. Assume that T(S)^\A:Gc I=FOL HoldsW(a) and that SXQC oc. There exists a QC model X such that for all formulae P€ S, Xl=s P and Xxs a. (Note that the symbol l=s denotes QC strong satisfiability.) The proof consists of constructing, from X, a classical interpretation I, such that I satisfies AxQC, HoldsS(p) for each HoldsS(P) 6T(S), and -.HoldsW(a). Therefore, I does not satisfy HoldsW(a), so contradicting the initial hypothesis. I is defined as follows. IIHoldsSlh = (P I Xl=s P), and IIHoldsWII, = (P I Xl=w 3). Only-if half. Proof by contradiction. Assume that S!=QC a and that i(S)AxQC XFQL HoldsW(a). Therefore, there exists a classical model I of AxQC, which satisfies HoldsS(P), for each HoldsS(P)et(S), and which does not satisfy HoldsW(a). The proof consists of showing that there exists a QC model X such that Xl=s p, for each PG S, and Xxw a, so contradicting the initial hypothesis. (Note that the symbol l=w denotes QC weak satisfiability.) X is constructed from the classical interpretation I, as follows. For each atomic ground predicate Oj, of the QC language, X={+oi, I ctj e IIHoldsSII,M-