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

yes<br />

?- inclusion( [a,b,c,d], [c,e,c] ).<br />

no<br />

?- inclusion( [a,b,c], X ).<br />

X = a<br />

X = b<br />

X = c<br />

inherit( +Attribute,+Frame,-Value )<br />

This procedure will search the frame hierarchy starting at the parents of<br />

Frame. The search will terminate when an ancestor of Frame can be found<br />

which has a current or default Value for the Attribute.<br />

inherit/3 is the inheritance part of the lookup/3 procedure.<br />

Examples<br />

?- inherit( habitat, moby_dick, V ).<br />

V = ocean<br />

?- inherit( predator, moby_dick, V ).<br />

no<br />

inherit( +Attribute,+Frame,-Value,-Ancestor )<br />

inheritance<br />

The inherit/4 procedure behaves as the inherit/3 procedure except<br />

that an additional piece of information, Ancestor, is returned. This<br />

indicates where exactly in the frame hierarchy the Value came from.<br />

Example<br />

?- inherit( habitat, moby_dick, V, A ).<br />

V = ocean, A = moby_dick<br />

Return to the default inheritance settings of<br />

Search = depth_first<br />

Root = root_last<br />

Plurality = singular<br />

Effort = 9<br />

(See inheritance/4 below for a description of these parameters).<br />

inheritance( ?Search,?Root,?Plurality,?Effort )<br />

The inheritance/4 procedure allows for the inspection and/or alteration<br />

of certain characteristics of the inheritance algorithm. These characteristics<br />

<strong>flex</strong> toolkit

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

Saved successfully!

Ooh no, something went wrong!