Professional Documents
Culture Documents
CLIPS-
. . 03/2010
, , 2011.
1. ..................................................................................................................................4
2. ............................................................................................6
2.1. ...............................................................................................6
2.2. ..........................................................................7
2.3. ................................................................................8
2.4. ..............................................................9
2.5. ..................................10
2.6. ..........................................................12
2.7. .........................................................13
2.8. .....................................15
2.9. ..................................................................................17
3. .........................................................21
3.1. ..........................................................................................24
4. CLIPS (C Language Integrated Production System)....................27
4.1. CLIPS-.....................................................................................27
5. ...........................................................................................................................31
6. ........................................................................................................................36
7. .....................................................................................................................37
1.
.
.
()
. :
,
(, , , ,
, ),
.
.
: , , ,
.
,
.
.
(Artificial Intelligence).
()
- .
.
. ,
- ,
. -
. "rule-based systems", .
" " (if - then)
.
.
.
.
.
.
.
, ,
: (DSS - decision
support system) (ES - expert system).
(DSS - decision support system)
,
, .
4
2.
1.
: , ,
.
.
, ,
.
.
(
) : ,
, .
2.1.
a
, ,
,
.
, ,
.
" " ,
.
-.
,
: , .
,
.
1.
1
,
, . , , , 2009
. ,
.
.
, ,
. .
,
. , , .
.
, ,
, .
, .
(,
.).
/ .
(, ,
, .).
, "" (shells).
.
2.2.
:
,
,
.
:
(knowledge base)
(inference engine)
.
:
,
.
.
.
.
,
.
2.
.
.
.
.
2.3.
. "" (
).
,
.
.
, .
.
.
,
.
:
-
, .
.
- ,
, ,
.
.
3.
,
.
,
.
,
,
.
, ,
. ,
.
, ( )
.
.
.
. ,
, .
,
.
2.4.
.
:
.
,
.
9
.
,
, .
, ,
, .
.
1.
,
,
( )
-
,
,
. , ,
, .
, ,
.
, ,
. ,
, ""
.
,
.
, ()
, .
.
.
( ).
2.5.
,
:
?
,
10
, : , , ,
, , .
,
. .
, .
, ,
.
.
.
, .
.
, .
, .
.
.
,
.
. .
:
0.00 - 0.25 - 0.50 -
0.75 - 1.00 -
.
.
. , .
.
.
.
.
,
.
.
, .
.
11
2.6.
:
?
.
,
, .
,
, .
, .
, .
.
,
. , , ,
.
. ,
.
.
.
.
,
.
,
.
.
,
. ,
, .
.
:
, , ,
.
. ,
. ,
.
( ).
.
.
.
. ,
, ,
.
12
. , ,
,
, ,
.
, .
,
.
.
:
.
,
, .
(/)
.
,
, , .
- ,
.
,
.
,
.
,
.
,
.
2.7.
() :
?
?
.
. ,
.
.
. ,
""
.
.
. ,
13
,
, ,
, .
.
( ),
,
. ,
,
.
. ,
.
.
, ,
. ,
, ,
.
,
.
,
.
.
, . ,
, .
.
, . ,
.
, . ,
,
. ,
.
,
.
.
, , .
, .
, ,
., ,
, 30
.
.
, .
""
.
,
. ,
.
14
. . ,
, "" . , ,
,
, .
. ,
.
y .
72% . ,
.
" ",
500 500
. ,
,
""
.
2.8.
, , ,
. ,
. ,
.
, . ?
, .
, :
,
,
,
,
.
:
,
,
,
,
,
,
,
.
:
,
,
,
,
.
15
,
,
. , ,
,
.
- ().
. ,
, ( )
.
2. -
?
/
()
,
. ,
. (
) , ,
. ,
(
). , , "".
, .
,
, ,
.
, , .
,
.
,
, ;
- , :
- , ,
.
, ,
.
16
2.9.
() :
,
,
,
,
,
.
:
,
,
.
, ,
:
,
( ),
( ),
,
.
:
,
,
,
,
,
.
, ,
, .
, .
:
,
,
,
,
,
- .
, .
.
:
,
,
,
, ,
,
,
17
, ,
.
.
.
.
""
, .
, ,
.
, ,
, ,
, , ,
.
.
, "" ,
,
.
.
,
,
,
: .
, ,
.
:
, ,
,
.
:
- ,
,
,
.
, ,
.
,
, ,
, .
, ,
,
.
.
,
, : -
(--).
. ,
,
18
. ,
.
.
.
. . ,
,
.
,
, .
, ,
.
,
,
.
,
.
.
,
, .
, ,
, :
, ,
;
;
. ,
;
, ,
,
;
;
;
;
.
.
:
,
,
.
19
:
(1)
;
(2) .
- .
80%
.
:
,
,
,
.
.
, .
,
. , .
, :
/
.
. , ,
, ,
.
:
,
,
,
.
20
3.
()
. (
) 60- .
. 70-
.
.
:
XCON, XSEL CATS-1 : EMYCIN, EXPERT, METADENDRAL EURISKO.
.
3. (Roth, 1992)
X
()
EMYCIN
( )
LOOKS
ART
150 ,
3000 .
.
,
.
.
MYCIN
DART
INTERNIST
XCON
SYN
SYNCHEM
ISIS
MOLGEN
DENDRAL
PROSPECTOR
TEC
W
RADEX
PROCON
,
.
.
Godwin Wright :
1.
;
2.
(shell) (
XiPlus, EXSYS Professional, BEST Blackboard-based
Expert System Toolkit).
(, , 1995):
21
1.
2.
3.
4.
;
;
;
.
Turban Aronson (1998) :
1.
.
.
2.
( ),
( ) .
, ,
. .
: , ,
, ,
, ,
, , ,
, .
: , ,
, .
:
1. ,
2. ,
3. ,
4. ,
5. ,
6. ,
7. .
: , ,
, , , .
: 1. ,
2. ,
3. ,
4. ,
5. ,
6. ,
7. ,
8. .
: , , ,
, .
3. ()
. .
: ,
, , ,
, .
:
1. ,
2. ,
3. ,
22
4. ,
5. WHEN CHANGED I WHEN NEEDED ,
6. ,
7. .
4. .
: ,
, .
,
.
5.
.
. :
, .
6. .
.
7.
.
.
:
,
,
,
ES
,
ES ,
,
,
,
ES.
ES :
,
,
,
,
.
ES DSS :
,
,
,
.
ES DSS
, .
ES :
,
,
,
ES
.
23
3.1.
. Javi C C++ .NET .
. RBS Rule
Based Systems BRMS Business Rule Management
System .
4.
(http://www.kbsc.com/rulebase.html)
/
Aion
Commercial
Mostly mainframe Computer Associates
Clever Path
BRMS
Acquire Software
Commercial
RBS
Attar
Commercial
XpertRule Builder
and Data Mining
RBS
CLIPS
Free
C Language
Interface Production System
Corticon
Commercial
Java RBS
using mostly Excel-like tables for
rules non-Rete
Drools
Free
Java RBS
dynamic rules object-oriented
system mostly rules in XML
Euler
Free
Java Rule System
Backward Chaining Kind of weird
but very academic
EXSYS Expert
Commercial
System Software &
Services
Fair-Isaac Blaze
Commercial
.NET and Java
High-end
Advisor
BRMS
Gensym
Commercial
Corporation Home
Page
The Haley
Commercial
C/C++ and Java
High-end (Paul Haley)
Enterprise CIA
ILOG Rules and
Commercial
C/C++, .NET and
High-end
Jrules
Java BRMS
InfoSapient
Free
Java RBS
Open Source
Jess: (Sandia Labs) Commercial/Fre Java Clips-sub-set (Author, Dr. Ernest Friedmane for Non
RBS
Hill)
Commercial
Use
Jena2
Free
Java RBS
Semantic Web Framework, from
HP Labs
Jlog
Free,
ProLog in Java
Open Source
System
JEOPS
Free:
Java RBS
(Author: Dr. Carlos Figueira
Filho)
JEOPS on
Free:
Java RBS
(Author: Carlos Figueira Filho)
SourceForge
Jlisa
Free,
CLIPS-Like, Java Open Source
RBS
JTP Java Theorem
Free,
Java RBS
Open Source
24
Prover
Mandarex
MindBox:
(Formerly Inference
Corporation)
OFBiz
Free
Commercial,
Java RBS
Non-Java BRMS
Java RBS
Open Source
PegaRules
Open for
Business, Free,
Free and
Commercial
Versions
Commercial
Pellet
Free,
PST - Production
System
Technologies
OPSJ
Commercial,
Free for noncommercial use:
OpenRules
CLIPS/R2
OPS/R2
Resolution
Commercial
ROWL
Free
RuleCore
Commercial
Commercial,
Free for
Government and
Academic Use,
Small fee for
non-commercial
use
Free
Hierarchial Task
Network
Free,
Semantic Web
Rules
Free,
Java RBS
Commercial
SHOP
Sweet Rules
University of Maryland
MIT
TyRuBa
Open Source
Teknowledge
Corporation
CLIPS - C Language Integrated Production
System. CLIPS
/ . CLIPS-:
: CLIPS
:
o :
;
25
o :
;
o : CLIPS
C, Java, Ada LISP.
: CLIPS C
(Windows XP, MacOS X, and Unix).
.
/: CLIPS
( ) (C,
Java, FORTRAN and ADA).
CLIPS-.
:
, , ,
.
/: CLIPS
,
.
: CLIPS
.
: CLIPS .
26
4.1. CLIPS-
CLIPS- Windows .
:
File,
Edit,
Buffer,
Execution,
Browse,
Window,
Help.
File - :
New (Ctrl+N) .
Open... (Ctrl+O) Windows
.
Load... (Ctrl+L) Windows
(load "C: / CLIPSWIN / EXAMPLES / TEST.CLP")
Load Batch... Windows
.
Load Binary... Windows
Turn Dribble On... Windows
.
Close .
Save (Ctrl+S) ,
.
Save As...
.
Save Binary... CLIPS-
.
Revert
.
Page Setup... .
Print... (Ctrl+P) .
Exit .
27
Edit - :
Undo (Ctrl+Z)
Cut (Ctrl+X) .
Copy (Ctrl+C) .
Paste (Ctrl+V) .
Delete .
Select All .
Balance (Ctrl+B) .
Comment (Ctrl+;) Uncomment (Ctrl+U) .
Set Font... .
Buffer - :
Find (Ctrl+F)- .
Replace (Ctrl+H) .
Load Selection (Ctrl+K) .
Batch Selection (Ctrl+M) .
Load Buffer .
28
Execution - :
Reset (Ctrl+E) .
Run (Ctrl+R) .
Step (Ctrl+T) .
Watch... (Ctrl+W)
Options... .
Preferences... CLIPS Windows .
Clear CLIPS .
Browse - :
The Module Menu .
Defrule Manager...
.
Deffacts Manager...
.
Deftemplate Manager...
.
Deffunction Manager...
.
Defglobals Manager...
.
Defgeneric Manager...
.
Defclass Manager...
.
Definstances Manager...
.
Agenda Manager...
Window - :
Cascade
Tile Horizontally .
Tile Vertically .
Close All .
29
Help - :
About CLIPS CLIPS-.
CLIPS Help .
Command complete... (Ctrl+J) .
Status Line .
30
5.
.
.
:
,
,
,
,
.
,
;
;
;
.
:
;
;
.
CLIPS-.
.
:
(deftemplate Patient (slot temperature)
(slot spots)
(slot rash)
(slot sore_throat)
(slot inneculated)
(slot fever))
(deffacts Initial
(Patient ))
:
(defrule GetTemperature
(declare (salience 500))
?p <- (Patient (temperature nil))
=>
(printout t "Unesite pacijentovu temperaturu: ")
(bind ?response (read))
(modify ?p (temperature ?response)))
(defrule GetSpots
(declare (salience 500))
31
(defrule Allergy2
(Patient (rash da))
=>
(assert (diagnesis allergy))
(printout t "Alergija je izazvala crvenilo koze" crlf))
(defrule Flu
(Patient (sore_throat da) (fever mild|high))
=>
(assert (diagnesis flu))
(printout t "Infekcija grla" crlf))
, :
(defrule Penicillin
(diagnesis measles)
=>
(assert (treatment pennicillin))
(printout t "Prepisati penicilin" crlf))
(defrule Allergy_pills
(diagnesis allergy)
=>
(assert (treatment allergy_shot))
(printout t "Prepisati injekcijsku terapiju" crlf))
(defrule Bed_rest
(diagnesis flu)
=>
(assert (treatment bed_rest))
(printout t "Prep lezanje u krevetu" crlf))
; Ukoliko ekspertni sistem nema ponudjenih dijagnoza
; daje se preporuka da se pacijent obrati ekspertu
(defrule None
(declare (salience -100))
(not (diagnesis ?))
=>
(printout t "Nije moguca dijagnoza - obratiti se lekaru specijalisti"
crlf))
CLIPS-
:
CLIPS (Quicksilver Beta 3/26/08)
CLIPS> (load "G:/FIM/EkspertniSistemi/Primer.txt")
Defining deftemplate: Patient
Defining deffacts: Initial
Defining defrule: GetTemperature +j+j
Defining defrule: GetSpots +j+j
33
35
6.
( ,
).
.
.
, .
.
.
36
7.
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]
[13]
[14]
[15]
, . , , , 2009.
, . , , , 2007.
, . , , , Giarratano, J, CLIPS User Manual, 2007.
CLIPS, Reference Manual I, Basic Programming Guide, 2007.
CLIPS, Reference Manual II, Advanced Programming Guide, 2008.
CLIPS, Reference Manual III, Intrefaces Guide, 2007.
Third Conference on CLIPS Proceedings (Electronic Version), 1994.
http://www.cis.ysu.edu/~john/824/examples.html
http://clipsinterface.sourceforge.net/WebCLIPS/wchowto.htm
http://sourceforge.net/projects/clipsinterface/
http://www.cse.scitech.ac.uk/arc/CLIPS/clips_doc/index.html
http://www.wtec.org/loyola/kb/c1_s1.htm
http://www.kbsc.com/rulebase.html
http://iweb.tntech.edu/bhuguenard/ds6530/ClipsTutorial/CLIPS%20tutorial
%202.htm
37