CLIPS

Last updated
CLIPS
Paradigm expert systems
First appeared1985
Website https://clipsrules.net

CLIPS is a public domain software tool for building expert systems. The name is an acronym for "C Language Integrated Production System." The syntax and name were inspired by Charles Forgy's OPS5. The first versions of CLIPS were developed starting in 1985 at NASA-Johnson Space Center (as an alternative for existing system ART*Inference) until the mid-1990s 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

CLIPS was probably the most widely used expert system tool as of 2005. [1] CLIPS itself 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 language for writing expert systems. COOL combines the programming paradigms of procedural, object oriented and logical (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 up in 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, 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. The first expert systems were created in the 1970s and then proliferated in the 1980s. Expert systems were among the first truly successful forms of artificial intelligence (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, such as the application of rules or the relations of sets and subsets.

<span class="mw-page-title-main">Macro (computer science)</span> Rule for substituting a set input with a set output

In computer programming, a macro is a rule or pattern that specifies how a certain input should be mapped to a replacement output. Applying a macro to an input is known as macro expansion. The input and output may be a sequence of lexical tokens or characters, or a syntax tree. Character macros are supported in software applications to make it easy to invoke common command sequences. Token and tree macros are supported in some programming languages to enable code reuse or to extend the language, sometimes for domain-specific languages.

<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 platform that was developed by Ernest Friedman-Hill of Sandia National Labs. It is a superset of the CLIPS programming language. It was first written in late 1995. The language provides rule-based programming for the automation of an expert system, and is frequently termed as an expert system shell. In recent years, intelligent agent systems have also developed, which depend on a similar capability.

In computer science, augmented Backus–Naur form (ABNF) is a metalanguage based on Backus–Naur form (BNF), but consisting of its own syntax and derivation rules. The motive principle for ABNF is to describe a formal system of a language to be used as a bidirectional communications protocol. It is defined by Internet Standard 68, which as of December 2010 is RFC 5234, and it often serves as the definition language for IETF communication protocols.

In computer science, Backus–Naur form or Backus normal form (BNF) is a metasyntax notation for context-free grammars, often used to describe the syntax of languages used in computing, such as computer programming languages, document formats, instruction sets and communication protocols. It is applied wherever exact descriptions of languages are needed: for instance, in official language specifications, in manuals, and in textbooks on programming language theory.

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.

Parsing, syntax analysis, or syntactic analysis is the process of analyzing a string of symbols, either in natural language, computer languages or data structures, conforming to the rules of a formal grammar. The term parsing comes from Latin pars (orationis), meaning part.

In the field of artificial intelligence, an inference engine is a 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.

The join-calculus is a process calculus developed at INRIA. The join-calculus was developed to provide a formal basis for the design of distributed programming languages, and therefore intentionally avoids communications constructs found in other process calculi, such as rendezvous communications, which are difficult to implement in a distributed setting. Despite this limitation, the join-calculus is as expressive as the full π-calculus. Encodings of the π-calculus in the join-calculus, and vice versa, have been demonstrated.

FuzzyCLIPS is a fuzzy logic extension of the CLIPS expert system shell from NASA. It was developed by the Integrated Reasoning Group of the Institute for Information Technology of the National Research Council of Canada and has been widely distributed for a number of years. It enhances CLIPS by providing a fuzzy reasoning capability that is fully integrated with CLIPS facts and inference engine allowing one to represent and manipulate fuzzy facts and rules. FuzzyCLIPS can deal with exact, fuzzy, and combined reasoning, allowing fuzzy and normal terms to be freely mixed in the rules and facts of an expert system. The system uses two basic inexact concepts, fuzziness and uncertainty. It has provided a useful environment for developing fuzzy applications but it does require significant effort to update and maintain as new versions of CLIPS are released.

In computer programming, an anonymous function is a function definition that is not bound to an identifier. Anonymous functions are often arguments being passed to higher-order functions or used for constructing the result of a higher-order function that needs to return a function. If the function is only used once, or a limited number of times, an anonymous function may be syntactically lighter than using a named function. Anonymous functions are ubiquitous in functional programming languages and other languages with first-class functions, where they fulfil the same role for the function type as literals do for other data types.

Spacecraft Health Inference Engine (SHINE) is a software-development tool for knowledge-based systems, created by the Artificial intelligence Group, Information Systems Technology Section at NASA/JPL. The system is in use in basic and applied AI research at JPL. SHINE was designed to operate in a real-time environment. It is written in Common LISP, but able to be utilized by non-LISP applications written in conventional programming languages such as C and C++. These non-LISP applications can be running in a distributed computing environment on remote computers or on a computer that supports multiple programming languages. SHINE provides a variety of facilities for the development of software modules for the primary functions in knowledge-based reasoning engines. The system may be used to develop artificial intelligence applications as well as specialized tools for research efforts.

Hamcrest is a framework that assists writing software tests in the Java programming language. It supports creating customized assertion matchers, allowing match rules to be defined declaratively. These matchers have uses in unit testing frameworks such as JUnit and jMock. Hamcrest has been included in JUnit 4 since 2012, but was omitted from JUnit 5 in 2017.

<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.

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 Nov 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."