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 145<br />

the conflict resolution scoring system (crss/3) when deciding which is the<br />

best rule to fire.<br />

Examples<br />

new_rule( prescribe_lomotil,<br />

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

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

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

prescribe(patient,lomotil),<br />

file(medical7),<br />

0 ) .<br />

new_rule( fill_B_from_A<br />

(<br />

comparison(,@(contents,jugA),0) ),<br />

( new_value( @(contents,jugA),<br />

@(contents,jugA) + @(contents,jugB)),<br />

new_value(@(contents,jugB),@(capacity,jugB))<br />

),<br />

text([jugB,was,not,full,and,jugA,was,not,empty]),<br />

@(contents,jugB)+@(capacity,jugB) ) .<br />

new_slot( +Attribute,+Frame,+Value )<br />

Create (or replace) a current Value for a particular Attribute of a Frame<br />

(or instance of a frame). The current Value overrides any default value, and<br />

is used whenever the Attribute of the Frame is accessed.<br />

Before the update is allowed any constraints (see new_constraint/8) on<br />

the Value are first checked. Following the update, any associated demons<br />

(see new_demon/7) are activated.<br />

Examples<br />

new_slot( habitat, moby_dick, [atlantic,arctic] ) .<br />

new_slot( predator, moby_dick, jonah ) .<br />

new_slot( food, moby_dick, fish ) .<br />

new_synonym( +Name,+Term )<br />

Add (or replace if the Name already exists) a new synonym for the Term.<br />

Whenever a KSL file is reconsulted, all occurrences of Name will be<br />

replaced by Term.<br />

Examples<br />

new_synonym( boiling_point, 100 ) .<br />

<strong>flex</strong> toolkit

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

Saved successfully!

Ooh no, something went wrong!