Jess (programming language)

Last updated
Jess
Developer(s) Sandia National Laboratories
Initial release1995;29 years ago (1995)
Stable release
7.1p2 / November 5, 2008;15 years ago (2008-11-05)
Written in Java
Platform Java
License Proprietary, public domain
Website www.jessrules.com

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. [1] It is a superset of the CLIPS language. [1] It was first written in late 1995. [1] The language provides rule-based programming for the automation of an expert system, and is often termed as an expert system shell. [1] In recent years, intelligent agent systems have also developed, which depend on a similar ability.

Contents

Rather than a procedural paradigm, where one program has a loop that is activated only one time, the declarative paradigm used by Jess applies a set of rules to a set of facts continuously by a process named pattern matching . Rules can modify the set of facts, or can execute any Java code. It uses the Rete algorithm [1] to execute rules.

License

The licensing for Jess is freeware for education and government use, and is proprietary software, needing a license, for commercial use. In contrast, CLIPS, which is the basis and starting code for Jess, is free and open-source software.

Code examples

Code examples:

; is a comment(bind?x100); x = 100(deffunctionmax(?a?b)(if(>?a?b)then?aelse?b))(deffactsmyroom(furniturechair)(furnituretable)(furniturebed))(deftemplatecar(slotcolor)(slotmileage)(slotvalue))(assert(car(colorred)(mileage10000)(value400)))

Sample code:

(clear)(deftemplateblood-donor(slotname)(slottype))(deffactsblood-bank; put names & their types into [[working memory]](blood-donor(name"Alice")(type"A"))(blood-donor(name"Agatha")(type"A"))(blood-donor(name"Bob")(type"B"))(blood-donor(name"Barbara")(type"B"))(blood-donor(name"Jess")(type"AB"))(blood-donor(name"Karen")(type"AB"))(blood-donor(name"Onan")(type"O"))(blood-donor(name"Osbert")(type"O")))(defrulecan-give-to-same-type-but-not-self; handles A > A, B > B, O > O, AB > AB, but not N1 > N1(blood-donor(name?name)(type?type))(blood-donor(name?name2)(type?type2&:(eq?type?type2)&:(neq?name?name2)))=>(printoutt?name" can give blood to "?name2crlf))(defruleO-gives-to-others-but-not-itself; O to O cover in above rule(blood-donor(name?name)(type?type&:(eq?type"O")))(blood-donor(name?name2)(type?type2&:(neq?type?type2)&:(neq?name?name2)))=>(printoutt?name" can give blood to "?name2crlf))(defruleA-or-B-gives-to-AB; case O gives to AB and AB gives to AB already dealt with(blood-donor(name?name)(type?type&:(or(eq?type"A")(eq?type"B"))))(blood-donor(name?name2)(type?type2&:(eq?type2"AB")&:(neq?name?name2)))=>(printoutt?name" can give blood to "?name2crlf));(watch all)(reset)(run)

See also

Related Research Articles

<span class="mw-page-title-main">Blood type</span> Classification of blood based on antibodies and antigens on red blood cell surfaces

A blood type is a classification of blood, based on the presence and absence of antibodies and inherited antigenic substances on the surface of red blood cells (RBCs). These antigens may be proteins, carbohydrates, glycoproteins, or glycolipids, depending on the blood group system. Some of these antigens are also present on the surface of other types of cells of various tissues. Several of these red blood cell surface antigens can stem from one allele and collectively form a blood group system.

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 is a notation used to describe the syntax of programming languages or other formal languages. It was developed by John Backus and Peter Naur. BNF can be described as a metasyntax notation for context-free grammars. Backus–Naur form is applied wherever exact descriptions of languages are needed, such as in official language specifications, in manuals, and in textbooks on programming language theory. BNF can be used to describe document formats, instruction sets, and communication protocols.

Generic programming is a style of computer programming in which algorithms are written in terms of data types to-be-specified-later that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by the ML programming language in 1973, permits writing common functions or types that differ only in the set of types on which they operate when used, thus reducing duplicate code.

In computing, type introspection is the ability of a program to examine the type or properties of an object at runtime. Some programming languages possess this capability.

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

<span class="mw-page-title-main">ABO blood group system</span> Classification of blood types

