Jess (programming language)

Jess (programming language)
Jess
Developer(s) Sandia National Laboratories
Platform Java
License Closed source / Public Domain
Website www.jessrules.com

Jess is a rule engine for the Java platform - it is a superset of CLIPS programming language, developed by Ernest Friedman-Hill of Sandia National Labs. It was first written in late 1995.

It provides rule-based programming suitable for automating an expert system, and is often referred to as an expert system shell. In recent years, intelligent agent systems have also developed, which depend on a similar capability.

Rather than a procedural paradigm, where a single program has a loop that is activated only one time, the declarative paradigm used by Jess continuously applies a collection of rules to a collection of facts by a process called pattern matching. Rules can modify the collection of facts, or they can execute any Java code.

Jess can be used to build Java servlets, EJBs, applets, and full applications that use knowledge in the form of declarative rules to draw conclusions and make inferences. Since many rules may match many inputs, there are few effective general purpose matching algorithms. The Jess rules engine uses the Rete algorithm.

Contents

License

While CLIPS is licensed as open source, Jess is not open source. JESS is free for educational and government use but a license is required to use JESS for commercial systems.

Code examples

Code examples:

 ; is a comment
(bind ?x 100)

; x = 100
(deffunction max (?a ?b)
  (if (> ?a ?b) then ?a else ?b))
(deffacts myroom
   (furniture chair)
   (furniture table)
   (furniture bed)
)
(deftemplate car
   (slot color)
   (slot mileage)
   (slot value)
)
(assert (car (color red) (mileage 10000) (value 400)))

Sample code:

(clear)
(deftemplate blood-donor (slot name) (slot type))
(deffacts blood-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"))
)
(defrule can-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)  ))
      =>
      (printout t ?name " can give blood to " ?name2 crlf)
)
(defrule O-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)  ))
      =>
      (printout t ?name " can give blood to " ?name2 crlf)
)
(defrule A-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)  ))
      =>
      (printout t ?name " can give blood to " ?name2 crlf)
)
;(watch all)
(reset)
(run)

See also

Documentation

External links

Related systems

  • CLIPS: public domain software tool for building expert systems.
  • d3web: free, open-source platform for knowledge-based systems (expert systems).
  • ILOG rules: a business rule management system.
  • JBoss Drools: a business rule management system (BRMS).
  • Prolog: a general purpose logic programming language.
  • OpenL Tablets: business centric rules and BRMS.
  • DTRules: a Decision Table based, open-sourced rule engine for Java.

Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Jess programming language — Jess, a rule engine for the Java platform, is a superset of CLIPS programming language, developed by Ernest Friedman Hill of Sandia National Labs. It was first written in late 1995.It provides rule based programming suitable for automating an… …   Wikipedia

  • Jess — Contents 1 People 1.1 First name 1.2 Surname 2 Fiction …   Wikipedia

  • List of programming languages by category — Programming language lists Alphabetical Categorical Chronological Generational This is a list of programming languages grouped by category. Some languages are listed in multiple categories. Contents …   Wikipedia

  • Rete — эффективный алгоритм сопоставления с образцом для продукционных систем, экспертных систем и баз знаний , созданный Чарльзом Форги из Университета Карнеги Меллона. Впервые был описан в рабочем документе 1974 года, затем в докторской диссертации… …   Википедия

  • Алгоритм Rete — Rete[1]  эффективный алгоритм сопоставления с образцом для продукционных систем, экспертных систем и баз знаний, созданный Чарльзом Форги из Университета Карнеги Меллона. Впервые был описан в рабочем документе 1974 года, затем в докторской… …   Википедия

  • Intelligenter virtueller Agent — Intelligente virtuelle Agenten sind autonome, grafisch modellierte und animierte Charaktere in einer virtuellen Umgebung, die eine künstliche Intelligenz besitzen. Für eine lebensnahe Wirkung interagieren sie mit ihrer Umgebung, untereinander… …   Deutsch Wikipedia

  • JSR-94 — is the Java Specification Request for a Java Rules Engine API. Implementations *Jess programming language *Drools External links * [http://jcp.org/en/jsr/detail?id=94 Java Community Process JSR 94 Page] * [http://www.jboss.org/drools/ Drools] *… …   Wikipedia

  • Сравнение средств разработки для создания мультиагентных систем — Платформа Основное назначение Лицензия Требуемый язык программирования Требуемая ОС Поддержка пользователя Соответствует ли требованиям FIPA Возможности ГИС Трехмерные возможности ABLE …   Википедия

  • Comparison of agent-based modeling software — In the last few years, the agent based modeling (ABM) community has developed several practical agent based modeling toolkits that enable individuals to develop agent based applications. More and more such toolkits are coming into existence, and… …   Wikipedia

  • 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 was inspired by Charles Forgy s OPS ( Official Production System, although there was nothing… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”