geb@cadre.ARPA (Gordon E. Banks) (08/21/85)
I am interested in prolog, but cursory examination of the relevant literature and a hour or two playing with the NSW version makes me wonder if it is worth investing a lot of time. In order to be useful to me, I must be able to do two things, which are not readily apparent how to do. This is likely because I am unfamiliar with non-procedural style. So if there are any prolog wizards, can prolog be made to: 1) Given a predicate whose premise is not known, and there are no predicates whose action yields the premise, is there a general way of making prolog ask the user for the data? Or does each askable premise have to have a predicate constructed for it to make the program ask? 2) Can prolog deal with certainty factors? I mean, if all you want to do is build another macsyma, this doesn't come up, but prolog promoters are talking about expert systems to do medical diagnosis, no less, and without ability to handle uncertainty, it would be pretty useless for this task. We don't deal in yes/no binary questions. If anyone can refer me to any articles dealing with this issue in prolog, I would be grateful. Thanks Gordon Banks geb@cadre.arpa or {akgua,ihnp4,vax135}!cadre!geb
fgm@icdoc.UUCP (Frank McCabe) (09/02/85)
Reference to can PROLOG do x? (where x is a universally quantified variable) There isn't anything that you can't do in PROLOG. In particular in micro-PROLOG there is a hook in the system which invokes a user fdefined PROLOG program whenever an error trap occurs. One of the available errors is "No definition for...". It is quite simple to modifiy the error handler program so that whenever such an error occurrs, the user is given the opportunity of a) answering the question, b) defining the program on the spot or c) something completely different. In fact this is the default mode on the expoert system package APES. Uncertainty is handled in two aspects: 1) extra parameters are added to your program to encode the probabilities and their computations (i.e. you reason exactly about uncertainties) and 2) all these extra parameters can be hidden from the programmer by the proper use of grammars and front ends which take the 'uncertain' rules and convert into regular PROLOG rules. This too has been done as an experiment at IC. Frank McCabe.