The ABO blood group system is used to denote the presence of one, both, or neither of the A and B antigens on erythrocytes. For human blood transfusions, it is the most important of the 44 different blood type classification systems currently recognized by the International Society of Blood Transfusions (ISBT) as of December 2022. A mismatch in this, or any other serotype, can cause a potentially fatal adverse reaction after a transfusion, or an unwanted immune response to an organ transplant. The associated anti-A and anti-B antibodies are usually IgM antibodies, produced in the first years of life by sensitization to environmental substances such as food, bacteria, and viruses.

In computer programming, thread-local storage (TLS) is a memory management method that uses static or global memory local to a thread. The concept allows storage of data that appears to be global in a system with separate threads.

A BRMS or business rule management system is a software system used to define, deploy, execute, monitor and maintain the variety and complexity of decision logic that is used by operational systems within an organization or enterprise. This logic, also referred to as business rules, includes policies, requirements, and conditional statements that are used to determine the tactical actions that take place in applications and systems.

Arden syntax is a markup language used for representing and sharing medical knowledge. This clinical and scientific knowledge language is used in an executable format by clinical decision support systems to generate alerts, interpretations, and to screen and manage messages to clinicians. This syntax is used to share medical knowledge within and across many health service institutions. Rule sets, called Medical Logic Modules (MLMs), comprise enough logic to make a single medical decision. Medical logic modules are written in Arden syntax, and are called by a program – an event monitor – when the condition they are written to help with occurs.

Signals and slots is a language construct introduced in Qt for communication between objects which makes it easy to implement the observer pattern while avoiding boilerplate code. The concept is that GUI widgets, and other objects, can send signals containing event information which can be received by other objects using special member functions known as slots. This is similar to C/C++ function pointers, but the signal/slot system ensures the type-correctness of callback arguments.

<span class="mw-page-title-main">Logical equality</span>

Logical equality is a logical operator that corresponds to equality in Boolean algebra and to the logical biconditional in propositional calculus. It gives the functional value true if both functional arguments have the same logical value, and false if they are different.

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.

Animal erythrocytes have cell surface antigens that undergo polymorphism and give rise to blood types. Antigens from the human ABO blood group system are also found in apes and Old World monkeys, and the types trace back to the origin of humanoids. Other animal blood sometimes agglutinates with human blood group reagents, but the structure of the blood group antigens in animals is not always identical to those typically found in humans. The classification of most animal blood groups therefore uses different blood typing systems to those used for classification of human blood.

As a subfield in artificial intelligence, diagnosis is concerned with the development of algorithms and techniques that are able to determine whether the behaviour of a system is correct. If the system is not functioning correctly, the algorithm should be able to determine, as accurately as possible, which part of the system is failing, and which kind of fault it is facing. The computation is based on observations, which provide information on the current behaviour.

Drools is a business rule management system (BRMS) with a forward and backward chaining inference-based rules engine, more correctly known as a production rule system, using an enhanced implementation of the Rete algorithm.

<span class="mw-page-title-main">Karl Landsteiner</span> Austrian immunologist (1868–1943)

Karl Landsteiner was an Austrian American biologist, physician, and immunologist. He emigrated with his family to New York in 1923 at the age of 55 for professional opportunities, working for the Rockefeller Institute.

OpenL Tablets is a business rule management system (BRMS) and a business rules engine (BRE) based on table representation of rules. Engine implements optimized sequential algorithm. OpenL includes such table types as decision table, decision tree, spreadsheet-like calculator.

In queueing theory, a discipline within the mathematical theory of probability, the backpressure routing algorithm is a method for directing traffic around a queueing network that achieves maximum network throughput, which is established using concepts of Lyapunov drift. Backpressure routing considers the situation where each job can visit multiple service nodes in the network. It is an extension of max-weight scheduling where each job visits only a single service node.

d3web is a free, open-source platform for knowledge-based systems . Its core is written in Java using XML and/or Office-based formats for the knowledge storage. All of its components are distributed under the terms of the Lesser General Public Licence (LGPL).

References

  1. 1 2 3 4 5 Hemmer, Markus C. (2008). Expert Systems in Chemistry Research. CRC Press. pp. 47–48. ISBN   9781420053241 . Retrieved March 30, 2012. ISBN   978-1-4200-5323-4

Further sources