CLIPS

Last updated
CLIPS
Paradigm object-oriented, expert system
Developer NASA Johnson Space Center
First appeared1985;39 years ago (1985)
Stable release
6.4.1 / April 21, 2023;13 months ago (2023-04-21)
Memory management garbage collected
Implementation language C
License public domain
Website clipsrules.net
Influenced by
OPS5

CLIPS (C Language Integrated Production System) is a public-domain software tool for building expert systems. The syntax and name were inspired by Charles Forgy's OPS5. The first versions of CLIPS were developed starting in 1985 at the NASA Johnson 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 was NASA's AI Language (NAIL).

Contents

As of 2005, CLIPS was probably the most widely used expert system tool. [1] CLIPS is written in C, extensions can be written in C, and CLIPS can be called from C. Its syntax resembles that of the programming language Lisp. [2]

CLIPS incorporates a complete object-oriented programming language for writing expert systems. COOL combines the programming paradigms of procedural, object oriented, and logic programming (automated theorem proving) languages. [3]

Facts and rules

CLIPS uses forward 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:

(deftemplatecar_problem(slotname)(slotstatus))(deffactstrouble_shooting(car_problem(nameignition_key)(statuson))(car_problem(nameengine)(statuswont_start))(car_problem(nameheadlights)(statuswork)))(defrulerule1(car_problem(nameignition_key)(statuson))(car_problem(nameengine)(statuswont_start))=>(assert(car_problem(namestarter)(statusfaulty))))

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)0rule1:f-1,f-2Foratotalof1activation.CLIPS>(facts)f-0(initial-fact)f-1(car_problem(nameignition_key)(statuson))f-2(car_problem(nameengine)(statuswont_start))f-3(car_problem(nameheadlights)(statuswork))Foratotalof4facts.CLIPS>(run)CLIPS>(facts)f-0(initial-fact)f-1(car_problem(nameignition_key)(statuson))f-2(car_problem(nameengine)(statuswont_start))f-3(car_problem(nameheadlights)(statuswork))f-4(car_problem(namestarter)(statusfaulty))Foratotalof5facts.CLIPS>(assert<fact>+)(Assert(object(name"chair")(Materialwood)(height3feet)(Colorbrown))CLIPS(retract<fact-index+)(retract0)foracolor

In CLIPS, salience allows a user to assign priority (or weight) to a rule.

Descendants

Descendants of the CLIPS language include Jess (rule-based portion of CLIPS rewritten in Java, it later grew in a different direction), [5] and FuzzyCLIPS (which adds concept of relevancy into the language).

See also

Related Research Articles

<span class="mw-page-title-main">Erlang (programming language)</span> Programming language

Erlang is a general-purpose, concurrent, functional high-level programming language, and a garbage-collected runtime system. The term Erlang is used interchangeably with Erlang/OTP, or Open Telecom Platform (OTP), which consists of the Erlang runtime system, several ready-to-use components (OTP) mainly written in Erlang, and a set of design principles for Erlang programs.

<span class="mw-page-title-main">Expert system</span> Computer system emulating the decision-making ability of a human expert

In artificial intelligence (AI), an expert system is a computer system emulating the decision-making ability of a human expert. Expert systems are designed to solve complex problems by reasoning through bodies of knowledge, represented mainly as if–then rules rather than through conventional procedural code. Expert systems were first created in the 1970s and then proliferated in the 1980s. Expert systems were among the first truly successful forms of AI software. An expert system is divided into two subsystems: the inference engine and the knowledge base. The knowledge base represents facts and rules. The inference engine applies the rules to the known facts to deduce new facts. Inference engines can also include explanation and debugging abilities.

Knowledge representation and reasoning is the field of artificial intelligence (AI) dedicated to representing information about the world in a form that a computer system can use to solve complex tasks such as diagnosing a medical condition or having a dialog in a natural language. Knowledge representation incorporates findings from psychology about how humans solve problems and represent knowledge, in order to design formalisms that will make complex systems easier to design and build. Knowledge representation and reasoning also incorporates findings from logic to automate various kinds of reasoning.

<span class="mw-page-title-main">Shell script</span> Script written for the shell, or command line interpreter, of an operating system

A shell script is a computer program designed to be run by a Unix shell, a command-line interpreter. The various dialects of shell scripts are considered to be scripting languages. Typical operations performed by shell scripts include file manipulation, program execution, and printing text. A script which sets up the environment, runs the program, and does any necessary cleanup or logging, is called a wrapper.

Jess is a rule engine for the Java computing platform, written in the Java programming language. It was developed by Ernest Friedman-Hill of Sandia National Laboratories. It is a superset of the CLIPS language. It was first written in late 1995. The language provides rule-based programming for the automation of an expert system, and is often termed as an expert system shell. In recent years, intelligent agent systems have also developed, which depend on a similar ability.

In computer science, a compiler-compiler or compiler generator is a programming tool that creates a parser, interpreter, or compiler from some form of formal description of a programming language and machine.

In computer science, pattern matching is the act of checking a given sequence of tokens for the presence of the constituents of some pattern. In contrast to pattern recognition, the match usually has to be exact: "either it will or will not be a match." The patterns generally have the form of either sequences or tree structures. Uses of pattern matching include outputting the locations of a pattern within a token sequence, to output some component of the matched pattern, and to substitute the matching pattern with some other token sequence.

In the field of artificial intelligence, an inference engine is a software component of an intelligent system that applies logical rules to the knowledge base to deduce new information. The first inference engines were components of expert systems. The typical expert system consisted of a knowledge base and an inference engine. The knowledge base stored facts about the world. The inference engine applied logical rules to the knowledge base and deduced new knowledge. This process would iterate as each new fact in the knowledge base could trigger additional rules in the inference engine. Inference engines work primarily in one of two modes either special rule or facts: forward chaining and backward chaining. Forward chaining starts with the known facts and asserts new facts. Backward chaining starts with goals, and works backward to determine what facts must be asserted so that the goals can be achieved.

A domain-specific language (DSL) is a computer language specialized to a particular application domain. This is in contrast to a general-purpose language (GPL), which is broadly applicable across domains. There are a wide variety of DSLs, ranging from widely used languages for common domains, such as HTML for web pages, down to languages used by only one or a few pieces of software, such as MUSH soft code. DSLs can be further subdivided by the kind of language, and include domain-specific markup languages, domain-specific modeling languages, and domain-specific programming languages. Special-purpose computer languages have always existed in the computer age, but the term "domain-specific language" has become more popular due to the rise of domain-specific modeling. Simpler DSLs, particularly ones used by a single application, are sometimes informally called mini-languages.

<span class="mw-page-title-main">History of programming languages</span> History of languages used to program computers

The history of programming languages spans from documentation of early mechanical computers to modern tools for software development. Early programming languages were highly specialized, relying on mathematical notation and similarly obscure syntax. Throughout the 20th century, research in compiler theory led to the creation of high-level programming languages, which use a more accessible syntax to communicate instructions.

A "production system" is a computer program typically used to provide some form of artificial intelligence, which consists primarily of a set of rules about behavior, but it also includes the mechanism necessary to follow those rules as the system responds to states of the world. Those rules, termed productions, are a basic representation found useful in automated planning, expert systems and action selection.

<span class="mw-page-title-main">Check engine light</span> Type of indicator light in automobiles

A check engine light or malfunction indicator lamp (MIL), is a tell-tale that a computerized engine-management system used to indicate a malfunction or problem with the vehicle ranging from minor to serious. Found on the instrument panel of most automobiles, it usually bears the legend engine, check engine, service engine soon, maintenance required, emiss maint, or a pictogram of an engine—and when illuminated, it is typically an amber or red color.

<span class="mw-page-title-main">Comment (computer programming)</span> Explanatory note in the source code of a computer program

In computer programming, a comment is a programmer-readable explanation or annotation in the source code of a computer program. They are added with the purpose of making the source code easier for humans to understand, and are generally ignored by compilers and interpreters. The syntax of comments in various programming languages varies considerably.

The DMS Software Reengineering Toolkit is a proprietary set of program transformation tools available for automating custom source program analysis, modification, translation or generation of software systems for arbitrary mixtures of source languages for large scale software systems. DMS was originally motivated by a theory for maintaining designs of software called Design Maintenance Systems. DMS and "Design Maintenance System" are registered trademarks of Semantic Designs.

In computer science, a rule-based system is a computer system in which domain-specific knowledge is represented in the form of rules and general-purpose reasoning is used to solve problems in the domain.

In engineering, debugging is the process of finding the root cause of and workarounds and possible fixes for bugs.

<span class="mw-page-title-main">Go (programming language)</span> Programming language

Go is a statically typed, compiled high-level programming language designed at Google by Robert Griesemer, Rob Pike, and Ken Thompson. It is syntactically similar to C, but also has memory safety, garbage collection, structural typing, and CSP-style concurrency. It is often referred to as Golang because of its former domain name, golang.org, but its proper name is Go.

<span class="mw-page-title-main">General Motors ignition switch recalls</span> Vehicle recall by General Motors

The General Motors ignition switch recalls refers to February 6, 2014 when General Motors recalled about 800,000 of its small cars due to faulty ignition switches, which could shut off the engine while the vehicle was in motion and thereby prevent the airbags from inflating. The company continued to recall more of its cars over the next several months, resulting in nearly 30 million cars recalled worldwide and paid compensation for 124 deaths. The fault had been known to GM for at least a decade prior to the recall being declared. As part of a Deferred Prosecution Agreement, GM agreed to forfeit $900 million to the United States.

<span class="mw-page-title-main">Cuneiform (programming language)</span> Open-source workflow language

Cuneiform is an open-source workflow language for large-scale scientific data analysis. It is a statically typed functional programming language promoting parallel computing. It features a versatile foreign function interface allowing users to integrate software from many external programming languages. At the organizational level Cuneiform provides facilities like conditional branching and general recursion making it Turing-complete. In this, Cuneiform is the attempt to close the gap between scientific workflow systems like Taverna, KNIME, or Galaxy and large-scale data analysis programming models like MapReduce or Pig Latin while offering the generality of a functional programming language.

References

  1. Di Stefano, Antonella; Gangemi, Francesc; Santoro, Corrado (2005). ERESYE: artificial intelligence in Erlang programs. Proceedings of the 2005 ACM SIGPLAN workshop on Erlang. Tallinn, Estonia: ACM. pp. 62–71. doi:10.1145/1088361.1088373. ISBN   1-59593-066-3.
  2. 1 2 Giarratano, Joseph C; Riley, Gary D. (2005). Expert Systems: Principles and Programming. Boston: Thomson. ISBN   81-315-0167-1.
  3. Riley, Gary (30 November 2017). CLIPS Reference Manual: Volume 1 – Basic Programming Guide (PDF). Retrieved 29 April 2023.
  4. 1 2 Sandeep, K; Rakesh, K (2011). "CLIPS based decision support system for water distribution networks". Drinking Water Engineering and Science. 4 (1): 37–50. doi: 10.5194/dwes-4-37-2011 .
  5. Goyal, R; Jayasudha, T; Pandey, P; Devi, R. D; Rebecca, A; Sarma, M. Manju; Lakshmi, B (2014). "Knowledge based system for Satellite data product selection". The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences. 40 (8): 1233–1236. "Jess was originally inspired by the CLIPS expert system shell, but has grown into a complete, distinct Java-influenced environment of its own."