Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > by-pkgid > 2fc07611b08d4a735fd34d5eb60d8e16 > files > 2138

ciao-1.10p8-3mdv2010.0.i586.rpm

<HTML>
<HEAD>
<!-- Created by texi2html 1.56k + clip patches and <A href="http://www.clip.dia.fi.upm.es/Software">lpdoc</A> from ciao.texi on 28 January 2007 -->

<LINK rel="stylesheet" href="ciao.css" type="text/css">
<TITLE>The Ciao Prolog System               - Programming MYCIN rules</TITLE>
</HEAD>
<BODY> 
Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_187.html">previous</A>, <A HREF="ciao_189.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>.
<P><HR><P>


<H1><A NAME="SEC749" HREF="ciao_toc.html#TOC749">Programming MYCIN rules</A></H1>
<P>
<A NAME="IDX8196"></A>


<P>
<STRONG>Author(s):</STRONG> Angel Fernandez Pineda.


<P>
<STRONG>Version:</STRONG> 1.10#7 (2006/4/26, 19:22:13 CEST)


<P>
<STRONG>Version of last change:</STRONG> 1.5#59 (2000/2/29, 14:51:54 CET)


<P>
MYCIN databases are declared as Prolog modules containing mycin rules. Those rules are given a 
<A NAME="IDX8197"></A>
<A NAME="IDX8198"></A>
<EM>certainty factor</EM> (<EM>CF</EM>) which denotates an expert's credibility on that rule: 

<UL>

<LI>A value of -1 stands for <EM>surely not</EM>.

<LI>A value of 1 stands for <EM>certainly</EM>.

<LI>A value of 0 stands for <EM>I don't know</EM>.

</UL>

<P>
Intermediate values are allowed. 


<P>
Mycin rules work on a different way as Prolog clauses: a rule will never fail (in the Prolog sense), it will return a certainty value instead. As a consequence <STRONG>all</STRONG> mycin rules will be explored during inference, so the order in which rules are written is not significant. For this reason, the usage of the Prolog <EM>cut</EM> (!) is discouraged. 



<UL>
<LI><A HREF="ciao_188.html#SEC750">Usage and interface (mycin)</A>
<LI><A HREF="ciao_188.html#SEC751">Documentation on new declarations (mycin)</A>
<LI><A HREF="ciao_188.html#SEC752">Known bugs and planned improvements (mycin)</A>
</UL>



<H2><A NAME="SEC750" HREF="ciao_toc.html#TOC750">Usage and interface (<CODE>mycin</CODE>)</A></H2>

<div class="cartouche">

<UL>

<LI><STRONG>Library usage:</STRONG>

In order to declare a mycin database you must include the following declaration as the first one in your file: 

<PRE>
           :- mycin(MycinDataBaseName).
</PRE>

<LI><STRONG>New declarations defined:</STRONG>

<A NAME="IDX8199"></A>
<CODE>export/1</CODE>.

</UL>

</div class="cartouche">



<H2><A NAME="SEC751" HREF="ciao_toc.html#TOC751">Documentation on new declarations (<CODE>mycin</CODE>)</A></H2>
<P>
<A NAME="IDX8200"></A>
<A NAME="IDX8201"></A>
<DL>
<DT><span class="define">DECLARATION:</span> <B>export/1:</B>
<DD><A NAME="IDX8202"></A>


<P>
This directive allows a given mycin predicate to be called from Prolog programs. The way in which mycin rules are called departs from Prolog ones. For instance, the followin mycin predicate: 

<PRE>
:- export p/1.
</PRE>

<P>
must be called from Prolog Programs as: <CODE>mycin(p(X),CF)</CODE>, where CF will be binded to the resulting 
<A NAME="IDX8203"></A>
certainty factor. Obviously, the variables on <EM>P/1</EM> may be instantiated as you wish. Since the Prolog predicate <EM>mycin/2</EM> may be imported from several mycin databases, it is recommended to fully qualify those predicate goals. For example : <CODE>mydatabase:mycin(p(X),CF)</CODE>. 


<P>
<STRONG>Usage:</STRONG> :- <CODE>export(Spec)</CODE>.

<UL>
<LI><EM>Description:</EM> <CODE>Spec</CODE> will be a callable mycin predicate.

</UL>

</DL>



<H2><A NAME="SEC752" HREF="ciao_toc.html#TOC752">Known bugs and planned improvements (<CODE>mycin</CODE>)</A></H2>


<UL>

<LI>

Not fully implemented.

<LI>

Dynamic mycin predicates not implemented: open question.

<LI>

Importation of user-defined mycin predicates requires further design. This includes importation of mycin databases from another mycin database.
</UL>

<P><HR><P>
Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_187.html">previous</A>, <A HREF="ciao_189.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>.
</BODY>
</HTML>