This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "CLIPS" – news ·newspapers ·books ·scholar ·JSTOR(September 2013) (Learn how and when to remove this message) |
| CLIPS | |
|---|---|
| Paradigm | object-oriented,expert system |
| Developer | NASAJohnson Space Center |
| First appeared | 1985; 41 years ago (1985) |
| Stable release | 6.4.1 / April 21, 2023; 2 years ago (2023-04-21) |
| Memory management | garbage collected |
| Implementation language | C |
| License | public domain |
| Website | clipsrules |
| Influenced by | |
| OPS5 | |
CLIPS (C Language Integrated Production System) is apublic-domain software tool for buildingexpert systems. Thesyntax and name were inspired byCharles Forgy'sOPS5. The first versions of CLIPS were developed starting in 1985 at theNASAJohnson Space Center (as an alternative for existing system ART*Inference) until 1996, when the development group's responsibilities ceased to focus on expert system technology. The original name of the project wasNASA's AI Language (NAIL).
As of 2005, CLIPS was probably the most widely used expert system tool.[1] CLIPS is written inC, extensions can be written in C, and CLIPS can be called from C. Its syntax resembles that of theprogramming languageLisp.[2]
CLIPS incorporates a completeobject-oriented programming language for writing expert systems. COOL combines theprogramming paradigms ofprocedural, object oriented, andlogic programming (automated theorem proving) languages.[3]
CLIPS usesforward chaining.[4][2] Like other expert system languages, CLIPS deals with rules and facts. Various facts can make a rule applicable. An applicable rule is then fired.[4] Facts and rules are created by first defining them, as shown below:
(deftemplate car_problem (slot name) (slot status))
(deffactstrouble_shooting (car_problem (name ignition_key) (status on)) (car_problem (name engine) (status wont_start)) (car_problem (name headlights) (status work)))(defrule rule1 (car_problem (name ignition_key) (status on)) (car_problem (name engine) (status wont_start)) => (assert (car_problem (name starter) (status faulty))))
Having set this up, the (reset) command causes CLIPS to read the facts and rules. In this case, that would lead to the three "trouble_shooting" facts being asserted. Then the (run) command is used. Given that the two facts listed in rule1 have both been asserted, the conditions for doing its action have been met so the additional fact is asserted as a result of the run.
CLIPS> (reset)CLIPS> (agenda)0 rule1: f-1,f-2For a total of 1 activation.CLIPS> (facts)f-0 (initial-fact)f-1 (car_problem (name ignition_key) (status on))f-2 (car_problem (name engine) (status wont_start))f-3 (car_problem (name headlights) (status work))For a total of 4 facts.CLIPS> (run)CLIPS> (facts)f-0 (initial-fact)f-1 (car_problem (name ignition_key) (status on))f-2 (car_problem (name engine) (status wont_start))f-3 (car_problem (name headlights) (status work))f-4 (car_problem (name starter) (status faulty))For a total of 5 facts.CLIPS>(assert <fact>+) (Assert (object (name "chair")(Material wood)(height 3feet)(Color brown))CLIPS(retract <fact-index+)(retract 0)for a color
In CLIPS,salience allows a user to assign priority (or weight) to a rule.
Descendants of the CLIPS language includeJess (rule-based portion of CLIPS rewritten inJava, it later grew in a different direction),[5] andFuzzyCLIPS (which adds concept of relevancy into the language).