Jess程序设计语言

本页使用了标题或全文手工转换
维基百科,自由的百科全书
Jess
開發者桑迪亚国家实验室
平台Java
许可协议专有软件 / 公有领域
网站www.jessrules.com

Jess是Java平台上的规则引擎英语rule engine,它是CLIPS程序设计语言英语CLIPS programming language的超集,由桑迪亚国家实验室Ernest Friedman-Hill英语Ernest Friedman-Hill开发。它的第一个版本写于1995年晚期。

Jess提供适合自动化专家系统逻辑编程,它常被称作“专家系统外壳”。近年来,智能代理系统也在相似的能力上发展起来。

与一个程序中有一个只运行一次的循环的指令式編程语言不同,Jess使用的宣告式编程通过一个名为“模式匹配”的过程连续的对一个事实的集合运用一系列规则。规则可以修改事实集合,或者运行任何Java代码。

Jess可以被用来构建使用规则定义形式的知识来推倒结论和推论的Java ServletEJBApplet和应用程序。因为不同的规则匹配不同的输入,所以有了一些有效的通用匹配算法。Jess规则引擎使用Rete算法英语Rete algorithm

许可证[编辑]

Jess不是开源软件,而CLIPS英语CLIPS是。

代码实例[编辑]

代码实例:

(deftemplate male   "" (declare (ordered TRUE)))
(deftemplate female "" (declare (ordered TRUE)))
(deftemplate parent "" (declare (ordered TRUE)))
(deftemplate father "" (declare (ordered TRUE)))
(deftemplate mother "" (declare (ordered TRUE)))

(deffacts initialFacts
  (male bill)
  (female jane)
  (female sally)
  (parent bill sally)
  (parent jane sally)
  )

(defrule father
  (parent ?x ?y)
  (male ?x)
  =>
  (printout t crlf ?x " is the father of " ?y crlf)
  )

(defrule mother
  (parent ?x ?y)
  (female ?x)
  =>
  (printout t crlf ?x " is the mother of " ?y crlf)
  )

(reset)
(facts)
(run)

(printout t crlf)

书籍[编辑]

参见[编辑]

参考文件[编辑]


外部链接[编辑]