10 Abductive and Deductive Reasoning
Definition 10.2. Transforming Inspection Points Let P be a program containing
11.3 Inspection Points
11.3.2 Alternative Implementation Method for Inspection Points
The method presented here is an avenue for implementing the inspection points mecha- nism through the simple syntactic program transformation of Definition 10.2 which can be readily used by any logic programming system that implements some Layer-Decomposable semantics. Our ultimate goal is to develop a Minimal Hypotheses semantics based abduc- tive reasoning system with inspection points, but since the time requirements for building such a system would surpass our time constraints for writing this thesis, we considered, for now, an SM based implementation. Since the Stable Models semantics is a particular case of a Layer-Decomposable semantics and there exist already several Stable Models systems, like SModels [166], DLV [59], or Clasp [108], we can use this method to imple- ment an abductive SM-based inspection mechanism. First, we need a way to implement abduction in an SM based system. One can model SM-based abducibles of some program
P by transforming it into a P0 where P0 is obtained from P by adding an even loop over negation for each abducible (like the one depicted in Section 10.1), by means of a newly introduced reserved atom for that purpose. Secondly, in order to obtain the inspection mechanism we just need to further transform P0 into a CNLP without inspection points. The program transformation we presented for the declarative semantics of the inspection points (Definition 10.2) achieves both goals. Finally, we just need an implementation of SMs, like SModels, DLV, Clasp, or any other. This way, under the SM semantics, a program may have models where some abducible is true and another where it is false, i.e. the corresponding reserved atom neg_abducible is true. If there are n abducibles in the program, there will be 2n models corresponding to all the possible combinations of
true and false for each. Under the WFS without a specific abduction mechanism, e.g.
the one available in ABDUAL, both abducible and neg_abducible remain undefined in the Well-Founded Model (WFM), but may hold (as alternatives) in some Partial Stable Models.
When finding an abductive solution to a set of observations, a 2-valued abduction step can be viewed as committing oneself to the just found possible abductive hypotheses — e.g., assuming abducibles astrue or as false. Using the SM semantics abduction is done by guessing the truth-value of each abducible and providing the whole model and testing it for stability; whereas using the MH semantics, which enjoys the several Relevance properties, added now with abduction, the latter can be performedby need, induced by the top-down query solving procedure, solely for the relevant abducibles — i.e., irrelevant abducibles are left unconsidered. Thus, top-down abductive query answering is a means of finding those abducible values one might commit to in order to satisfy a query. In particular, this is one of the main problems which abduction over stable models has been facing, in that it always has to consider all the abducibles in a program and then progressively dismiss all those that are irrelevant for the problem at hand. This is not so in our system framework, since we can usually begin evaluation by a top-down derivation of a query,
which immediately constrains the set of abducibles that are relevant to the satisfaction and proof of that particular query.
An important consideration when computing consequences of abductive solutions, is that we could end up having to compute the models of the whole program in order to obtain just a particular relevant subset that will be used to enact on it a posteriori preferences. This can be easily avoided by performing preliminary computation of the relevant sub-program, given the consequences that we expect to observe. This means that the consequences believed significant for model preference can be computed on the XSB side, and their additional relevant sub-program sent to Smodels as well. For a MH semantics based implementation of Inspection Points using XSB Prolog we would need, as said before, a get_layered_remainder/2 predicate to compute the Layered relevant sub-program. In this phase, we do not allow for additional abduction of literals, but merely enforce that rules for consequences are consumers of considered abducibles which have already been produced. In this way, we combine a declarative methodology to describe the abductive process, with an efficient and viable implementation of reasoning by complementing a 3-valued well-founded derivation with the computation of the stable models of the relevant sub-program, in a natural way to obtain all the possible 2-valued models from the well-founded one. Using XSB-XASP, the process would be the same as for using an SMs implementation alone, but instead of sending the whole transformed program to the SMs engine, only the sub-program relevant for the query at hand would be sent. This way, abductive reasoning can benefit from the relevance property enjoyed by the Well-Founded Semantics implemented by the XSB-Prolog’s SLG-WAM.
Given the top-down proof procedure for abduction, implementing inspection points for program P becomes just a matter of adapting the evaluation of derivation subtrees falling under ‘inspect/1’ literals, at meta-interpreter level, subsequent to performing the transformation Π(P ) presented before, which defines the declarative semantics. Basically, any considered abducibles evaluated under ‘inspect/1’ subtrees, say A, are codified as ‘abduced(A)’, where:
abduced(A) ← not abduced_not(A) abduced_not(A) ← not abduced(A)
All abduced/1 literals collected during computation of the relevant sub-program are later checked against the stable models themselves. Every ‘abduced(a)’ must pair with a cor- responding abducible a for the model to be accepted. Thus, we combine and complement the best of both worlds, the 2- and the 3-valued ones.
In the next and final Chapter we summarize the contributions in this thesis, make a brief overview of some applications the Minimal Hypotheses semantics can be useful for, and point to future work directions.