24.11.2014 Views

flex Expert System Toolkit - LPIS

flex Expert System Toolkit - LPIS

flex Expert System Toolkit - LPIS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

9. Flex Predicates 137<br />

Q = ['Please',choose,a,dessert,for,your,meal]<br />

A = multiple(dessert)<br />

E = file(the_complete_irish_cook)<br />

isa_relation( ?Name, ?Arity )<br />

Retrieve or check the Name and Arity of a defined relation.<br />

Example<br />

?- isa_relation( N, A ).<br />

N = parent<br />

A = 2<br />

isa_rule( ?Name,-Conditions,-Action,-Explanation,-Score )<br />

Retrieve the characteristics of a rule from the workspace. (See the predicate<br />

new_rule/5 for a description of the arguments.)<br />

Example<br />

?- isa_rule( prescribe_lomotil, C, A, E, S ).<br />

C = ( prove(complains(patient,diarrhoea)),<br />

disprove(suffers(patient,liver_complaints)),<br />

disprove(pregnant(patient)) )<br />

A = prescribe(patient,lomotil)<br />

E = file(medical7)<br />

S = 0<br />

isa_slot( ?Attribute,?Frame,-Value )<br />

Test for the current value for the attribute of a frame.<br />

A call to isa_slot/3 will backtrack through all known current values and<br />

unify Attribute with the name of the attribute, Frame with its frame and<br />

bind Value to the current value of the attribute. Before the access is<br />

allowed any watchdog procedures (see watchdog/6) are first checked.<br />

The call fails if there are no current values defined.<br />

Example<br />

?- isa_slot( A, F, V ).<br />

A = habitat, F = moby_dick, V = [atlantic,arctic]<br />

A = predator, F = moby_dick, V = jonah<br />

A = food, F = moby_dick, V = fish<br />

?- isa_slot( food, moby_dick, V ).<br />

V = fish<br />

isa_synonym( ?Name,-Term )<br />

<strong>flex</strong> toolkit<br />

7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!