WHAT IFFING To illustrate these points, consider what is needed to implement Ša what-if facility, say in an Expert System like ELSIE. ELSIE asks a Šsequence of questions produces a result, and then allows the user to Šoverride assumptions made and change the input information on a what- Šif basis - two types of what-iffing. For instance, in the diagram Šbelow, input information about the type of building required, the type Šof client and type of market suggests a certain quality level which ŠELSIE assumes, along with other information not shown, in order to Šarrive at a cost estimate for the building. Client type ------> Building type ----> Quality ------> Cost Target market ----> The user might want to change building type and see the effect on Šcost. In this case, any change is propagated through quality to cost Š(and perhaps via other paths in the knowledge base not shown above). ŠAlso, the user might want to override the assumed quality level with Šone of his/her own. In this case any subsequent change in any of the Šthree input variables should have no effect (unless there are other Špaths not shown). It should also be possible for the user to ask the Šsystem to return to assumed values of quality and once again become Šsensitive to changes in client, building and market types. This would Šseem to be a very simple requirement, but how might it be implemented? Regarding the first type fo what-iffing, we have the following Šrequirements: a) To ascertain from user which variable to change b) To index that variable c) To allow the value in the chosen variable to change d) To pose the appropriate question to the user e) To receive the appropriate type of answer (numeric,text) f) To make the appropriate range checks on the answer g) To propagate the received answer h) In doing so, to allow the values of other variables to change i) To report the new result when ready j) That propagation shall be fast Regarding the second type of what-iffing, we have the above, and Šalso the following: k) To switch off propagation of antecedent values l) To be able to propagate from the middle of the KB m) To switch antecedent propagation back on when needed What we want of a KR system is to be able to set up all these Šfacilities easily - assuming that what-iffing is not built in to the ŠKR system, which some might argue should be done. Easily does not so Šmuch refer to usability of the software, nor expressiveness of the Šlanguage in which we describe what we want done, but rather Šappropriateness of the underlying KR Idea. Going through the above Šlist, we find: a) requires that the system first distinguishes all the Švariables subject to what-iffing from those that are not, which means Štreating each as an entity or item. Then each of these must be Šidentified to the user in some way - such as by a name in a list or an Šicon in a graphical representation. Then the system must be able to Šaccept input from the user - an ordinal number or a mouse click - and Šfrom this select one of the variables. Treating the variables in the Šknowledge base as items in this way requires second order logic Šbecause it involves knowledge base self-reference for the general Šcase, which is not available in most system. To get around the lack Šof second order logic, the programmer would have to implement what is Šessentially a massive if or case statement, in which specific Šreference is made to each what-iffable variable in turn - and this Šdestroys the generality of the mechanism. Thus KRIs based on first Šorder logic, such as logic programming and production rules are not Štruly appropriate for this. Some object oriented systems fare a Šlittle better, by virtue of polymorphism and the 'self' concept. b) requires some means of making reference to the variable other Šthan by its value. ====this is the 2ol bit (a) shd be about Špresenting them for selection, and then getting user input split a,b Šinto a,b,c.